Posts tagged with org

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.