zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #01644
Re: howto strip metadata header
On Fri, Mar 2, 2012 at 10:49 PM, Jaap Karssenberg <
jaap.karssenberg@xxxxxxxxx> wrote:
>
> You might want to use the HeadersDict class from zim.config. The read()
> method actually parses the lines and only strips lines that are actually
> headers. Much safer, because it will not change files that did not have
> headers in the first place.
>
> I would also recommend the File object from zim.fs as it does all kind of
> checking for safe reading / writing on the files. But that is for the more
> paranoid ;)
>
Just because I'm paranoid doesn't mean I haven't lost tons of data over the
years <g>
OK then I'll stick to my in-editor method for now, as I do now have a mixed
back of files with and without headers, and I don't know from programming
(what's a class? what's a method? - no please don't answer 8-)
References