Programming :: chococro - About



What's chococro?

choco.corow.net

chococro is a subdomain of corow.net where I host...notes and scattered writings. "chococro" is just a play on how "corownet" sounds like "coronet"...choco coronet...chococro...it sounds catchy but doesn't actually have anything to do with the notes.

Obsidian

Obsidian is a note-taking software - you make a vault, and in the vault you can make folders and take notes using Markdown. Despite how weirdly...corporate...and techbro-y...the website and some parts of its community feel, it's very pleasant to use and free besides. There are note-taking systems? for studying that it's suited to, but I don't actually know those and just wanted a little bit more organisation that the massive notes.txt I'd been using to store my notes for years haha. It's more appealing to me than using a blog or something to keep track because my notes are, like, one to two liners sometimes and also I wanted to be able to access them offline (and maybe keep them confidential), and plain text files without any structure is kind of a nightmare to sift through.

So, I gave Obsidian a try not quite expecting to stick with it, but it turned out to be a nice middle ground where I could continue to dump my writings into a singular notes file while I'm working through the day, but also clean it out and organise them without them getting put into places that are too obscure for me to find. In the end it isn't really THAT much more organised because it's filled with disparate thoughts and I'm not using 99% of the features of Markdown but hey! it looks good! and while I'm no stranger to HTML it's definitely a lot more convenient for focusing on writing information without fiddling with HTML tags.

chococro

I found build your own screenshot garden and thought it was a pretty cute idea - the thing is that I often screenshot things for work, or private server conversations, or things that I've paid for and shouldn't share, etc. and am too lazy to manually sort these out. The closest thing I can probably do would be to upload my notes, which have something of a similar vibe...being often filled with whatever I'm currently obsessed with and/or working on at the time.

Publish?

People can and already do publish their Obsidian vaults - there's even a built-in service for it. It's not pricey (and it looks the most visually attractive out of all the options I've seen), but...this is the way my notes are. They're not informative or connected and there aren't that many files...it's not much better than just getting the Markdown parsed into HTML and uploading those as separate files. I'd rather look for a free option (or something that I can already use) first before paying a subscription fee. Especially because it's a subscription fee, I suppose?

I found several free options that people have used to do this, but because of the way my notes are structured (which is not at all), I needed some things. Judgement criteria were:

ObsidianHtml

ObsidianHtml is a Python application that exports an Obsidian vault to HTML pages.

My initial goal was to do set things up so that I wouldn't need to remember how to export things. I'm unsure if this counts as a coding project, but I think it's adjacent at the very least! If nothing else it caused me a fair bit of frustration!!

After getting it working on the command line, I set up a git repo and subdomain on my server...set up the usual hooks so that it pulls when something is pushed...and then tried to write a bash script to do the export and push, and then had issues getting git credentials to work. In the end I configured a key pair for passwordless login, but I failed the "not too time-consuming to work out" step...

So far so good, but I was concerned that exporting/pushing on the hour might cause my PC to hiccup hourly while something was running in the background, and also, the export process always modifies the index file even if nothing else is touched, so the commit history would be filled with a lot of empty updates. The original vault (which is actually a subset of a larger private vault) would have to be monitored for changes separately, and...the easiest way to do that...would be to make the vault a git repo and use git diff to tell if there are changes. There were a couple of hiccups here (mainly that git diff does not not notice new files unless git add has already been run on them) but ultimately I got this working too.

And THEN after that I noticed it didn't have the nice little folder icons that the documentation page does and the indentation was a little odd...so it turns out I had to upgrade to v4 of ObsidianHtml...and that broke some things, and I couldn't fix the part where the config option to not automatically delete everything in the export folder kind of stopped working and kept trying to delete .git...so I had to do some restructuring...and add a little hack to copy the favicon (which was also getting overwritten) after the export was done...well it works!! It's fine!!!

The entire script works thus and is intended to run in the background every once an hour:

As of the moment of writing, the task scheduling...hasn't been working as intended...but I'll be figuring that out. It mostly works at least!!! I'm not sure when I'll be working on it next but I'd really like to do some CSS styling since it looks pretty basic right now. (It does look neat though and reminds me of the LJ I used to store my OC profiles on...)