Re: [Zim-wiki] Folder structure

2013-08-20 Thread Jaap Karssenberg
On Mon, Aug 19, 2013 at 8:22 PM, Svenn Are Bjerkem 
svenn.bjer...@googlemail.com wrote:

 The issue about not being able to have attachments with .txt has been
 discussed in a thread some time back. Using .txt for magic purposes in Zim
 has negative side effects. To my knowledge, all files named .txt are
 captured by Zim for page use. The same problem was encountered by Asciidoc.
 They used .txt as standard suffix, but it seems like things like github
 forced the use of .asciidoc in order to know what to do with the file. I
 think the same is kind of valid for Zim. In my opinion, Zim-formatted pages
 should have .zimwiki or .zimdoc or .zimtxt suffix to make them explicitly
 belonging to zim.

 I have issues with naming attachment directories AA-attachment as this
 prevent the possibility to put a zim notebook on top of an already existing
 directory structure. But this feature is crippled as soon as zim finds a
 .txt file not being an actual zim .txt, so I cannot currently use it that
 way. Redefining the zim suffix would help here.

 I once put some effort into changing zim to use .zimwiki instead of .zim,
 but the structure I wanted to zimify had to be restructured a bit anyway,
 so I started from scratch on the structure and skipped the patching, as I
 expected this to be a local change I had to rewind on every update of zim.



I think the folder structure and the suffix solve two different issues.

The folder structure changes puts the actual page in the same folder as
it's attachments and sub-pages. Rationale is to have all in one view when
you look with the file browser.

The suffix, or the -attachments folders solve a problem for indexing.
This is a problem I will solve differently when refactoring the index. The
idea is that zim will inspect the content of text files to determine
whether or not it are pages. I don't mind allowing alternative suffix as
well if that makes interoperability easier, but for default will stick to
.txt.

As I understand it, this discussion started out with the first issue.
Second issue requires different solutions.

Regards,

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


Re: [Zim-wiki] Folder structure

2013-08-20 Thread Klaus-Dieter Bauer
2013/8/20 Jaap Karssenberg jaap.karssenb...@gmail.com:
 [...]

 The suffix, or the -attachments folders solve a problem for indexing. This
 is a problem I will solve differently when refactoring the index. The idea
 is that zim will inspect the content of text files to determine whether or
 not it are pages. I don't mind allowing alternative suffix as well if that
 makes interoperability easier, but for default will stick to .txt.

 [...]

 Regards,

 Jaap

Just a quick list of issues that are raised by the ambigous file
extension and would require major (probably OS-dependent) pains to fix
without changing the extension:

  + No distinction from plain text files by icon (inconvenient e.g.
when viewing results of desktop search).
  + No double-click-to-open in file browsers / search results without
breaking the behaviour for non-zim .txt files.
  + ZIM must check .txt files for ZIM page format,
  - when indexing
  - when listing attachments
  - ... ?
  + When processing notebooks through an interactive shell,
distinguishing normal text files from zim page files is unviable
and inconvenient when processing them with shell scripts.

Is there some reason, why you want to keep the .txt extension? I
can't see much of an advantage.

  - Klaus

___
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


Re: [Zim-wiki] Folder structure

2013-08-19 Thread Rui Pedro Covelo
No dia 18/08/2013, às 06:11, janpacov...@centrum.cz
janpacov...@centrum.cz escreveu:

 What about adding a new folder just for attachements to the original folder 
 so they wouldn't mix with other pages?
 AA.txt
 AA-attachement/
image.png
 AA/
BB.txt
BB/
  CC.txt

 With this aproach we could have txt attachements.


 AA-attachement/  this patern name would probably have to be reserved
 and should start with '_' or so so that it would stay over other folders


That would solve the wide vs deep issue would also add another folder
you would have to go through. It's worth considering.

All this could also be made optional and configurable but I also like
how simple zim is right now...

___
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


Re: [Zim-wiki] Folder structure

2013-08-19 Thread Svenn Are Bjerkem
The issue about not being able to have attachments with .txt has been
discussed in a thread some time back. Using .txt for magic purposes in Zim
has negative side effects. To my knowledge, all files named .txt are
captured by Zim for page use. The same problem was encountered by Asciidoc.
They used .txt as standard suffix, but it seems like things like github
forced the use of .asciidoc in order to know what to do with the file. I
think the same is kind of valid for Zim. In my opinion, Zim-formatted pages
should have .zimwiki or .zimdoc or .zimtxt suffix to make them explicitly
belonging to zim.

I have issues with naming attachment directories AA-attachment as this
prevent the possibility to put a zim notebook on top of an already existing
directory structure. But this feature is crippled as soon as zim finds a
.txt file not being an actual zim .txt, so I cannot currently use it that
way. Redefining the zim suffix would help here.

I once put some effort into changing zim to use .zimwiki instead of .zim,
but the structure I wanted to zimify had to be restructured a bit anyway,
so I started from scratch on the structure and skipped the patching, as I
expected this to be a local change I had to rewind on every update of zim.

-- 
Svenn
___
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


Re: [Zim-wiki] Folder structure

2013-08-17 Thread Jaap Karssenberg
On Fri, Aug 16, 2013 at 5:39 PM, Rui Pedro Covelo rui.cov...@gmail.comwrote:

 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


Re: [Zim-wiki] Folder structure

2013-08-17 Thread janpacovsky

What about adding a new folder just for attachements to the original folder so 
they wouldn't mix with other pages?AA.txtAA-attachement/    image.pngAA/   
BB.txt   BB/     CC.txt
 
With this aproach we could have txt attachements.
 
 
AA-attachement/  this patern name would probably have to be reserved
and should start with '_' or so so that it would stay over other folders
 


___
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


[Zim-wiki] Folder structure

2013-08-16 Thread Rui Pedro Covelo
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.

Thanks!






___
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