← Back to team overview

zim-wiki team mailing list archive

Recursive print/export of sub-pages (determined by sub-links)

 

Hi everybody,
for some time I have a strong need to print a linked hypertext document.
For instance a structured article, which has each page nested page
(+some_page) as a sub-heading "some_page". The only difficulty is printing
or exporting such linked structure pages (referenced only with
+relative_links).
So far I have tried to target this issue with modified template (attached
as Print_recursive.html) and extension of template.py with a function
sublinks(), which returns only sub-links (attached as template.py). Example
if such a structure is attached a report.zip
Is there any other suggesting, how to make this possible? It would be also
a great help for latex users, who prefer to structure and export large
document in separate pages.
There is attached an extraction (report.html), which illustrates this
approach. The only limitation is that the link itself remains and than it
creates subheading under. The solution could be separate page.body (text
excluding title and lines before an empty line) and page.metadata
(excluding title, but including all the lines before an empty line).
Illustrated in report.zip under chapter "Introduction".
Thank you for any suggestions.
Regards, JK

Attachments:
template --> *Print_recursive.html*
modified class PageProxy(object) in *template.py*
organized structure of pages (test case) --> *report.zip*
output of the template --> *report.html*

Attachment: report.zip
Description: Zip archive

Attachment: templates.py
Description: Binary data


Follow ups