Zettelkasten Forum


Zettel ID format

It looks like most people use a 12 digit ID number when naming their zettel files. Something like:
YYYYMMDDHHMM.

I have been using this format, but I find it hard to scroll through my files in the Finder. In the screen shot below, you can see that much of the title is chopped off for each zettel. Plus, such a long ID number seems to have a lot of redundancy in it.

I have been experimenting with shorter ID numbers. I like this 6 digit format:

YYMNNN.

This combines a two digit year with a one digit month and a three digit increment. So for instance, my seventh zettel in May would have the ID 195007. For the months October, November and December, I would use O, N and D instead of a number. So the 204th zettel in November would be 19N204.

This system limits you to 999 zettels in a month, but that isn’t a problem for me. Are there any other issues I should consider before implementing this? Has anyone experimented with other ID number formats?

Comments

  • Initially, I used incrementing counters for parts of the ID, too. Because the tooling was so bad, I had to manually create the ID. Got on my nerves rather quickly, so I resorted to an always-unique timestamp.

    Author at Zettelkasten.de • http://christiantietze.de/

  • I use a whole different system; I've off-loaded the description to another post, as the post is a bit lengthy. TL;DR: I normally don't use time-stamped UIDs, as they're too long ; instead, my IDs are a mixture of a descriptive part and UID part that can include a date or initials of the referenced ressource. It also makes Folgezettel and weak connection via note proximity possible.

  • Note IDs are like permalinks. Having a stamped identifier that doesn't change means you can find it universally. However, that doesn't mean it's automatically very human readable or friendly to work with.

    Sequential numbers are easier to read, easier to generate and reference when on paper, and create some chronological connection. It's how a paper Zettelkasten works; just look at what the last number is and create a new one.

    With digital ones, you could have ID collisions when syncing. That's why you see timestamps as a recommended ID.

    It seems like a script could find the next ID in a sequence for quick desktop entry. (All that said, I use timestamps for IDs in my smart notes system.)

    My GTD (Getting Things Done) system is mostly paper, and I considered a way to track sequential numbers for project IDs without having to flip to an index to see the last number that I used. It ended up unnecessary. But the idea was to keep a quad-ruled index card like a punch card to tally which is the next available number in the sequence. Keep the card in portrait orientation, number the columns right-to-left from 0 to 9, and put a horizontal line to chunk the top 5 blank rows from the bottom 5 blank rows. Then starting in the top-right and working down, put a dot in the square every time you burn a new ID in the sequence. If you go over 100, put the hundreds digit in the header of the next card you prepare. At a glance, you can translate the tally dots into a number.

  • @JustinW80 The method for tracking the next ID seems good. Thanks for the tip, I will try that out.

  • I have written a Mathematica function to generate the file names (and IDs) for the zettels:

    fileNameGen[title_String]:=Module[{months,yy, m, num,n},
      months={"1","2","3","4","5","6","7","8","9","O","N","D"};
      SetDirectory["/Users/jack/Library/Mobile\ Documents/27N4MQEA55~pro~writer/Documents/zk"];
      fn=FileNames[];
      yy=StringTake[ToString@DateList[][[1]],-2];
      m=months[[DateList[][[2]]]];
      n=(Length@Select[fn,StringMatchQ[#,StringJoin["*",yy,m,"*"]]&]+1);
      num=ToString@NumberForm[n,2,NumberPadding->{"0", ""}];
      StringJoin[yy,m,num,"_",title,".txt"]
    ]
    

    It works by counting all of the zettels created in the current month, and then incrementing that value by 1 to generate a new ID in the form of YYMNNN. A separate function creates the zettel file:

    newZettel[title_String]:=
      Export[
        fileNameGen[title],
        StringJoin[
          "# ",title,"\n",
          "Date: ", DateString[], " \n",
          "Tags: ", "\n"
        ]
      ]
    

    This function uses fileNameGen to create the file name, then puts the title, date and a Tag label in the file.

  • I would prefer that this be a builtin and set in Preferences. One could choose 0) nothing, 1) datetime unique sequence, 3) increasing sequence ... cheers, drl

Sign In or Register to comment.