Re: [Zim-wiki] feedback of idea

2014-06-05 Thread Mariano Draghi
2014-06-05 12:51 GMT-03:00 Patrik Nilsson nipatriknils...@gmail.com:

 Does anybody know if it is possible to embed hidden config into a
 zim-txt-document? Then we don't need an external file for this.


I believe that every line at the beginning of a Zim document, before any
blank line, that follows the pattern
Header: Value

... is treated as a header, and it's not shown in the document.

I've just tried this, adding a dummy X-Dummy hedaer, like this in one of
my documents:


Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2012-03-01T18:33:59-03:00
X-Dummy: Hello, world!

== Home ==
Created Thursday 01 March 2012


The first 3 lines are the standard headers, then comes a dummy header of my
own, X-Dummy, then a blank line, and then the actual content of the Zim
document.

But I don't know if there's some API in the code to access any extended
headers you might add.


--
Mariano
___
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] feedback of idea

2014-06-05 Thread Patrik Nilsson
A great idea. Worth investigating! /Patrik

On 06/05/2014 06:10 PM, Mariano Draghi wrote:

 2014-06-05 12:51 GMT-03:00 Patrik Nilsson nipatriknils...@gmail.com
 mailto:nipatriknils...@gmail.com:

 Does anybody know if it is possible to embed hidden config into a
 zim-txt-document? Then we don't need an external file for this.


 I believe that every line at the beginning of a Zim document, before
 any blank line, that follows the pattern
 Header: Value

 ... is treated as a header, and it's not shown in the document.

 I've just tried this, adding a dummy X-Dummy hedaer, like this in
 one of my documents:

 
 Content-Type: text/x-zim-wiki
 Wiki-Format: zim 0.4
 Creation-Date: 2012-03-01T18:33:59-03:00
 X-Dummy: Hello, world!

 == Home ==
 Created Thursday 01 March 2012
 

 The first 3 lines are the standard headers, then comes a dummy header
 of my own, X-Dummy, then a blank line, and then the actual content of
 the Zim document.

 But I don't know if there's some API in the code to access any
 extended headers you might add.


 --
 Mariano

-- 
PGP-key fingerprint: 1B30 7F61 AF9E 538A FCD6  2BE7 CED7 B0E4 3BF9 8D6C

___
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