On Thursday, February 6, 2020 at 11:04:30 PM UTC-5, andyjim wrote: > > attached is my first draft for a zettel format. >
Thanks. Here's my first cut at a format. It's designed to be easy to type and easy to read. All the keyword data items are optional. I can tell you that it will be almost trivial to write a parser for this format. It might not take more than ten or 20 lines of code, depending on what data structures you want to parse it into. There is a minimum of extraneous marks and structure, so as to distract from the text as little as possible. I use a semi-colon ";" as the preferred comment mark because it is easy to type - being lower case; and I suggest the alternate "#" because many programmers are used to typing and seeing it even though it's upper case. Oh, and @andyjim, would you mind adding the extension ".txt" to your plain text files? It makes life a little easier for other people (and the OS) because we don't have to guess what format they are in. For example, instead of naming a file "zettel_format_1", name it "zettel_format_1.txt". -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/08f2e766-aa32-485b-bcbc-a5037b660ea4%40googlegroups.com.
title: expermental zettel format 1 id: t-zformat-1 index-term: zettel/format ; this is a comment line # And this is a comment line. ; order of these keyword entries is not important. ; cite: for citations to published sources ; url: for URLs to relevant web pages. ; rel: for relations to other zettels. ; parent: id of parent zettel. ; child: id of child zettel. date: 2020/2/5 ; time: 1830 ; Body of note is not introduced by any identifier. ; All data items are optional. format: text This zetel format contains a number of structured one-line data items. They are introduced by a keyword followed by colon. The line must start with the keyword. Keywords may be repeated with different data, so that there may be more than one "rel", for example. Only lines before the note text will be considered keyword lines. All keywords are optional. If missing, the title and id will be automatically generated by the system. **Unknown keywords:** The entire line will be ignored. **Pros**: Easy to type, easy for humans to read. Easy to parse. **Cons**: Neither Markdown nor RsT processors handle the one-line keyword entries as separate lines. Lines like that are supposed to be separated by blank lines. But that leads to an excessively long note, and is irritating to read and type. Presumably this could be handled by a pre-processor.
