~afontaine/home

home/apps/blog d---------
Make Signature Removal a Little More Flexible

Turns out the idea of whitespace after the -- is a bit of a pain to keep
an eye on between email clients, so a small regex should make sure
things are a bit more flexible.

Add a little logging here while we're at it, but it's not very good
logging at the moment. It'll take a bit to work out a proper idea on how
to log.
Use a URL to Connect to the DB

For actual deployments, a URL is easier to use.
Add some Tests around Post Creation

It didn't work last time, so I added some tests to make sure it works
like I expect.

Also raise any errors to be able to capture them in logs in case it
happens again.
Add safety to editing posts without adding tags

Now tags shouldn't be overwritten when changing something not tag
related.
Set author in post changeset

It's required, and I just missed this when I added it to the schema way back.
Fix some formatting of the parsing of the message

The author is returned in the form of `{name, address}`, so let's
explicity turn that into `"<name address>"`.

Also tags should _always_ be a list.
Only show last post if there is one

`one!` throws if there is no value to return, but this should be
optional and hidden if there is not yet a post.

`one` returns `nil` if there is no value, so we use that instead.
Add Oneshot Service for Creating and Migrating DB

This should create and update the database schema before starting the
web application via a SystemD oneshot service.
Fix Formatting of Message.ex
Add Tags to Posts

Tags can be created by starting the subject line with [, ] and are
comma-separated. White space between tags is elminited, while whitespace
within tags is untouched.

Examples:

[elixir,phoenix,live view] => "elixir", "phoenix", "live view"
[elxiir, pheonix, live view] => "elixir", "phoenix", "live view"

Also displays the last 3 most recent posts for each tag, and will
definitely show duplicates.
Add Author to Blog Post

Pulls it automatically out of the From header of the email.

This supports multi-author blogs!
Fetch Posts via Slug

Makes for some fancier urls.
Add Webhook For the Creation of Blog Posts

/api/post/receive exists to receive blog posts via lists.sr.ht's
webhooks.

It utilizes a mail parsing library to fetch the post content, and maps
cleanly to our post object.
Generate Mail Context

This is where all the mail parsing will happen for posts and comments.

Right now it just creates a Post struct by parsing what the lists.sr.ht
API sends us via a web hook.
Add Slugging of Post Subjects

This will help to make nice vanity urls like /YY/MM/slugified-post-title
Generate Post Context

A bunch will be removed and changed, but this is what phoenix generated
to start.
Generate Blog Apps

These apps will handle storing and displaying posts, comments.