Opened 19 years ago

Closed 16 years ago

Last modified 13 years ago

#528 closed defect (fixed)

Add a documentation generator that creates a PDF or HTML files locally

Reported by: anonymous Owned by: Harkins
Component: Documentation Version: dev
Severity: trivial Keywords: doc-refactor
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be nice to have doc generation script for making pdf or static html at local computer after each svn update.

Attachments (3)

render_docs.py.diff (2.2 KB ) - added by Harkins 17 years ago.
Patch: a script to render HTML docs
render_docs.py.2.diff (3.2 KB ) - added by Jeff Anderson 16 years ago.
build_htmldocs-links_work-with_docs.diff (22.1 KB ) - added by mrts 16 years ago.
Patch that implements a management command for adding docs, with documentation.

Download all attachments as: .zip

Change History (31)

comment:1 by Adrian Holovaty, 19 years ago

Summary: docs generatorAdd a documentation generator that creates a PDF or HTML files locally

comment:2 by Adrian Holovaty, 19 years ago

priority: normallowest
Severity: normaltrivial

comment:3 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:4 by Malcolm Tredinnick, 17 years ago

Triage Stage: Design decision neededAccepted

This would be nice to have. A very low-priority enhancement.

comment:5 by Marc Fargas <telenieko@…>, 17 years ago

Maybe the first needed thing is to have http://www.djangoproject.com/documentation/ as a .rst file in SVN (index.rst ?) it's currently a hardcoded template ([source:djangoproject.com/django_website/templates/docs/index.html]). Could the index page be moved to an .rst?

comment:6 by Marc Fargas <telenieko@…>, 17 years ago

#1527 has been marked as a duplicate of this ticket. That one provides a Makefile that calls rst2html.py for every file in docs/ in case you want it ;)

comment:7 by Adrian Holovaty, 17 years ago

I've started working on this in my spare time.

comment:8 by anonymous, 17 years ago

FYI: I've just done a similar thing for my own projects (some of this information might be useful to you). I'm using MoinMoin as my wiki and it has a plugin for PDF creation that uses htmldoc as the pdf generator. It provides a really nice interface and works like a dream.

I wrote a small python script in my build system that simply got the web pages with the 'CreatePdf' action (ie after calling the wiki macro to create a PDF) and wrote it to a file which I zip up into my release.

The macro (and info) is here: http://moinmo.in/ActionMarket/PdfAction

Hope this helps :) - Tushar.

comment:9 by Harkins, 17 years ago

Owner: changed from nobody to Harkins
Status: newassigned

Claiming #528 and #4940 for Sprint14Sep.

by Harkins, 17 years ago

Attachment: render_docs.py.diff added

Patch: a script to render HTML docs

comment:10 by Harkins, 17 years ago

Has patch: set

The script I've created does not produce especially beautiful output, but the basic basic functionality is there to render the Django doc dir into one large HTML doc or many small HTML docs with an index.

comment:11 by Harkins, 17 years ago

Keywords: sprintsept14 added

comment:12 by James Bennett, 17 years ago

Marked #4940 as a duplicate.

comment:13 by Thomas Güttler <hv@…>, 17 years ago

Cc: hv@… added

comment:14 by Thomas Güttler <hv@…>, 17 years ago

Triage Stage: AcceptedReady for checkin

+1

if you want to improve the documenation, you need some way to check
the wiki syntax before you create a patch.

the patch render_docs.py.diff works for me. It think it is ready for check in (it can't break anything).

comment:15 by Malcolm Tredinnick, 17 years ago

Needs documentation: set
Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

This isn't ready to check in.

  • There should be practically no executable code at the top level. In other words, importing the file should not execute it. At least a main() function and if __name__ == '__main__': guard are required.
  • The imports should conform to PEP 8 style guidelines.
  • If you don't have docutils installed (which will be noticable in the import section), a helpful error message would be good, since docutils don't come by default with Python.

If somebody wants to take this further, it's probably worth checking in with Adrian (see comment 7) to find out where he's up.

by Jeff Anderson, 16 years ago

Attachment: render_docs.py.2.diff added

comment:16 by Jeff Anderson, 16 years ago

Needs documentation: unset
Patch needs improvement: unset

I wrote a small bit of documentation and did the requested things for improving the patch.

comment:17 by Ramiro Morales, 16 years ago

Apparently #6443 was created to suggest pisa from http://www.htmltopdf.org/ for conversion from HTML to PDF. I've closed it as duplicate of this and added the relevant info here.

in reply to:  2 comment:18 by anonymous, 16 years ago

Component: DocumentationTemplate system
Needs documentation: set
Needs tests: set
Patch needs improvement: set
Resolution: worksforme
Status: assignedclosed
Triage Stage: AcceptedUnreviewed
Version: 0.95

Replying to adrian:

in reply to:  15 comment:19 by anonymous, 16 years ago

Version: 0.95other branch

Replying to mtredinnick:

This isn't ready to check in.

  • There should be practically no executable code at the top level. In other words, importing the file should not execute it. At least a main() function and if __name__ == '__main__': guard are required.
  • The imports should conform to PEP 8 style guidelines.
  • If you don't have docutils installed (which will be noticable in the import section), a helpful error message would be good, since docutils don't come by default with Python.

If somebody wants to take this further, it's probably worth checking in with Adrian (see comment 7) to find out where he's up.

comment:20 by Simon Greenhill <dev@…>, 16 years ago

Component: Template systemDocumentation
Needs documentation: unset
Needs tests: unset
Resolution: worksforme
Status: closedreopened
Triage Stage: UnreviewedAccepted
Version: other branchSVN

This ain't a toy, sparky.

comment:21 by mrts, 16 years ago

I've created a somewhat more extended version of this that produces output that looks very similar to real Django documentation. See DjangoSpecifications/Docs/ConvertingRestToOtherFormats for overview, screenshots and patch.

comment:22 by mrts, 16 years ago

Keywords: sprintpycon08 added
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:23 by Malcolm Tredinnick, 16 years ago

Triage Stage: Ready for checkinAccepted

Not ready-for-checkin, since there doesn't appear to be any single patch to checkin, it's a large change if it's the thing you've posted to that above URL, so needs careful review by somebody other than yourself, plus, as Jacob mentioned, he's also working on a toolchain, so he'll possibly want to take bits and pieces of both approaches.

comment:24 by mrts, 16 years ago

Posting the final patch attached to the wiki page here as well to avoid confusion (re: there doesn't appear to be any single patch to checkin).

by mrts, 16 years ago

Patch that implements a management command for adding docs, with documentation.

comment:25 by mrts, 16 years ago

Keywords: doc-refactor added; sprintsept14 sprintpycon08 removed
milestone: 1.0 beta

An alternative system using Sphinx will be implemented during the documentation refactor effort.

Marking 1.0 beta as the documentation refactor effort should land in that milestone if at all.

comment:26 by Jacob, 16 years ago

Resolution: fixed
Status: reopenedclosed

We've had a Sphinx builder for quite some time now -- since [7370].

comment:27 by Thomas Güttler, 16 years ago

Cc: hv@… removed

comment:28 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top