pttk
pttk phlogit OPTIONS
pttk phlogit OPTIONS -stn STN_FILENAME
pttk phlogit provides a quick tool to add or replace phlog content organized around a date oriented file path. In addition to placing documents it also will generate simple markdown documents for inclusion in navigation.
pttk phlogit also includes an option to extract short (one paragraph) phlog posts froom simple timesheet notation file.
What follows are the options supported by the phlogit verb.
I have a Markdown file called, “my-vacation-day.md”. I want to add it to my phlog for the date July 1, 2021. I’ve written “my-vacation-day.md” in my home “Documents” folder and my phlog repository is in my “Sites” folder under “Sites/me.example.org”. Adding “my-vacation-day.md” to the phlog me.example.org would use the following command.
cd Sites/me.example.org
pttk phlogit my-vacation-day.md 2021-07-01
The pttk phlogit command will copy “my-vacation-day.md”, creating any necessary file directories to “Sites/me.example.org/2021/06/01”. It will also update article lists (index.md) at the year level, month, and day level and month level of the directory tree and and generate/update a posts.json in the “Sites/my.example.org” that can be used in your home page template for listing recent posts.
pttk phlogit includes an option to set the prefix path to the phlog posting. In this way you could have separate phlogs structures for things like podcasts or videocasts.
# Add a landing page for the podcast
pttk phlogit -prefix=podcast my-vacation.md 2021-07-01
# Add an audio file containing the podcast
pttk phlogit -prefix=podcast my-vacation.wav 2021-07-01
Where “-prefix” sets the prefix path before the YYYY/MM/DD path.
If you have an existing phlog paths in the form of PREFIX/YYYY/MM/DD you can use phlogit to create/update/recreate the phlog.json file.
pttk phlogit -prefix=phlog -refresh=2021
The option “-refresh” is what indicates you want to crawl for phlog posts for that year.
In this final example I am updating phlog posts from a simple timesheet notation file called “project-log.txt”. I am sending those phlog posts to the prefix directory “phlog” and using the author name, “Jane Doe”.
pttk phlogit -prefix=phlog -author 'Jane Doe' -stn project-log.txt
This will create individual, time stamp titled posts for each of the simple timesheet notation entries found in “project-log.txt”.