Generating a timeline view of a zettelkasten

edited August 2020

I was missing a timeline view of my zettel files. I'm not naming them with a timestamp, because Obsidian allows me to easily link with any kind of filename. But also if my files were named with a timestamp there would be information missing, e.g. what was my activity on certain days?

So I came up with a small tool to improve the situation regardless of the tool you're using for your zettelkasten, as long as you're storing your zettels as Markdown .md files. Here's how the output looks:

If you like, download the latest release of Markdown File Timeline (mft) from its GitHub repository.

It's a .NET Core application. To run it follow the installation instructions in the readme.md file.

You can page through all note files listed in reverse chronological order in a week/day/file hierarchy. If a filename is not very informative, then an excerpt of the file content is shown in addition.

Enjoy!

PS: As you can see, in my file hierarchy I have daily notes (with a date as the filename) and "real zettel", which have a more informative filename. They are separated into different directories. But this hierarchy is discarded in the timeline view where I'm interested in "When did I work on what?" regardless of location/kind.

• NICE!

I am a Zettler

• This looks sweet, thanks for sharing!

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

• edited August 2020

This looks interesting. I do something similar but the stats are not quite as granular as your demo. What does the (8 line(s)) refer to? Total # of lines? Maybe the number of lines modified on that day? The number of lines added?

Here's what mine looks like for 20200816. Having this broke down by day as you do might point at days I could be more intentional in my zettelkasting.

Post edited by Will on

Will Simpson
“Read Poetry, Listen to Good Music, and Get Exercise”
kestrelcreek.com

• It‘s just the number of lines in a file to give an idea of the size of the note. Bytes are not very informative. Words or characters would have done, too.

Some overall stats are nice. I might add that at some point. For now, though, to see what I wrote when, is the most important info right now. It somewhat adds a dimension to a simple list. And it makes my notes more tangible then a couple of numbers. The timeline is not about progress for me.

• Unfortunately, don't work with Cyrillic filenames.

• Hm... strange. Because it works for me:

Filename in macOS Finder:

Output of mft:

Don't know what's the difference between your cyrillic chars and mine. If you like, upload a file with such a filename and just a single line in it and I check how that's handled on my Mac.

• Win 10 here. File is created with Sublime text. I don't have any other fonts installed, just standard Windows fonts.
Same result.

I used file in attach. this file (Gdrive link)
Very useful tool, I check it in my Win 10 installation, as well as in VM, fresh and clear Win install.

Edit: Forum told me that I'm not allowed to upload files in this category. :-(

• @ralfw said:
It‘s just the number of lines in a file to give an idea of the size of the note. Bytes are not very informative. Words or characters would have done, too.

Some overall stats are nice. I might add that at some point. For now, though, to see what I wrote when, is the most important info right now. It somewhat adds a dimension to a simple list. And it makes my notes more tangible then a couple of numbers.

Nice addition showing the size of each note by number of lines. This sorting by date is crudely seen by using the date in the UID but your view is more refined. Indeed this is a more in depth glance at one of the aspects of their structure that is far more tangible than just a number of the total created. I only showed part of my stats report. Here is the stats for 20200714

The timeline is not about progress for me.

This is a subtle but important lesson for me. I find sometimes I get too focused on progress and tracking it as apposed to looking and listening to, in this case, the timeline. Thanks.

I wanted to jump in and give mft a try but I got stymied at exec the dll. Below is the output. If you see something simple, let me know and I'll give it a try. My coding chops are not up to .net.

ShopLaptop:mft will\$ dotnet exec mft.dll /Users/will/Dropbox/zettelkasten
Unhandled exception. System.IO.FileNotFoundException: Could not find file '/Users/will/Dropbox/zettelkasten/epub/about.md'.
at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func2 errorRewriter)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.Linq.Enumerable.SelectArrayIterator2.ToArray()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable1.GetEnumerator()+MoveNext()
at System.Linq.Lookup2.Create(IEnumerable1 source, Func2 keySelector, IEqualityComparer1 comparer)
at System.Linq.GroupedEnumerable2.ToArray()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable1.GetEnumerator()+MoveNext()
at System.Linq.Lookup2.Create(IEnumerable1 source, Func2 keySelector, IEqualityComparer1 comparer)
at System.Linq.GroupedEnumerable2.GetEnumerator()
at System.Linq.Enumerable.SelectEnumerableIterator2.ToArray()
at System.Linq.Buffer1..ctor(IEnumerable1 source)
at System.Linq.OrderedEnumerable1.GetEnumerator()+MoveNext()
at mft.Display.Render(IEnumerable1 weeks)+MoveNext() in /Users/ralfw/Projects/Programming with Ease/MarkdownFileTimeline.github/src/mft/mft/adapters/Display.cs:line 26
at mft.Display.Paginate(IEnumerable1 lines, Int32 pageLen)+MoveNext() in /Users/ralfw/Projects/Programming with Ease/MarkdownFileTimeline.github/src/mft/mft/adapters/Display.cs:line 56
at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at mft.Display..ctor(IEnumerable1 weeks, Int32 pageLen) in /Users/ralfw/Projects/Programming with Ease/MarkdownFileTimeline.github/src/mft/mft/adapters/Display.cs:line 21
at mft.Program.Main(String[] args) in /Users/ralfw/Projects/Programming with Ease/MarkdownFileTimeline.github/src/mft/mft/Program.cs:line 14
Abort trap: 6


Will Simpson
“Read Poetry, Listen to Good Music, and Get Exercise”
kestrelcreek.com

• Hi, @Will!

I'm at a loss regarding the error.

You're running the program correctly.

The error log lines

at System.IO.File.InternalReadAllLines(String path, Encoding encoding)


point at code, trying to read in the whole file. At that point, the filename is known: /Users/will/Dropbox/zettelkasten/epub/about.md. That means, it has been found by some other part of the program, ie. the file exists.

But then the error message "Could not find file..." does not make sense.

Very strange!

I tried to reproduce the error by also using an absolute path to my .md files. That worked just fine. So it does not make a difference. (And it shouldn't 😉 But it was the only difference I could see compared to how I'm using the program.)

So, I'm very sorry. Can't really spot the root problem. If you like, try it again with different paths/subsets of your file tree. Maybe it's something specific with this file? Does the error occur only for the first file in a directory? There's a few things one could test. I'd like to help you - but I understand the whole process might not be fun for you. And we should take it to another communication medium.

Such a simple tool - and still we're going down the usual support rabbit hole 🤣 I'm sorry.

Output from mft:

In Finder:

So there seems to be something off different with how Windows handles/stores non-latin characters compared to macOS.

I guess, at this point, I'm unable to help you. I'm sorry.

If you like, download this file of mine with a cyrillic (Bulgarian) filename and try it on your machine: https://www.dropbox.com/s/us4c0tw4sz931us/здрасти.md?dl=0

It's sad to see that even in 2020 text across operating systems/applications still isn't a no-brainer.

• I think, further support questions should be sent to me as direct messages via the forum. Just click on my name and send a message.

• @ralfw The problem was mine as we suspected. Broken symlink on the file about.md` cased the program to puke. Fix now and mft runs great.

Will Simpson
“Read Poetry, Listen to Good Music, and Get Exercise”
kestrelcreek.com

• Glad to hear it wasn't mft's fault ;-) But if you like check out the latest release. It should at least not crash anymore but inform about the problem or show a file w/ 0 lines.