Zim-desktop-wiki: Cannot add custom RFC822 headers and Creation-Date goes missing

Created on 1 Jun 2017  路  4Comments  路  Source: zim-desktop-wiki/zim-desktop-wiki

User story: I am a project maintainer. I need to add my own non-visible metadata to Zim wiki files, for example a "SPDX-License-Identifier" value.

Steps to reproduce:

  • Open a Zim text file project.txt in a text editor
  • Add custom RFC822 header as follows:
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
SPDX-License-Identifier: CC-BY-SA-4.0

====== Project ======
Wiki page starts here.
  • Save text file
  • Open notebook in Zim
  • Modify "Project" page in Zim
  • Save page/notebook
  • Open text file in a text editor

What should happen:

  • Custom RFC822 header persists.

What happens instead:

  • Custom RFC822 header is lost.

Notes:

  • Running Zim 0.66 from PPA on Ubuntu 17.04
  • Is there another way to add custom non-visible metadata to a wiki file?
  • Is this just another symptom of #3 ?

All 4 comments

In case #3 all headers disappear

Afraid I have not specifically tested for custom headers but will do so

I believe this may be a side effect of 8d217a5a7117944b3aee7289adb1af5a806c2a9d

Re-opening: although the format headers are preserved now (see issue #3), the Creation-Date header goes missing as well as custom headers.

Looks like a stupid mistake in the test case. Tested that re-using the same parse-tree these headers are preserved. However if page is edited a new parse-tree is set, which will not have these headers. So need to preserve them in the page object rather than in the parse-tree object.

Was this page helpful?
0 / 5 - 0 ratings