On Fri, Aug 16, 2013 at 5:39 PM, Rui Pedro Covelo <rui.cov...@gmail.com>wrote:
> Hello guys! > > I have been in love with zim since the first minute. Specially love how > easy it is to customise with python scripts and how it stores the notes in > a folder/file structure allowing me to keep other types of documents > together with the notes. This is not only tidy, it also enables me to > access my notes even if Zim is not available with a simple text editor in > any kind of device. That is the kind of flexibility I like for my notes > applications. > > There is just on tiny thing that is not perfect for me in this file > structure. I was wondering what is the reasoning behind this design. > > I think it will be better if I explain with an example: > > If I create a note A, I get a file name A.txt like this > > A.txt > > Now if create a second note B, I get this: > > A.txt > B.txt > > Creating a subpage AA under the note A causes the creation of a folder A > and the note AA inside it like this: > A > AA.txt > A.txt > B.txt > > > Something similar happens when you had attachments. If A.doc is an > attachment for note A and AA.xls is an attachment for note AA, you get this: > > A > AA > AA.txt > AA > AA.xls > A.doc > A.txt > B.txt > > > What bothers me is that I get files belonging to note A along side with > note AA and "away" from note A.txt. This means if I'm working in the > context of note A, I am editing a note file A.txt which is in the root of > this tree and editing documents inside the folder A along side with AA.txt > which I don't really need. > > If you always work inside Zim GUI, this is somewhat taken care of because > the GUI interface allows for you to be editing the note while keeping the > documents for that note visible in the same "screen". But I think this > breaks a little that flexibility I so much love in Zim. > > I was thinking about creating my own patch to solve this on my side > without affecting Zim, but I was wondering if there is anything I am > forgetting that I will break with this. And if not, it would also be > interesting to know what you guys think about this and potentially > officially change this. > The rationale for this structure is that it is optimized for "wide" structure, not a "deep" one. So I assume notebooks have many pages on the same level, but only few pages have attachments or sub pages. An alternative would be to put each page in it's own folder. That way you optimize for a "deep" structure. (Having many folders with just one file in it is not convenient.) There has been a patch / hack before that put each page in it's own folder with "README.txt" the text of the page. So you would get: AA/ README.txt image.png AAA/ README.txt BB/ README.txt etc. Can't find it back right now - not sure if it is in the bug tracker or the mailing list archive. I'm open to add this alternative folder structure, but it needs to be a clean patch that allows using both structures. To achieve this I would give the following guidance: 1/ Implement a new "store" in parallel to the current "zim/store/files.py" - e.g. "zim/store/folders.py". 2/ Allow the notebook config ("notebook.zim") to configure the store module to be used - default to the current "files" 3/ Bonus: add gui control to select the store module when creating a new notebook Should be rather straightforward to patch 1 and 2 - that would at least allow expert users to utilize this. (If you don't like the suggestion to use "README.txt" as the special name, consider putting this name also in the notebook config as an option.) Looking forward to the patch, Jaap
_______________________________________________ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp