Posts tagged with emacs

Getting the week started

It was a dark and stormy night…

Or, something like that. We woke to some rain this morning, but fortunately it does not look like there was too much out of the ordinary.

It is supposed to get pretty gnarly later on today, though, so we'll see how things progress. I've seen where Reed Timmer (facebook link) might be in our neck of the words today. That's always very, very reassuring.

Yesterday was the Thespian Banquet for the local High School and the twins lettered and received their "stars" and whatever all else goes into the Thespian Society. This is, unfortunately the last year of the current teacher as they are moving on to other larger, better things. It's always kind of bittersweet. We don't really know this teacher all that well, as this is our kiddo's freshmen year, but everybody really seems to like the individual.

This is also the last week of the current school year. Lots of Summer plans and camps and everything else will be starting up soon. I've got a handful of camp and trip scholarships that I need to get filled out (Summer Youth Theater, 2027 Band Trip, so on and so forth).

The Emacs to Pagecord module

I have done a bit of clean up on this and now have it living over on Codeberg so I can at least pull it in via package-vc-install on all my systems. That and should anybody else find it and want to use it they can do so. Getting the module installed for me is as simple as the following:

(unless (package-installed-p 'pagecord)
  (package-vc-install
   '(pagecord :url "https://codeberg.org/swrogers/pagecord.el.git"
              :branch "main")))
             
(require 'pagecord)

(setopt pagecord-blog-directory "~/repos/pagecord-blog-src")

Yes, I am currently not using use-package.

The only option that really needs to be personalized is the pagecord-blog-directory as above, but check the source as there are a number of other things that somebody may want to change.

I still want to get a keymap and maybe some completion, but other than that I'm basically "done" with it. Now it's time to move on to something else. I know I'm not ADHD (or whatever the proper term is these days), but I wouldn't be shocked if I am just a tad perhaps.

Other things

I finally finished Persepolis Rising. Now I'm just about done with the Auberon novella so I can move onto book 8 in the Expanse series, Tiamat's Wrath.

An excellent series, both in the written word and the television series. I've also got the graphic novels, which I'll read after these.

All right then, until next time.

A Quick Friday Module Update

Just a quick and to the point update on some progress around these parts.

I've added another bit to my Emacs->Pagecord blog module, something which probably should have been added sooner, in that it now properly deals with images that have previously been uploaded.

It will automatically re-use an existing attachement-sgid if an attachment file candidate has the same filename as a previously uploaded file.

This has been made easier by just using plist data files for both attachments, as well as previous posts/pages. It's just easier to filter, search and grab what I need. The option to create orgmode tables are still there, should I ever actually feel the need to use those.

Definitely took some head pounding to get this small thing working, but after separating out some of the concerns it seems to work okay.

Now just to do some cleanup.

Emacs to Pagecord

My Emacs to Pagecord module progress

Is it done? That's funny. Is software every really done?

No.

However, it is definitely usable. At least on "my computer". Ha.

One of these days I might even ask myself, perhaps even answer, the question of "why"? Though I suppose it was a learning experience, more than anything. An itch, I guess.

There are still a couple of things that I would like to get back to and finalize, though I just need a short mental break for a bit.

Currently implemented:

  • Create and update posts
  • Create and update pages
  • Embed images into pages and posts from org file (a note here being that images are uploaded via cURL, while posts/pages are uploaded via the standard Emacs URL functions - I could not get multipart uploads to work for the life of me.)
  • Pull master list of pages and posts, published or draft, to have easy access to token ids. (The idea here being for future filtering/editing of entries. It does a "best guess" at file source location as well. Best guess, seeing as posts can be made outside of Emacs. This can be either an orgmode table file, or an elisp file.)
  • Maintain a master list of attached images, including the token id.
  • Org file properties are used as frontmatter: title, token, kind, status, slug, locale, filetags, etc. The token is updated/inserted on initial posting.

Posts and Pages each have their own home directory's within the blog main directory.

The only home_page stuff that it currently does, besides fetching the token id of the homepage (or returning nil) is deleting/unlinking the current home page. That's kind of where I ran out of steam. I have the intention of using the Emacs completing-read interface alongside some of the utility functions I've got to provide a basic list of page's for the user to choose from as a home page. I just haven't gotten there yet.

Another thing that I should probably work on is an easier way to toggle the status of entries.

I'll probably work on getting this thing put on codeberg, just for giggles more than anything else. I can't say that I'd expect people to use this, it's a pretty niche crowd - especially seeing as the Pagecord Obsidian Community Plugin finally became publicly (and easily installable) available today. Which is pretty cool!

Hey, here's a pic of my almost current editing session!

Uploaded image

It's another Emacs to Pagecord post

It's getting closer now

I might be getting closer to the point that I"m comfortable with other people seeing this stuff now. Or, at least I'm not too sure how much more I'm going to add to it.

I do still want to fill out the homepage toggling feature, that's probably about the last missing part of the API that I'm aware of that I'll really need.

Image uploading and attaching seems to work - I use the URL returned from the API as opposed to the sgid, that way I can have alt text in some shape. Of course I'm not sure that the other option doesn't have alt text, so yeah.

I can do multiple image uploads in the same post, so that's nice. There are org mode table's that I keep updated with lists of posts/pages and attachments…you know, in case I want to use those token ids in the future.

At some point I'll get this put on codeberg I think, at least pushed out from my private forgejo anyhow. In case somebody else out there want to see my spaghetti code.

I'm almost happy with this…

Here's a useless image: Image of the top of the current website, Just A Page

How about a real one with Emacs and Pagecord?

Test a published post with my Emacs package

Gotta start somewhere, so this might as well be the deal.

I've been working on getting my Emacs orgmode blogging workflow via pagecord set up for a couple of weeks now.

While it's not finished in any way, shape, or form, it can do a few things at this point.

One of which is pushing my Orgmode files to Pagecord, with proper org properties and stuff, including updating the token that pagecord generates upload an upload.

I've got an attachment process set up too, but it's not yet integrated into the org-to-html-body pipeline yet.

The system keeps a master org table index of token id's and source files, to enable - in theory - an easier way to update existing posts. It lumps posts and pages into the same table, though they can live in different directory's on the source side.

It also keeps a similar table for attachments, in case they should want to be re-used.

It's been fun and super challenging getting this thing to this point, and I may at some future timeframe - once I'm done - better document it and maybe put it out in the world. My code stinks, but so far it's doing decently.