Good evening Volker !

Thank you for your advice, code and explanations.

The status now for me is:
- most of the problems are solved (some by modifying customconfig.py)
- remaining : title conversion between wiki and PDF - major issue. I would like to use a flat file containing a simple conversion table...
- remaining : TOC construction (but for now it is a NTH - but I am eager to see later your version declared "stable")

Regarding the metabook doc, I could not find it in the "site-packages" subtree.
It is somewhere else ? Where ?

Regarding your py script, I got this message:

p...@mmm:~$ python metabookgenerator.py
Traceback (most recent call last):
  File "metabookgenerator.py", line 4, in <module>
    import simplejson
ImportError: No module named simplejson

How would I solve this ?
So I am still looking for the metabook / json format !

Finally, I am not familiar with python and php (I wrote quite complexe applications in Java, C, C++... bash... and a dozen of older strange langages, including Fortran and PDP assembler M11... some times ago).  All this to explain that I would not be a reliable contributor in Python... I would just be able to understand and fix errors in very simple programs...

Have a good night... or a good day...

best regards,

Philippe



Volker Haas wrote:
Hi Philippe

philippe gonze wrote:
  
**

    instead of:

    : [[SomeArticle ]]

    write:

    : [[SomeArticle|Display title of the Article]]


*I do not use collections. I am using mw-render and pdftk in bash 
scripts.... More convenient than UI-driven actions.
*
    
Ok, in that case I guess you really want to know more about the metabook 
format ;)
Actually there is a documentation about the metabook format in the 
mwlib/docs directory (should also be located in the site-packages dir of 
mwlib as described below for mwlib.rl)

I'll also attach a small script which constructs a json encoded metabook 
file. The input is a list of chapters, with an associated list of 
articles and their display titles.

If you constructed a metabook (with the script I attached for example) 
you can render a pdf by using the -m option for the metabook instead of 
a zipfile.

e.g.

mw-render -w rl -o test.pdf -c http://en.wikipedia.org/w -m mbook.json

One thing to note: the attached script is a somewhat quick and dirty 
hack, so don't hold me responsible for anything related to that ;)

  
 


    > - force page jump between all wiki pages
    >
    Add pageBreakAfterArticle = True to your customconfig.py as
    described in
    the README.txt of mwlib.rl

*The README.txt just mentions files named  customconfig.py and 
pdfstyles.py... but WHERE ARE THESE FILES ?
*
    

If your on some kind of linux they should be in the site-packages directory

so something like:
/usr/lib/python2.5/site-packages/mwlib.rl/mwlib/rl/pdfstyles.py

The customconfig.py file does not exist - you have to create it and then 
override the settings from pdfstyles.py.

If you checked out the sources with mercurial, the pdfstyles.py file can 
by found in the source-tree you checked out.
  

    > - specify the presence/absence of footnote documents regarding
    author
    > and/or tool
    >
    Can you clarify that please.

    > Am I asking too much ? (I also searched a way to add non-wiki
    > intersticial pages - this was solved with pdftk).
    >
    Adding non wiki pages to the pdf is not possible. Using a tool like
    pdftk is currently the only way.

*Was solved before so no more prob.*



    > And by the way what is a "metabook" ?... Where is it documented
    ? How
    > is it used ?
    >
    Explaining the purpose and usage of the metabook might get lengthy ;).
    What are you trying to do?

*I am simply writing a large private wiki (probably 200 articles, and 
I try to organize a PDF version (with title page, article numbering, 
TOC...).
*
    
ok.
Regarding the TOC: just a couple of days ago I implemented an alpha 
version of a TOC which is not used currently.
The corresponding ticket can be found at: 
http://code.pediapress.com/wiki/ticket/277 . Feel free to contribute

Regards,
Volker


  


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "mwlib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/mwlib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to