Thursday 29 August 2024 Pastebin and file dropper server on Codeberg ============================================ During the 2024 edition of the Old Computer Challenge, I started building a self hosted pastebin and file dropper service, aimed at text mode web browsers like eww, lynx and links. Today I published the code on Codeberg [1]. The service uses pure HTML and HTML forms, no JavaScript, and is called `Hunchbin'. It is build upon Hunchentoot, the Common Lisp web server. Expire dates ------------ Hunchbin assigns an individual expire date to every item, calculated using a default expire period. When the expire date is reached, the item will be deleted. Expire dates can be modified by the user. Features -------- The most important elements are: * pastebin server for snippets * file dropper * temporarily bookmarks service Snippets -------- Snippets are added in a text area field in a web form and displayed as pre-formatted text, most browsers use a fixed font for this. Snippets are also be added by uploading a file with MIME-type "text/plain". Snippets can be modified, the user can change title as well as the text of the snippet. File dropper ------------ Files can be uploaded through a HTML form. Hunchbin stores the MIME-type. When a file is uploaded, using TUI browsers like eww, lynx, and links, the MIME-type will always be "text/plain", no matter what file was uploaded. Therefor Hunchbin provides the option to change the MIME-type afterward. The option to upload and download files can be useful to exchange data between different devices and operating systems. For example. it provides an easy way to transfer files from and to tablets. Bookmarks --------- Hunchbin features the option to store temporarily bookmarks. Add a bookmark using the bookmark HTML form. Just like any other item, bookmarks get an expire date. In the past I ran Linkding in our local home network. It turned out that I had managed to archive over 700 bookmarks, and I would probably never revisit each and everyone of them [2]. Because of this, I have killed my Linkding server. During the creation of Hunchbin I decided to include an option to add bookmarks, which will automagically disappear after some time. Once a bookmark is added, its expiration date can always be moved further into the future. With this option, one can still collect a number of links to pages that look promising, without the risk of creating a huge pile of bookmarks. Accesskeys ---------- The functions of Hunchbin are accessed by opening HTML-links. Because the number of links are limited, the usage of the Hunchbin service with text mode browsers is very efficient. In order to keep some of this efficiency when using a graphical browser like Firefox, the HTML links are created with so-called accesskeys. For example, to open a link with accesskey `a', in Firefox press Alt-Shift-a (at least, in Firefox on FreeBSD). As far as I know, Chrome, Firefox, and Safari all support the use of accesskeys. To help the user, the accesskeys are shown between square brackets, at the end of each link. CCL --- During the Old Computer Challenge I used an old Acer Aspire One 522 POVE6 in a Xorg-less setup, running FreeBSD. To experience the use of this laptop for Lisp development I had installed CCL on it and started building the service. After the challenge I added Xorg and the ratpoison window manager, but still kept Emacs-nox, and continued working on the snippet and file dropper service. This work was intermittent, because of different priorities, and also because of camping trips. It is summer, after all. I continued building the application on CCL, but also tested it on SBCL. I am not a seasoned Lisp developer, and the code will show this. Nonetheless, it was great fun creating the application, and again I learned a lot along the way. In use ------ The Hunchbin service has been running in our local home network for about two weeks, while still under development. Text mode browsers ------------------ I build the system on my OCC laptop, a machine without a graphical web browser like Firefox. During the development I tested the functionalities with eww, lynx and links. The service therefor fully supports the use of these browsers, and working with it is really fast, and a joy to use :) Useful ------ Because I use different devices, like my OCC laptop, my X201, a tablet, and so on, a service like Hunchbin is valuable. It provides an easy way to transfer files to and from a tablet. The service is also useful for exchanging snippets, like a copy of a part of a web page. This week I will kill my Bepasty server and solely use Hunchbin. [1]: https://codeberg.org/mattof/hunchbin [2]: gopher://box.matto.nl/0/bookmark-manager-the-siren-call-of-web-browsing.txt Last edited: $Date: 2024/08/29 18:30:54 $