I've patched this together from several different tutorials.
from collections import namedtuple
import json
dict_list = []
# Calculate number of minutes since start of day.
# Use this with output of `remind -s` to calculate
# task duration.
GENERIC_DATE=$(date +'%b %d %Z %Y') # Example output: "Feb 23 EST 2020"
START_OF_DAY_IN_SECONDS_SINCE_THE_EPOCH=$(date --date="$GENERIC_DATE" +'%s') # That date spec provides sste at midnight.
NOW_IN_SECONDS_SINCE_THE_EPOCH=$(date +'%s')
# Use find and file to crawl for files with mime-type image/jpeg or image/png. | |
# Awk isolates file names. | |
# rjgpcom gets comments, if any. | |
# jo wraps everything up into json for jsongallery. | |
# | |
# https://jpmens.net/2016/03/05/a-shell-command-to-create-json-jo | |
# https://github.com/mariobox/jsongallery | |
This awk script splits firefox extension blocknote output into markdown (or other lwm --- just change the suffix) files. See https://addons.mozilla.org/en-US/firefox/addon/blocknote/
/^### START/ { out = $4; next; }
/^### STOP/ { next; }
{ if (out != "") { print $0 > out".md" } }