Thread Previous • Date Previous • Date Next • Thread Next |
Hi Thosrsten, thanks for the input!It is great news for me that it is possible to have zim-files disseminated around the filesystem... unfortunately I believed it impossible, so I already wrote down my crawler program that puts all the files in a unique directory. It is still a bit rough, but I hope to have it polished in a few days - if it could interest anybody I'll gladly post it here. What worries me about your approach is that it involves changing the Zim program itself, so I fear it could result incompatible in the event of a Zim upgrade - unless the developers hear our call for help and make it available as an option in the program itself. If I may ask, are you using this trick for my same need (i.e. to have an hypertext self-commenting directory structure)?
thanks! alessandro
Am Montag, den 20.09.2010, 16:51 +0200 schrieb Jaap Karssenberg: > On Mon, Sep 20, 2010 at 11:04 AM, Alessandro Magni<magni@xxxxxxxx> wrote: > > Thank you for your help! > > > > I want to ask a further question, though I fear the answer will be no: > > since the files we are mentioning should be one related to each folder, my > > ideal situation would be to have one of those positioned at each folder. > > I fear for now Zim keeps them instead positioned in one unique root folder - > > there is some workaround possible? I had the same problem here and I simply made 3 changes in zim/stores/files.py add at beginning of file: import os line 53: old: filepath = encode_filename(name)+'.txt' # FIXME hard coded extension new: filepath = encode_filename(name)+'.'+os.sep+'README.txt' # dirty hack line 83: old: elif file.endswith('.txt'): # TODO: do not hard code extension new: elif file.endswith('.'+os.sep+'README.txt'): # dirty hack Now all my page contend is stored in the files "README.txt" in directories named after the pages. Maybe you will get Problems when renaming pages... I tried to create my own zim/stores/filesindirs.py with a configurable file name, but it looks like there is no way to tell zim to use the new storage(?). regards
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / Dr.Alessandro Magni \ Electromagnetics Division / INRiM Strada delle Cacce 91, 10135 Torino (ITALIA) \ Email magni@xxxxxxxx / Tel: 0039-011-3919821 Fax: 0039-011-3919834 \ URL http://www.inrim.it/~magni / Our business in life is not to succeed but to continue to fail \ in high spirits. -- Robert Louis Stevenson ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thread Previous • Date Previous • Date Next • Thread Next |