39 lines
2.3 KiB
Plaintext
39 lines
2.3 KiB
Plaintext
CMS ETL BBQ
|
|
|
|
# What is this?
|
|
I made this to take zip files exported from Day One (the only writing app I've ever used semi-consistently) and makes them into a journal that works over gemini, gopher, and http. Featuring an index page. Tag pages. Soon, comments, maybe.
|
|
|
|
The HTTP part has been tested to work on three major classes of web browser
|
|
* Modern ones. I test on Firefox and Safari. Probably Chromium browsers work too.
|
|
* Ones that run on OS X 10.4.12, which is Tiger + a bunch of patches that includes emoji. Testing is done on OmniWeb 5.11. The main effect of supporting this is that
|
|
** I'm using `float`s instead of `flexbox`es in my CSS, and
|
|
** requesting HTML fragments with `XMLHttpRequest` for comments, instead of JSON with `fetch`.
|
|
* Text mode browsers. Tested with `lynx` and `links`. This means all my fallbacks have to work and my DOM has to be logically arranged.
|
|
|
|
# What does it do?
|
|
Given a set of entries from Day One on mac, that is uploaded as a zip file to ~/dayone/ and an empty dir ~/markdown:
|
|
|
|
$ node processDayone.js --inputZip ~/dayone/<zip> --root ~/markdown
|
|
|
|
This will:-
|
|
1. Run day-one-to-markdown script to get a set of directories each containing one front matter format markdown file
|
|
2. Load the frontmatter markdowns, and create gemtext and html
|
|
3. Process the images to be ready for distribution (strip EXIF, ensure rotation, smallify)
|
|
|
|
Note also:
|
|
* The DEPENDENCIES file discusses what's needed in the environment that the script is run
|
|
* The TODO file is my super-advanced issue tracking system
|
|
* There's no license yet
|
|
|
|
|
|
# Autoimport notes
|
|
There is a script, `check_email.py` that will check a maildir-format local mailbox for files from specified people that have a zip attachment. It's designed to be run in the local user's crontab. I'm sure this is very secure. I have it set up with all the *s (ie it runs every minute). I have an env var file that i source first before invoking the script. That env var defines the following things:
|
|
|
|
export PATH=<the necessary path for python, whatever, etc, stuff>
|
|
export JOURNAL_EMAIL_WHITELIST=<comma separated list of allowed email senders>
|
|
export JOURNAL_DIR=<the directory that contains the journal files, e.g. ~/journal>
|
|
export MAIL_DIR=<the mail dir, e.g. ~/.mail>
|
|
export ZIP_ROOT_DIR=<the place the zip files should go, e.g. ~/dayone>
|
|
|
|
|