Wow, that is just 357 lines of Go code. So much of my work life is using complex systems in AWS and GCP that are beyond my ability to understand “turtles all the way down.” It is refreshing to see something so simple and focused on one thing. In the early days of Ruby on Rails, I had the source code to Ruby and for Ruby on Rails on my laptop and it was all fairly readable. Those days are long gone.
The trick seems to be that all the complexity is in the html file and runs in the browser. The server is just a basic WebDAV server.
It looks like the entire wiki implementation is copied to a new file when you create a new wiki page. It's a 2.3 MB file, which seems like a lot to download when you visit a new page.
Each HTML file is a complete wiki instance. The wiki code and data for all pages within the wiki are bundled in that file. The code let’s the webpage edit itself.
> It's a 2.3 MB file, which seems like a lot to download when you visit a new page.
It is, But I feel it's still better than what ever framework they're using nowadays to generate doc/wiki for APIs which hijacks Ctrl-F with a useless pop-up which rarely gets me what I need[1]. Please bring back plain HTML document pages.
It's a weird phenomenon though since even though ruby on rails was readible in a small code base, it was still building on top of a ton of abstractions that hid lower detail. It makes me think that we're just failing to build clean good abstractions that make coding for cloud as beautiful as it could be.
The difference between Rails and AWS however is that you can inspect the former and understand all its underpinnings whereas AWS is almost entirely proprietary and your experience with their services entirely depends on what services you select.
Like using the command line, its all so flexible, dynamic and powerful while being small and understandable. It was possibly my favourite part of learning to use Linux 20 years ago.
i keep the code for CPython, Go, terraform and the terraform providers i use checked out. It is still useful and educational to read source code. i confess i only rarely check out the kernel or glibc code. kernel code is good but usually not the issue glibc has the tendency to make me mad.
If you want to make something from scratch, you must first invent the universe.
Anyway, I wouldn't count the kind of simple, focused libraries dependencies Widdler relies on as additional LOC.
As a rule of thumb, if it's something that wouldn't make me blink an eye if I found it was in the python stdlib, it gets a pass from me. Only the webdav library might not fit this.
This is subjective, of course. If anyone has a better heuristic for this, I'm all ears.
Na, cp doesn’t cut it :p - if it was that trivial of a task I wouldn’t have taken the time to write it!
Thanks for your opinion on where my time is better spent though, I don’t know what I was thinking.. building a tool to solve a problem I had and releasing it completely free of charge! I’ll know better next time!
A propos the single binary wiki server. Last time I was looking for something of this kind, I stumbled upon Fossil SCM, which also includes an implementation of Wiki [1].
Editing can be done in Markdown, all version-controlled, there's user support built-in, the whole thing basically resides in a repository, which is a kind of a SQLite db. The wikis can be imported from text files too.
It may be not fancy-looking, but for "note-taking" can be good enough. I guess it may be made to run in Tmux or the likes to have a Wiki served locally to the smartphone.
Wish the Fossil was more templatable, also there's no proper wiki category tagging, but it does work for the purpose.
By the authors of Sqlite. High quality code that is probably going to be around and well maintained for long. Not unimportant when using it as a personal knowledge system.
This is AWESOME! My biggest annoyance with TiddlyWiki has been the ergonomics of saving.
I've been using TiddlyDesktop, but that thing has some questionable privacy because it's based on Chromium. One time, I had it running in the background while working on something completely unrelated, and I got a Chrome-style popup/alert warning me about a network printer being disconnected. I didn't even have Chrome installed on my machine at the time and it took me a while to realize that it came from TiddlyDesktop.
But besides the privacy issues, TiddlyDesktop only serves local wikis. That's annoying when you have multiple devices.
Also, pro-tip if you're on Ubuntu: the latest golang version in the default repos isn't compatible with this. You'll need to use golang 1.16 or later, which can be installed manually from the website, or installed via apt with a custom PPA (https://github.com/golang/go/wiki/Ubuntu)
I find the TiddlyDesktop to be too heavy for what can be done in the browser itself. Have you tried using Timmi [0] with your browser [1, 2]? I had problems initially with the file save workflow till I found Timmi. I use it with Firefox and sync with Dropbox. It hasn't failed me and works smoothly.
>>
Timimi is a web-extension accompanied by a native host that allows you to save and backup your standalone HTML tiddlywiki files anywhere in your hard-drive. Once installed, you can save the tiddlywiki files without any extra steps, like the original Tiddlyfox addon.
Timimi also provides users with 4 backup strategies, viz:
A TiddlyWiki plugin for saving tiddlers to https://remotestorage.io/ and also a server to fetch them from any public remoteStorage on demand and serve them as HTML to visitors (for sharing).
I think my server at https://tiddly.fiatjaf.com still works. You can just open it and start creating your tiddlywiki with auto-save (it will be saved on localStorage by default).
> My biggest annoyance with TiddlyWiki has been the ergonomics of saving.
I wanted something that just let me open the wiki and save changes to it. Nothing else. No massive dependencies. This is what I wrote: https://github.com/bachmeil/tiddlyd You view you TW and you save changes to it, nothing else.
>> Also, pro-tip if you're on Ubuntu: the latest golang version in the default repos isn't compatible with this. You'll need to use golang 1.16 or later, which can be installed manually from the website, or installed via apt with a custom PPA (https://github.com/golang/go/wiki/Ubuntu)
Thanks! I was about to give up
PD: Couldn't install it either with the new binaries:
"package embed: unrecognized import path "embed" (import path does not begin with hostname)"
I think they should revisit this issues if really want widespread adoption.
Run `go version` to see if you're actually running the correct version of go. You need at least go 1.16.
If it's not correct, try `command -v go` to see which go binary your shell is using. If it's not "/usr/bin/go", then your PATH probably points to another one. In that case, try running `/usr/bin/go` directly instead of just `go` (assuming you installed the PPA linked above).
> I think they should revisit this issues if really want widespread adoption.
This isn't the project's fault. It requires a particular version of go, but you have the wrong version on your computer.
Very nice, though installing Node.js, cloning the TiddlyWiki repo and then (inside the 'editions' folder) doing ...
node ..\tiddlywiki.js "my new wiki" --init server
cd "my new wiki"
node ..\..\tiddlywiki.js --listen
... is also not THAT difficult :-)
Or alternatively, an AutoHotkey shortcut, which fixes the anachronistic ctrl+s shortcut of the browser (anachronistic = doesn't remember save action for this url)
You love to see it! I think this is a reasonable tool for a large set of usecases. Though many will be served just as well with file synchronization and other local saving tools, I like the simplicity in that single binary.
I use my TW every day like a madman (https://philosopher.life/#⧖). I'd like to submit https://github.com/OokTech/TW5-Bob as a powerful (though perhaps not as simple) alternative. That's what most of my household uses (one is aiming to switch over soon).
I had no idea there was this much community effort around TiddlyWiki, but looking around, there are several companion tools for it. I've always thought it was a great piece of software, and obviously others agree.
Used it in a previous ops support gig to build up a mini knowledge base of canned issue responses / topical oneliners - we couldn't install software but could save network drive files; tiddly kept my response system flexible & portable between systems - definitely recommend for this use case
widdler is meant to be more of a private wiki. if you want to share a specific tiddlywiki with the world it's as easy as copying the html file to a webserver - it will then be static content (users can edit it locally, but the changes won't be sent back up to the server).
My current use case is: running on a vps and exposing a password protected space for me to jot down various things.
Looks good. I adopted https://github.com/sendwheel/tw-receiver a while back which is also pretty nice, but I had to disable most of its safety features as they false triggered too often. (Acceptable for a single-user note-taking situation.)
I have a similar project but it just serves a single wiki via http and doesn't support WebDAV or authentication, and it's in Rust rather than Go. https://github.com/steinuil/twkwk
> Password protection via HTTP Basic Authentication.
> ...
> Optional TLS support.
I know it's supposed to be pretty minimal, but this is a bad combo. Great that TLS is offered but it should be mandatory if you're using the authentication.
"Please don't complain about tangential annoyances—things like article or website formats, name collisions, or back-button breakage. They're too common to be interesting."
You can run it on a machine and access the wiki over http. The Files app on ipad can do webdav, but it won't help ya much with the tiddlywiki side of things.
Unrelated, but does anyone else feel that there are way too many non-descriptive proper nouns in tech? I had no clue what to expect from the title, or any idea of why I should be interested in it.
That it's a server for some kind of wiki seems fairly clear from the title, and I'm not sure what much more relevant context you could fit in a title - i.e. it can't really explain much more about TiddlyWiki with just a few words?
There's two of the words you complain about in it: the name of the project itself, and TiddlyWiki - which is clear that it's a wiki, and naming it explicitly instead of just referencing a generic wiki is useful for everyone who is aware of it.