#mdbook #line #md #file #summary #command-line-tool #add

bin+lib mdbook-newday

Command line utility to add a new line for today to the top of an mdbook SUMMARY.md book

2 unstable releases

0.2.0 Sep 13, 2022
0.1.0 Nov 20, 2021

#1580 in Text processing

MIT license

9KB
135 lines

mdbook-newday

Motivation

With a lot of projects I like to keep a log or journal. Mdbook is a nice way to do that, but I find that actually entering in the day and date and creating a new file can be error prone and tedious.

What mdbook-newday does

mdbook-newday is a very special purpose command that will take a SUMMARY.mdfile and add a line to it for the current day.

The format of that line is

- [%A, %b %d, %Y](./%Y/%Y-%m/%Y-%m-%d.md), ie

- [Thursday, Jan 01, 1970](./1970/1970-01/1970-01-01.md),

If you then run mdbook serve, it will create a file at ./1970/1970-01/1970-01-01.md .

The file will be automatically given a title in the form # Thursday, Jan 01, 1970 .

Dependencies

~1MB
~18K SLoC