Skip to content
/ klog Public

A minimal script for keeping timestamped notes

License

Notifications You must be signed in to change notification settings

bentsai/klog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

klog

A minimal script for keeping timestamped notes. The name "klog" is short for "work log." The format is inspired by Brett Terpstra's doing tool, which outputs in Taskpaper format. My use is slightly different, and I don't need the Taskpaper-ness, but I do appreciate that it renders nicely in Markdown.

The klog entry format is such that each line begins with a timestamp. This means you can have multiple clients write to the file in any order because it is trivial to sort the file.

Usage

Writing

./k↩️
<Note here>↩️

This will append a line to ~/klog.md in the format:

- <timestamp> | <Note here>

For example,

- `2016-06-12 17:42:02` | Hello world! This is a really simply logger.

You can change the location of your klog by setting the environment variable KLOG_FILE.

Reading

See today's log

grep `date +%F` $KLOG_FILE

See yesterday's log

grep `date -r $((\`date +%s\` - 86400)) '+%F'` $KLOG_FILE

About

A minimal script for keeping timestamped notes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages