minor edits and a few rewords

+7 -5
posts/This post was published from a git repository and here's how I did it.md
··· 34 34 Running it as part of CI is also really straightforward, I was pleasantly surprised to find out. It was a lot easier than I expected to get goat to authenticate with my PDS and [make a post on BSky](https://bsky.app/profile/m1emi1em.dev/post/3lwenaigagl2b) when I did a [test push to main on a repo](https://tangled.sh/@m1emi1em.dev/test-repo-please-ignore/pipelines/760/workflow/build.yml). 35 35 36 36 37 - Making a record for a blog post on WhiteWind with goat is slightly more involved than a bsky post. But it's just a matter of making a JSON file and feeding that to goat so it's still very easy. 37 + Making a record for a blog post on WhiteWind with goat is slightly more involved than a BSky post. But it's just a matter of making a JSON file and feeding that to goat so it's still very easy. 38 38 39 39 40 40 # Defining _exactly_ what I want to do ··· 55 55 Record keys, or rkeys, are used to reference a specific record in a collection in a repository on a PDS. They are most commonly TIDs generated at the time the record was created - this is what BSky uses for most (all?) of their records. 56 56 57 57 58 - My idea for tracking which records correspond to which files in the git repo was: write my own records in my own, separate collection on my PDS that contained the local file path to a source `.md` file using the same rkey as the WhiteWind blog record created from that file. 58 + My idea for tracking which records correspond to which files in the git repo was: write my own records in my own, separate collection on my PDS that contained the local file path to a source `.md` file using the same rkey as the WhiteWind blog record created from that file. An example of one of these records be viewed through PDSls [here](https://pdsls.dev/at://did:plc:4ijrxutxndrcbmwd2bzchsum/dev.m1emi1em.blog.postRef/3lwjxlkcurs4i). 59 59 60 60 61 61 WhiteWind, at least at the time of writing, doesn't do any validation when getting stuff from a user's PDS that a record has a valid TID as an rkey like [their lexicon would imply](https://github.com/whtwnd/whitewind-blog/blob/main/lexicons/com/whtwnd/blog/entry.json#L8). So it's totally possible to just create a post with anything that's a valid rkey, but that seems sketchy to rely on and would break if WhiteWind ever actually validated that. Which meant that, if I didn't want to rely on behavior that shouldn't even work in the first place, I had to figure out TIDs. 62 62 63 63 64 64 Fortunately TIDs are relatively straightforward, and even more thankfully when I was posting occasionally on BSky throughout the process of writing a script to do all of this, @zed.earth pointed me in the direction of [his own TID library for Clojure](https://github.com/BlushSocial/atproto-tid) which wasn't too difficult to adapt into what I ended up writing to glue all of this together. 65 + 65 66 66 67 # Clojure? 67 68 ··· 78 79 # But does it work? 79 80 80 81 81 - Mostly, I think? I haven't tested it significantly but it _seems_ to work and that's good enough for a simple proof of concept. You can view the CI logs on tangled [here](https://tangled.sh/@m1emi1em.dev/test-repo-please-ignore/pipelines) and, hopefully, should also be reading this post just fine on WhiteWind as well. 82 + Mostly, I think? I haven't tested it extensively but it _seems_ to work and that's good enough for a simple proof of concept. You can view the CI logs on tangled [here](https://tangled.sh/@m1emi1em.dev/test-repo-please-ignore/pipelines) and, hopefully, should also be reading this post just fine on WhiteWind as well. 82 83 83 84 84 85 The script for all this is [publish.bb](https://tangled.sh/@m1emi1em.dev/test-repo-please-ignore/blob/main/publish.bb) in the root of the repo this was published from (if you really want to read the messiest Clojure possible). ··· 92 93 93 94 I'd also like to refactor and rewrite my script at some point to make it easy for others to use to also publish to WhiteWind from a git repo if they wanted to. There's also a few other things I'm interested in figuring out and adding to it as well: 94 95 - Sharing a new post on BSky on post creation. This is super doable. 95 - - Figuring out a better way to handle post titles and post visibility. Right now the script just makes a post title by trimming the `.md` from the end of the filename and is also hardcoded to create the record with a public visibility. Something like Obsidian-style YAML frontmatter to specify a post title and visibility seems like a good solution? But I haven't thought to hard on how to best do this. 96 + - Figuring out a better way to handle post titles and post visibility. Right now the script just makes a post title by trimming the `.md` from the end of the filename and is also hardcoded to create the record with a public visibility. Something like Obsidian-style YAML frontmatter to specify a post title and visibility seems like a good solution? But I haven't thought too hard on how to best do this. 96 97 - WhiteWind supports embedding images into posts via blobs on a post's record. What I have right now does not account for this or do anything to allow it. It would be nice to have this. 97 98 98 99 99 - Somewhere along the way I was also messing around with making raw HTTP/XRPC requests to my PDS which were rather tedious to wrap so I settled for just wrapping goat for this project. But briefly messing around with that has had me considering exploring automating the generation of functions to wrap XRPC from lexicons in Clojure. Which sounds like a very ambitious project, especially when I currently don't know very much about atproto overall. But it does sound like it'd be fun to figure out. 100 + Somewhere along the way I was also messing around with making raw HTTP/XRPC requests to my PDS which were rather tedious to work with so I settled for just wrapping goat for this project. But briefly messing around with that has had me considering exploring automating the generation of functions to wrap XRPC stuff from lexicons in Clojure. Which sounds like a very ambitious project, especially when I currently don't know very much about atproto overall. But it does sound like it'd be fun to figure out. 100 101 102 + I should probably also figure out how to do anything lexicon-related besides just telling the PDS to not validate against one when modifying or creating records too. 101 103 102 104 --- 103 105