PeterSmith.Org

Checking with check-ins

    I rather like the way Chris Aldrich has check-ins on his website. But my current workflow for posting isn't friendly enough to do it:

    • Take a photo (or more)
    • Create a Hugo post (in Emacs, which creates the directory as I'm using page bundles)
    • Move the photo(s) into the directory
    • Add the details of the photo's into the post
    • Publish the whole thing. Yes, I don't have continuous integration going; well I do, but only when I make a commit to git.

    There is a lot of friction involved; so much that I couldn't be bothered to do it. But technology is wonderful, ain't it.

    I've created a new section at check-ins. A pretty obvious name. I toyed with just creating regular blog posts and tagging them as check-ins, but the formatting is a little different to regular posts, and that drove my decision. That said, I think Chris is using 'regular posts' (based on the URLs he is using).

    I spent most of yesterday getting to grips with using Python to access my email provider through IMAP. Which allowed me to create a smoother process.

    • Take a photo or two
    • Email them to myself (well, a special email address)
    • My process-email.py script does some magic

      • Scan my inbox for the special email address
      • Use the subject as the title of the post
      • Create the folder
      • Save the photos
      • Create a check-in post using the body of the email, and embedding the photos
    • Publish the whole thing

    This flow seems to work for me, and I think it is probably just as easy as using an app or similar (especially once I add a tweaks that follow).

    I'm umm-ing and ah-ing about whether I should run the script periodically from cron or just do it manually once in a while.

    Things still to do. I have to manually post hoc add tags to the check-in. I think I want to embedded them in the email and parse them out. E.g., Using something like #coffee #travel in the email message, and convert them to tags.

    I would also like a smarter way to display the photos. Currently I stack them one on top of the other, but I like how Chris has done some of his. I also need to use something like srcset to get the right size image to the browser, and use a better format for images. E.g., webp.

    Finally, I'd like to surface the location. I have the GPS info from the photo's exif data and that will just take a little more processing.

    As an aside, I wondering about using this as an opportunity to create something in Go. I've dabbled a little with it in the past, but I've never had something 'real' to do with it. W


    Webmentions
    If you webmention this page, please let me know the URL of your page.

    BTW: Your webmention won't show up until I next "build" my site.

    Word count: 500 (about 3 minutes)

    Published:

    Updated: 29 Jan '23 05:17

    Author: Peter Smith

    Permalink: https://petersmith.org/blog/2022/12/15/checking-with-check-ins/

    Section: blog

    Kind: page

    Bundle type: leaf

    Source: blog/2022/12/15/checking-with-check-ins/index.org