Hi Volker,


*1* Regarding the property issue... Is there anything in the python language similar to the Property class available in java ? This is very simple to use (in java), and would do the job easily...


*2* Regarding the 3rd problem (the 'mediawiki vars'). I had to introduce some code in magics.py (around line 225):

# this file is part of /usr/lib/python2.5/site_packages/mwlib..../mwlib/rl/templ/magics.py
# 8 lines inserted by PGE - see also LocalSettings.php
    @noarg
    def XMOD(self): return 'M3M'
    @noarg
    def XVER(self): return '0.9.1'
    @noarg
    def XDB(self): return 'Rescope'
    @noarg
    def XETAT(self): return 'Resom'
# (240 lines after)


I guess It would be possible - and better - to transfer this code in customconfig.py, isn't it ? And if it is possible, then it would also make sense to use some specific format in a property file. Hence my suggestion to have them called {{XMOD}}, {{XVER}},... in this same config file, as in the mediawiki edition



*3* More suggestion. Since some people (like me) would like to take adavantage of double sided printing, it should be convenient to have additional vars defined in customconfig.py. For instance, I would like to write:
    oddLeftExtraMargin=0.8 * cm
    evenRightExtraMargin=0.8*cm
And of course the PDF writing engine should use them... :-)



*4* More suggestion. In pdfstyles.py and in customconfig.py, numerous writing styles are defined, but NOT a writing style for the internal references (mediawiki hyperlinks). I would like to customize that, because now they are not enough highlighted in the text. So I suggest to define one more style hyperlinkStyle in these files... :-) :-)



*5* If you want to have an idea of my own PDF output, they are visible from... http://m3m.homedns.org/download.fr.html Works, works, more works expected on my writing side...

Best regards,

Philippe









Volker Haas wrote:
Hi Philippe,

first of all: thanks for your suggestions! We really appreciate any 
input - ideas, praise and criticism and ideally patches ;)

pg wrote:
  
(1) customization through code (customconfig.py) is working, but not 
friendly. The file location is ugly. Multiple versions exists 
simultaneously. I suggest to put all customizable vars in a property 
file. I suggest as location $HOME/.mwlib/rl/properties. I suggest a 
very simple and readable format (neither JSON nor XML). An empty or 
absent file implies default values.

    
Regarding the location of the files:
If mwlib.rl is installed using easy_install from pypi the location of 
the files is indeed a little ugly (they solely reside in your python 
site-packages directory).
But if mercurial is used that should be no problem: customization can be 
done in the directory where mwlib.rl is checked out. That directory does 
not change even if you upgrade. --> You simply have to edit the config 
file in the directory where you checked out mwlib.rl.

Regarding a different file format for customizations:
That is quite a bit of work - I guess we won't be doing that anytime 
soon. I agree that the pdfstyles.py module could be cleaned up a little: 
especially the naming of the config variables could be made more consistent.

As you suggest below, more configuration options could be added. I 
created a ticket at http://code.pediapress.com/wiki/ticket/404 where 
ideas can be collected.
  
(2) customizable vars. I suggest these (besides those already 
available in customconfig.py)
....
(3) mediawiki vars
I had to modify the magics.py file to force the visibility of 
mediawiki added variables (those added in LocalSettings.php with some 
code). I suggest to put these in the same property files suggested 
above, with a format familiar to mediawiki writers like
{{XMOD}} = M3M
{{XYZ}} = Rescope
...

    
I don't really know what we can do in this regard.

Best,
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