Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for outputting multiple [X]HTML files #29

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 3 comments
Open

Support for outputting multiple [X]HTML files #29

GoogleCodeExporter opened this issue Apr 18, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I have developed a new experimental feature that allows the outputting of 
multiple [X]HTML files.
The feature effectively allows you to insert page breaks & specify the 
file-name & title of the new page.

The user simply adds lines of the form "%!output: <file-name> <page-title>" to 
their source file.
Whenever txt2tags encounters this it creates a new output file & handles 
writing headers, footers etc.
Subsequent output is directed to the new file.
It also correctly creates any table of contents so links point to the 
appropriate files.

I've also added support for "%!meta: <name> <content>" which adds 'meta' tags 
to the header of the current output file.

Combined these features allow the easy generation of help books for Mac OS X.  
[My primary focus.]

If there's any interest I can supply a patch.  The code is based on svn HEAD.
It also includes a few other small changes including the ability to specify a 
CSS class for each table instance.

Original issue reported on code.google.com by chris...@gmail.com on 12 Jun 2010 at 4:33

@GoogleCodeExporter
Copy link
Author

Chris, please attach your patch to the issue.
I'm interested in such feature, so let's discuss it.

Original comment by aureliojargas@gmail.com on 18 Jun 2010 at 3:24

@GoogleCodeExporter
Copy link
Author

OK here's a patch I just created against r117.
Please note that it is experimental & I'm only a pretend Python programmer ;-).
Having said that, I've had no problems with it though I've only tested it with 
the following options:
    txt2tags -i <source-file> -o main.html -v
and
    %!target  : xhtml
    %!encoding: UTF-8
    %!options : --toc --enum-title --css-sugar
    %!style   : style.css
    …
with Python 2.5.1 on Mac OS X 10.5.8.

Not everything in this patch is necessary for this particular feature.
It also includes the facility to place <p> & </p> on the same lines as their 
enclosing text as that then makes it possible to add custom <div> blocks (etc.) 
via postprocs.

Original comment by chris...@gmail.com on 18 Jun 2010 at 4:46

Attachments:

@GoogleCodeExporter
Copy link
Author

Any feedback?

Original comment by chris...@gmail.com on 1 Jul 2010 at 1:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant