1. 16
    How I Publish Notes web ols.wtf
  1.  

  2. 2

    I’ve been looking for a way to publish notes or thoughts for quite some time now, and this is inspiring. However, it seems to boil down to “My phone can run a script, so I now blog from my phone”, rather than being a way to quickly take notes from anywhere.

    This is more of a job for emails I think. They’re available on every platform, with the same set of features. They fit the “write once and publish” mindset of notes, and you could even “amend” notes by replying to your own email. It would be easy to do with a sieve script when self-hosting emails, but using a subject pattern of “[NOTE]: ” with filter rules could work as well (you’d need to retrieve the “notes” folder using IMAP for example).

    1. 3

      My notes sites (example 1, 2) are managed with a “write once and publish” workflow, using GitHub Actions and Zettelkasten. You edit your notes on GitHub, and it auto-publishes within a minute.

      You can give this a try instantly using this template repository: https://github.com/srid/neuron-template

      1. 2

        Thanks for creating Neuron! I’ve been using it for a few months now and really enjoy it.

        In fact, right now while I post this comment, I’m trying to build it on my new Pinebook Pro (ARM64 chip.)

        1. 2

          I’m trying to build it on my new Pinebook Pro (ARM64 chip.)

          Let me know how that goes! Daniel Kahlenberg tried to build it as well: https://github.com/srid/neuron/issues/66

          1. 1

            It’s not going that well. The PBP runs on battery, even when plugged in. The charger doesn’t deliver enough current to keep the machine charged, so I watch the battery gauge drain down. Cachix doesn’t help, since it’s all x86-64, so I’m pretty much compiling the world. GHC is the one I can’t get done on a single charge. The battery runs out before it finishes compiling!

            Apparently there’s a way to open up the case, disconnect the battery and bypass it to run directly from the charging port. I’ll try that next. (Lovely sticker inside informs me that using the bypass without disconnecting the battery will result in damage, possibly with fire and explosion. Lithium-ion is just the best, isn’t it?)

            1. 2

              As of yesterday, we have nightly linux bundle here. If GitHub Actions can build for aarch64 (looks like it can?), then we could also build an aarch64 bundle automatically. That, or perhaps you can build an aarch64 bundle manually from a VM on a powerful machine (relevant), and then copy over the bundle to your laptop for running.

              EDIT: This looks to be relevant: https://github.com/cachix/cachix/issues/295

              1. 2

                Great idea. I didn’t understand nix bundles before this. I’m building on an EC2 ARM Nixos instance now. I’m starting to appreciate Nix more… I think my previous frustration was from not being “all in” on Nixos.

                1. 1

                  Nope. I spoke too soon. Nix has defeated me once again.

          2. 1

            Ditto

        2. 1

          Thanks for the kind words, they mean a lot.

          You’re right in that it is essentially running a script on my phone to get the file there (or else scp it over if I’m on my desktop or laptop. The distinction is that the actual work is all done server side, and what the phone script does is copy the content of the iOS shortcut into a file to be processed.

          I’m still not 100% happy with it though, and I hadn’t thought of email. It’s an inspired solution because it removes the vendor-specific nature of what I have. The good thing is that regardless of the method of getting the Markdown files onto the server, the rest of the processing and site generation would work.

          1. 2

            It’s cool that you managed to setup something that works for you, regardless of the vendor-specific bits of your solution ! To be fair I’m a little jealous because while my phone is a real linux box (sailfishOS), featuring a terminal, bash, git, … I still lack a good way to automate tasks using something like your “Shortcuts” app.

            Do you still use that solution to take notes from elsewhere though ? Or you only take notes from your phone now that you have this ?

            1. 2

              The funny thing is, even though I said “from anywhere”, the only place I was bothered about was my phone. Had I been serious about the from anywhere aspect, I might have come up with a different solution. Seriously considering writing the email part to go with it!

              1. 1

                I still lack a good way to automate tasks using something like your “Shortcuts” app.

                i guess if one fiddles around with the freedesktop mime type handler stuff it could work, but that’s horrible :)

                1. 1

                  That could work, but still require to open the file manager which is hidden deep in the phone settings. I’d rather be able to put an icon on the app grid that I could tap to launch a script in $PATH for example.

                  1. 1

                    I haven’t done it but i think you should be able to just add a .desktop file pointing to your script: https://harbour.jolla.com/faq

                    1. 1

                      I never though about doing that ! Thanks for the idea !

            2. 1

              I’ve been thinking about doing something similar with email as well. I was thinking of doing a bespoke smtp server whose ip I email directly and does the processing I want. Still haven’t gotten around to it, any more than writing anything that I’d publish that way.

              1. 1

                I run my own mail server, which means I can use a specific alias to pipe incoming mails into a program, say:

                z3bra+notes@domain.tld        |/usr/local/bin/push-note.sh
                

                And that script would strip the headers (verifying sender, perhaps?), use subject to name the note, and create the file in /var/gopher/notes. Perhaps even piping it through markdown and publishing as HTML as well !

                1. 1

                  I’ve written most of this now, need to plumb it all together and write another blog post…

            3. 2

              I always really love it when ideas collide and to see how other people reach almost the same goals with completely different tooling. I actually do something nearly “identical” with my little side project stagnant. I essentially set up a bunch of stages for each step of the blog generation step and one of those is very very close to your template structure. I actually use the same thing for my real blog and my notes server which just uses get hooks to generate from stagnant at push time. I combine this with pervane and some git hooks/cron/laminar-ci and I just write my notes from my phone or desktop.

              I even use this internally at work for writing up my notes and fitting internal style guides and I often time get compliments on how good my notes look when all I do is write them in markdown and never look back haha.

              1. 1

                Your template structure is divine, really well laid out. I’ll definitely take inspiration from there as I iterate upon mine