← Back to team overview

zim-wiki team mailing list archive

Re: newbie here: info request (for import)

 

On Fri, Sep 17, 2010 at 3:58 PM, Alessandro Magni <magni@xxxxxxxx> wrote:
>  sorry if it's the wrong place to ask:
>
> I just discovered this wiki and find it very promising for what I'd like to
> do - a simple way to manage my workplace.
>
> My problem - and I'd like to know if Zim can solve it - is to take my
> workplace, i.e. my work directory structure, and in some way import into the
> wiki, in such a way that for each folder in my directory structure I would
> have a Zim node.
> I really cannot do it manually, since my folder structure is a child of many
> years of work, and the current output of: find /0ale/ -type d | wc gives me
> 11875 folders :-)

As you mention zim uses plain text files for the pages. However there
is a header of a few lines on the top of each file. You can do two
things

1) Just put all text files in a folder and open that folder as a zim notebook.

Zim will miss config files and prompt you to update the notebook.
Doing so will add headers to all text files. The disadvantage is that
for such a large structure this may take a long time and maybe not so
easy to check progress.

2) First create an empty notebook and than add files using a small
script to add the headers.

Advantage is that you control the process. Disadvantage is that you
need to do a bit hacking yourself.

Couple of notes that may apply for both cases:
* To avoid waiting a long time for the index to build you can run "zim
--index /path" in the terminal to rebuild a sane index of all files.
* Any character sequences in your files that conflict with the zim
wiki syntax may have unforseen results

Of course it is wise to have backups when you try this, I would also
advise to put the zim notebook under version control before importing
the data, so it is easier to track and rollback small errors.

Hope this helps,

Jaap



Follow ups

References