Wednesday weblog: Toots ending 2024-10-09

| review

Here's what I've been posting on @sacha@social.sachachua.com:

View org source for this post

Yay Emacs 5: Tweaking my video workflow with WhisperX and subed-record

| emacs, subed, yay-emacs

I'm tweaking my video workflow. I use Orgzly Revived on my Android phone to write the text, and I use Easy Voice Recorder to record it. Syncthing automatically copies both to my laptop. I use WhisperX to transcribe my recording, and I use a little bit of Emacs Lisp to figure out timestamps for each word. I edit this to fix errors. I can even rearrange things and get rid of umms or ahs or anything I don't want.Then I use subed-convert to turn it into a VTT file. I can tweak the start and end times by looking at the waveforms. Then I add comments with the visuals I want. I can add images, animated GIFs, or videos, and they're automatically squeezed or stretched to fit. I can also have them play at original speed. Then I set up open captions and use subed-record-compile-video. Tada!

Links:

You can watch this on YouTube, download the video, or download the audio.

View org source for this post

2024-10-07 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, communick.news, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View org source for this post

Wednesday weblog: Toots ending 2024-10-02

| review
Tech
  • Server upgrade 2024-10-01T19:34:35.535Z

    Okay, my VPS should now be on Ubuntu 24.04 LTS. Things I bumped into along the way:
    - Had to reinstall MySQL for some reason. Fortunately kept all the data, although I did need to recreate directories for logs and sockets.
    - Reinstalled my Docker images. Fortunately kept all the data on disk, so that was fine. Along the way, upgraded my mongo DB from 4.2 to 4.4 to 5 to 6 to 7.
    - Panicked when gotosocial was taking a while to start up, interrupted it and tried again, ended up with a partially-migrated database and worse problems. Fortunately had a backup of the db, so I restored and patiently waited.

  • Eleventy upgrade 2024-09-30T17:35:26.858Z

    I managed to get my blog upgraded from Eleventy 2 to Eleventy 3.0.0-alpha.20. find-dired and wdired were useful for finding all the .js files and turning them into .cjs.

  • Supernote colour template 2024-09-27T03:05:15.033Z

    I finally got around to checking if the #Supernote can handle colour templates despite only letting me draw in black, white, and two shades of gray. It keeps the colour in the export! That means I can make a template that uses a specific color to make a grid, which is then easy to strip out of it with Python. That saves me 3-6 taps and reduces friction even further. Looking forward to experimenting with that at the next opportunity.

  • Blog tweaks and other code - 2024-09-26T17:02:17.804Z

    A couple of little tweaks:

    - I re-added a "Random" link to my blog header, nudged by https://news.ycombinator.com/item?id=41647654
    - I added a sitemap.xml , so let's see if search engines pick stuff up
    - I wrote some code to move Org properties from a subtree to a parent
    - I changed my code for inserting the latest file from my Supernote A5X e-ink device into Org Mode to also recolor, recognize text, rename, and archive the file

  • Setting up hibernate 2024-09-26T00:08:50.365Z

    I followed the directions at https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/ to set up a swap partition and enable hibernate. Now I can pause whatever I'm doing in Linux in order to switch to Windows to play Minecraft Bedrock with the kiddo, and then switch back to Linux afterwards.

Life
View org source for this post

2024-09-30 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, communick.news, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View org source for this post

Tiny chunks

| productivity, life

I want to get better at working in tiny chunks. Some of the things I find hard are:

  • getting incomplete thoughts out of my head when the kiddo interrupts so that I don't get grumpy (because of the Ovsiankina effect)
  • managing the stack of interrupting tasks and yak-shaving temptations
  • still making time for larger projects or things with less-immediate or more uncertain payoffs

Some general ways to improve:

  • Reduce friction so that more things can fit in less time.
    • Take notes
    • Improve workflows and tools
    • Create templates
  • Build momentum: focusing several chunks on one project to minimize context switches and make more progress
  • Lower expectations and split things up.
  • Start with a rough cut and then refine.
  • Use different types of work:
    • Organizing information can be easier than thinking up something new
    • Recognizing things from a list can be easier than recalling them from scratch

How can I get better at using tiny chunks in different aspects of my life?

  • Code:
    • Now that I'm on a more powerful computer, I'm looking forward to learning how to take advantage of LSP, completion, and other modern conveniences.
    • I can replace social media doomscrolling with reading APIs, guides, and code samples.
    • I can take more notes and review them.
  • Writing:
    • If I sketch my thoughts, that can help me think through things in a more nonlinear way at the beginning. Mindmaps and sketchnotes might actually be easier than using text outlines, since I can do them off my computer.
    • Dictation might help me turn other pockets of time into writing time, and then turn computer time into editing time.
    • Improving my workflows makes it easier for me to get the text out into a blog post that has a sketch or a video or a screenshot.
  • Drawing:
    • I can ask smaller questions so that I can get to an answer faster. I also don't have to flesh out the full thought in the drawing - I can use dictation or writing to add more details.
    • I can crop the image to remove the pressure to use the full page. I used to draw my thoughts on index cards. That was a good size for a small thought, and they were easier to build up into larger chunks.
    • I can use visual organizers, metaphors, and other structures to help me think through things. That might also give me additional insights.
  • Bigger projects: One of the things that sometimes frustrates me is having bigger projects that I can't figure out how to fit into smaller segments, or that take a lot of setup time and therefore tend to get deprioritized in favor of things with more immediate payoffs.
    • I have a few 1.5-hour chunks of focused time because of A+'s virtual school, and I might be able to reserve more time eventually. It might be good to have that time when I'm not prioritizing short tasks and quick wins. Aside from that, if I get focused time in the evening, the trade-off is usually that A+ binge-watches YouTube videos when I'm not focusing on her. Sometimes I'm okay with this because I really want some thinking time. It's better when I'm getting that focused time because she's off doing something with W-, though.
    • I tend to work on whatever I've been thinking about lately (availability bias), but it might be good to review longer-term projects/interests to keep them on my radar or make peace with archiving them.
    • Even the stuff that feels like very slow progress can be worthwhile.
  • Life:
    • Sometimes I feel a little distracted by things I want to do, but it's worth figuring out how to put stuff aside so that I can play. Bluey has plenty of examples of short games that could be fun to play with A+.
    • There's always time to work on health. Sometimes doing a single pushup makes it easier to do another, especially when the kiddo jumps in and starts exercising too.
    • Similarly, a small chunk of time is great for tidying.
View org source for this post

Using Emacs Lisp to export TXT/EPUB/PDF from Org Mode to the Supernote via Browse and Access

| supernote, org, emacs

I've been experimenting with the Supernote's Browse and Access feature because I want to be able to upload files quickly instead of waiting for Dropbox to synchronize. First, I want to store the IP address in a variable:

my-supernote-ip-address
(defvar my-supernote-ip-address "192.168.1.221")

Here's how to upload:

(defun my-supernote-upload (filename &optional supernote-path)
  (interactive "FFile: ")
  (setq supernote-path (or supernote-path "/INBOX"))
  (let* ((boundary (mml-compute-boundary '()))
         (url-request-method "POST")
         (url-request-extra-headers
          `(("Content-Type" . ,(format "multipart/form-data; boundary=%s" boundary))))
         (url-request-data
          (mm-url-encode-multipart-form-data
           `(("file" . (("name" . "file")
                        ("filename" . ,(file-name-nondirectory filename))
                        ("content-type" . "application/octet-stream")
                        ("filedata" . ,(with-temp-buffer
                                         (insert-file-contents-literally filename)
                                         (buffer-substring-no-properties (point-min) (point-max)))))))
           boundary)))
    (with-current-buffer
        (url-retrieve-synchronously
         (format "http://%s:8089%s" my-supernote-ip-address supernote-path))
      (re-search-backward "^$")
      (prog1 (json-read)
        (kill-buffer)))))

HTML isn't supported. Text works, but it doesn't support annotation. PDF or EPUB could work. It would make sense to register this as an export backend so that I can call it as part of the usual export process.

(defun my-supernote-org-upload-as-text (&optional async subtree visible-only body-only ext-plist)
  "Export Org format, but save it with a .txt extension."
  (interactive (list nil current-prefix-arg))
  (let ((filename (org-export-output-file-name ".txt" subtree))
        (text (org-export-as 'org subtree visible-only body-only ext-plist)))
    ;; consider copying instead of exporting so that #+begin_export html etc. is preserved
    (with-temp-file filename
      (insert text))
    (my-supernote-upload filename)))

(defun my-supernote-org-upload-as-pdf (&optional async subtree visible-only body-only ext-plist)
  (interactive (list nil current-prefix-arg))
  (my-supernote-upload (org-latex-export-to-pdf async subtree visible-only body-only ext-plist)))

(defun my-supernote-org-upload-as-epub (&optional async subtree visible-only body-only ext-plist)
  (interactive (list nil current-prefix-arg))
  (my-supernote-upload (org-epub-export-to-epub async subtree visible-only ext-plist)))

(org-export-define-backend
    'supernote nil
    :menu-entry '(?s "Supernote"
                     ((?s "as PDF" my-supernote-org-upload-as-pdf)
                      (?e "as EPUB" my-supernote-org-upload-as-epub)
                      (?o "as Org" my-supernote-org-upload-as-text))))

Adding this line to my Org file allows me to use \spacing{1.5} for 1.5 line spacing, so I can write in more annotations..

#+LATEX_HEADER+: \usepackage{setspace}

Sometimes I use custom blocks for HTML classes. When LaTeX complains about undefined environments, I can define them like this:

#+LATEX_HEADER+: \newenvironment{whatever_my_custom_environment_is_called}

Now I can export a subtree or file to my Supernote for easy review.

I wonder if multimodal AI models can handle annotated images with editing marks…

This is part of my Emacs configuration.
View org source for this post