I seem to be in the middle of trying to build something similar to this. I want it to run on an android phone but otherwise the same sort of idea, offline-first information I want access to.
There's some weirdness around android browsers refusing to load html from the phone itself on security grounds. The OP uses a "progressive web app" which seems to be the proper way to do this at some point in the past, but firefox has killed that for some reason. Thus the most difficult part of the project seems to be persuading my phone to render html without copying the files to some server (or running a fileserver on the phone itself, to look at from the phone, which seems absurd).
What I can offer for people stumbling down the same path:
- Obsidian works fine as for ad hoc authoring of markdown while walking around
- It is known on stack overflow that markdown can't be sanely parsed into an AST
- That cmark binary + some foreach-file style script will turn markdown into html or xml. If you choose makefile and put spaces in the name of files you'll have a moderately bad few minutes cursing your tools
- Given that output xml/html, you can build whatever other html you see fit. I'm doing that with xslt but people are telling me not to
- That html can be written back to the obsidian vault and opened by a phone browser (at least if it's a single file)
- Obsidian doesn't really do headless, but leaving it running on one machine which repeatedly calls "make" to write the *.html files back into the vault works fine
- CSS thus far appears to be required, I was really hoping to annotate the html instead
> There's some weirdness around android browsers refusing to load html from the phone itself on security grounds
OP here - I have been able to open single .html files on Android (browser uses 'content://' and not HTTP in the address bar; my initial attempt at a portable mobile knowledgebase was FeatherWiki, which is single-HTML. For HTML pages that referenced scripts or external images, it would only work on Android if I had an HTTP server app running. The SimpleHTTPServer app on Android is free and works for this.
Yep. My idea is to edit things using the obsidian android app while away from desk, an x86 box somewhere notices the change and rebuilds the static website. I'm using obsidian's built in sync so writing the html back into the vault is an easy redistribution method. There's a flaw - when the network is down, I can edit things, but I won't see the update - but fixing that involves dealing with running code directly on my phone and thus far I don't have the patience.
There are a number of simple wiki programs out there that let you do notes, cross link / reference pages, etc. tiddlywiki is pretty popular. Check out Redbean for the easiest setup.
> In the 1980s, the home computer industry was so new that most computers came with a programming environment that was easily accessible to the end-user. There was so little software out there, users were expected to build their own little programs.
There is a piece of that sentiment that is probably valid, but come on. Python is pre installed basically everywhere now. On a Mac? You get Python and PHP. On any machine, the world is so interconnected that you can get the language of your choice in seconds.
Maybe it is easier to find software now that so much of it has been written, but getting access to a compiler that suits your needs/styles/whatever is comically easier.
You aren’t limited to vendor specific Basic, or paying out the nose for something like Borland C
I think if it wasn't for free software, many companies would lock up programming tools like the game consoles.
for example, python on mac is a dud. I believe 2.7 and I have heard grumblings about it going away. Apple wants you to buy your code, and if you want to write code, to use the languages they are in control of as a separate download.
I'm not really sure what you are strongly disagreeing about.
The cat is out of the bag. Don't want to use python? You've got perl. PHP. And those are just the ones installed by default. Don't like that? You've got bash and zsh.
> Apple wants you to buy your code, and if you want to write code, to use the languages they are in control of as a separate download.
I haven't seen Apple putting a barrier up to running ANY other code beyond Swift/ObjC, have you? Because I've never had any issue on MacOS running golang, python, or basically anything else I could dream of, especially once homebrew is installed. I build code on an M2 mac on Python 3.12 basically every day.
On linux, you can't even install packages on many distros without python. On Windows, you have similar stuff installed, as well as things like Powershell.
The point is, all this software exists because the variety in programming languages makes creating apps of all kind more approachable to the normal person. No longer do you need to know ASM or C to make a functional app for anything you want.
I'm just saying that it's a bit disingenous to say anybody would have problems accessing a compiler of some sort on a modern system, and there are multiple functional ones often installed by default.
> but I don't see apple really supporting you writing code.
I'm sorry.
There is no part of this that I can call intellectually honest.
I guarantee there are more members of the Fortune 100 that are developing on Apple hardware that have ZERO issues developing in anything that's not actually MacOS targeted.
To the point where even suggesting this is laughable
> Python is pre installed basically everywhere now
Perhaps, but every single Python tutorial I came across when I tried to learn it said to avoid the built-in version, and run it through a VM instead so there woouldn't be any conflicts between v2.7 and v3.
As a learner, this wasn't helpful, it made me think that there'd be bugs and error messages I'd have to troubleshoot before even getting to Hello World. Part of the reason I went with PHP, as I just wanted to build something for my needs, without having to worry about unpredictable behaviours.
Additionally, I can't run a Python web app locally on my phone.
There's some weirdness around android browsers refusing to load html from the phone itself on security grounds. The OP uses a "progressive web app" which seems to be the proper way to do this at some point in the past, but firefox has killed that for some reason. Thus the most difficult part of the project seems to be persuading my phone to render html without copying the files to some server (or running a fileserver on the phone itself, to look at from the phone, which seems absurd).
What I can offer for people stumbling down the same path:
- Obsidian works fine as for ad hoc authoring of markdown while walking around
- It is known on stack overflow that markdown can't be sanely parsed into an AST
- That knowledge is kind of a branding misfire, the 'markdown' one is looking for is here https://github.com/commonmark/cmark
- That cmark binary + some foreach-file style script will turn markdown into html or xml. If you choose makefile and put spaces in the name of files you'll have a moderately bad few minutes cursing your tools
- Given that output xml/html, you can build whatever other html you see fit. I'm doing that with xslt but people are telling me not to
- That html can be written back to the obsidian vault and opened by a phone browser (at least if it's a single file)
- Obsidian doesn't really do headless, but leaving it running on one machine which repeatedly calls "make" to write the *.html files back into the vault works fine
- CSS thus far appears to be required, I was really hoping to annotate the html instead
First 90% done here, second 90% to go.