[HN Gopher] Widdler is a single binary that serves up TiddlyWikis
       ___________________________________________________________________
        
       Widdler is a single binary that serves up TiddlyWikis
        
       Author : Tomte
       Score  : 168 points
       Date   : 2021-12-05 13:58 UTC (9 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | JasonFruit wrote:
       | 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.
        
         | cat199 wrote:
         | 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
        
       | steinuil wrote:
       | 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
        
       | nilslindemann wrote:
       | 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)
        
       | ThinkBeat wrote:
       | I know this will be a dumb question but does one sit it up?
       | 
       | I am used to creating "web application" and running it on a web
       | server of some sort: Apache / IIS /Lite.
       | 
       | In this perspective the web server or what not handles a lot of
       | the complexity, thread pools, isolation, restarting, logging etc
       | etc.
       | 
       | I frequently see applications like this that is "one binary" and
       | you run it by starting it on the command line. That is easy , no
       | worries.
       | 
       | But how to handle running it "in production", were I want to
       | ensure that it is up and running all the time?
       | 
       | If I wanted to put this on my VPS and share it with the net, what
       | steps do I need to take?
       | 
       | systemd? (k8s I really hope not)
        
         | the_qbit wrote:
         | 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.
        
       | mro_name wrote:
       | Yes, sensibly designed deployments are single file. It's super
       | important for maintainability of operation.
        
       | indigodaddy wrote:
       | Looks great. I assume this can easily also be integrated with git
       | just by pushing some files from the server after each
       | save/creation?
        
       | newhotelowner wrote:
       | There used to be PHP/MySQL TiddlyWikis. It was so much nicer. You
       | can just use .htaccess to password protect it too. I miss that.
        
       | the_qbit wrote:
       | Author here, if anyone has any issues - let me know! :D
        
       | Tomte wrote:
       | Can I access that on iPad? Is there WebDAV integration in
       | iOS/iPadOS?
        
         | the_qbit wrote:
         | 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.
        
       | zoomablemind wrote:
       | 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.
       | 
       | [1]: https://fossil-scm.org/home/doc/trunk/www/wikitheory.wiki
        
       | barbarr wrote:
       | 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.
        
         | mro_name wrote:
         | I guess you mean the names. Names are almost never descriptive,
         | barbarr, are they?
        
         | detaro wrote:
         | 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.
        
         | stan_rogers wrote:
         | Most of them, at least, aren't childish euphemisms for "pisser"
         | or "pisspants".
        
       | mark_l_watson wrote:
       | 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.
        
         | lanstin wrote:
         | 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.
        
         | evilDagmar wrote:
         | That really seems like a lot of code just to do the job of cp.
         | 
         | Perhaps their time would be better spent thinking up some way
         | to prevent a TiddlyWiki from becoming a wormable nightmare.
        
         | skybrian wrote:
         | 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.
        
           | dTal wrote:
           | I don't get it. Why is it making me compile a Go webserver
           | then? There aren't even binaries provided.
        
             | detaro wrote:
             | So you can save the modified file on the server.
        
           | mch82 wrote:
           | 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.
        
         | hwers wrote:
         | 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.
        
           | halfdan wrote:
           | 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.
        
         | orf wrote:
         | Does that LOC count include dependencies?
        
           | kenniskrag wrote:
           | There are only native packages + 1 external packages
           | suah.dev/protect.
        
           | monsieurbanana wrote:
           | 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.
        
           | IceWreck wrote:
           | Looks like the package in question only has packages from the
           | Go project itself.
           | 
           | The only external dependency is OpenBSD specific and used on
           | that operating system only.
        
         | fartcannon wrote:
         | 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.
        
       | stan_rogers wrote:
       | Do people not look up the names they plan to use for their
       | products?
        
       | bogwog wrote:
       | 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)
        
         | fiatjaf wrote:
         | You might be interested in these:
         | 
         | - https://github.com/fiatjaf/tiddlywiki-remotestorage-server
         | 
         | - https://github.com/fiatjaf/tiddlywiki-remotestorage
         | 
         | 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).
        
           | bogwog wrote:
           | That's the first I've heard about remotestorage.io, and it
           | looks interesting. I'll definitely be looking into that,
           | thanks!
        
         | knight17 wrote:
         | 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:
         | 
         | - Create a backup Every nth save
         | 
         | - Create a backup every nth minute
         | 
         | - Customised Tower of Hanoi
         | 
         | - First in First Out [3]
         | 
         | <<
         | 
         | [0] https://ibnishak.github.io/Timimi/
         | 
         | [1] Chrome/Edge/Brave:
         | https://chrome.google.com/webstore/detail/timimi/mnggafnmmhd...
         | 
         | [2] Firefox: https://addons.mozilla.org/en-
         | US/firefox/addon/timimi/
         | 
         | [3]
         | https://tiddlywiki.com/static/Timimi%253A%2520WebExtension%2...
        
         | bachmeier wrote:
         | > 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.
        
         | juanse wrote:
         | >> 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.
        
           | bogwog wrote:
           | 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.
        
       ___________________________________________________________________
       (page generated 2021-12-05 23:00 UTC)