TOPIC: BookExportOne
#735
BookExportOne 3 Years, 5 Months ago
Hi,

I've modified BookExportOne a tad in order to kill some duplicate <head></head> and <body></body> tags. I've also changed one value in res/HtmlPrefix to keep print preview consistent (I hope. Darn IE).

Under new, I've pretty much taken out the static hdr information and replaced it w/HtmlWrap's returned string. I've used the technique in BookPrint's .prefix to add the title to hdr.

In process, I had to filter out res/HtmlPrefix (and did the same for res/HtmlSuffix - empty for now) in order to prevent the text of HtmlPrefix to be pasted near the end of the html output.

Hope this helps....
File Attachment:
File Name: BookExportOne.txt
File Size: 1677
 
 
#738
Re:BookExportOne 3 Years, 5 Months ago
Thanks for the contribution! I will look at it and merge it into stdlib.
 
 
andrew
 
#769
Re:BookExportOne 3 Years, 5 Months ago
More modifications to BookeExportOne. Book href links are now converted to anchors. This way, one is able to navigate the single file via the links. I've added a rudimentary error reporting to the end of the file. Notice that there are some broken links in the current help documentation. As usual, lots of "borrowing" of code from other modules, this time BookExport.

I've run tidy across the resulting file and have it down from 1500+ some warnings and 1 error to some 670+ warnings and 1 error.

Please feel free to comment on supplied code (especially any errors / logic mistakes / bad coding practices / etc).

File Attachment:
File Name: BookExportOne-41c4600996024691ed923f84dcf60426.txt
File Size: 7429
 
 
#770
Re:BookExportOne 3 Years, 5 Months ago
Thanks again! I will look at it.

I guess we have not been very careful with our help HTML :-(
 
 
andrew
 
#771
Re:BookExportOne 3 Years, 5 Months ago
The previous post of BookExportOne contains an older and the new version of BookExportOne. In a rush to post this before I went home, I forgot that the export function actually appends the output to the file and does not overwrite it (which I assumed during my rush).

I've noticed that tidy complains about 'unencoded' &, <, and > throughout the docs. Also, there are some anchors (see Introduction->Frequently Asked Questions) that have spaces embedded in them (not allowed by HTML standard). Should the clean up of such items be a part of this script, or should these issues be corrected in the docs?
 
 
#774
Re:BookExportOne 3 Years, 5 Months ago
I think we should fix them in the help. Some issues we might be able to fix in the import, but some would be difficult e.g. how do you know if a '<' should be < or not?

It will be nice to be able to put a single file version of the manual on the web site since this is often a useful way for people to search for something.
 
 
andrew
 
#775
Re:BookExportOne 3 Years, 5 Months ago
Actually, the printing of the manual (to pdf via cutewriter), the bombing out of the manual via print-preview, and the unavailability of the manual online is what started me to do some coding (my itch to scratch).

It's still a pain to run tidy against this one html file, the file is over 30K+ lines long and tidy seems to screw up the line numbers after some time (may be some bad HTML, may be something in tidy). I may try to ponder how to run tidy against one folder (as shown in BookEdit, no recursion - process one folder w/o sub-folders) at a time. Or process the whole book, but have the errors partitioned to the folder that they belong to. Also, tidy fusses a lot about empty elements and I don't know how to turn that off, so I may filter out these messages.