This is the source of DOStodon, a Mastodon client for MS-DOS.
DOStodon is implemented in Javascript and relies on a yet unreleased version of DOjS to run.
Help on this project is very much appreciated, contact me on Mastodon or in the DOjS Discord if you want to help or have questions...
- You need a VM, real HW or DOSBox-staging with a network card and a matching packet driver to use it.
- A Pentium 133 or faster with at least 32MiB of RAM is recommended.
- Packet drivers can e.g. be found on packetdriversdos.net (make sure to download the driver from the "PC/TCP PACKET DRIVERS" section) or on crynwr.com or www.georgpotthast.de
- You don't need any TCP/IP stack, Watt32 is compiled into the program and directly uses the packet driver
- Make sure you read the section about the limitations!
- see "DOSBox-staging config" below for an example config that works (for me) with DOSBox-staging
Just download the whole repository.
Starting with 4.4.x Mastodon seems to have deactivated the "password" oAuth method. The only way to authenticate now (and get a valid token) seems to be via redirection to an HTML page that does the authentication (see here). Naturally DOStodon can not support that. Until there is a solution you will not be able to log into instances that do not support "password" authentication.
There is a highly experimental Linux version of DOStodon included. It is based on DOjS v1.12. You can try it at your own risk. You need to compile DOjS yourself, please look at this instruction how to do that. Fullscreen mode does not get keyboard input on WSL2, you can switch to windowed mode by removing the -u
option in dostodon.sh
.
Please run DOStodon <server> <email> <password>
server
: the URL of the server you want to connect to (e.g.mastodon.social
orhttps://bitbang.social
). Can be with or withouthttps://
prefix.email
: the email address used for registration (shown on thePreferences -> Account
page in the web).password
: Your server password. 2FA is not supported. Your password should not contain any non 7bit ASCII characters.
Example: DOStodon mastodon.social [email protected] 123abcABC
The access tokens are stored in CREDS.JSN
if the login is successful.
Just run DOStodon
.
If you want DOStodon to use a proxy you have to set the following ENV variables:
PROXY_HOST
: HTTP proxy to use. The parameter should be a string holding the host name or dotted IP address. To specify port number in this string, append :[port] to the end of the host name. The proxy string may be prefixed with [protocol]:// since any such prefix will be ignored. The proxy's port number may optionally be specified with the separate function SetProxyPort().PROXY_PORT
: Pass a port number with this option to set the proxy port to connect to unless it is specified in the proxy string using PROXY_HOST.PROXY_TYPE
: set this toSOCKS
to use a SOCKS proxy. If unset or set to anything else a HTTP proxy is asumed.
DOStodon supports NOISE.SYS, a MS-DOS random number generator. It can be obtained here: https://github.com/robrwo/noise.sys
ESC
: Quit DOStodonh/H/?/CTRL-H
: Help screenF1
: Switch to home timelineF2
: Switch to notificationsF3
: Switch to hashtag timelineF4
: Switch to local timelineF5
: Switch to global timelineF6
: Switch to bookmarks list (last 40)F7
: Switch to favourites list (last 40)F10
: Switch to Toot composerF11
: Info screenF12
: Poll/Refresh home/notification timelinesUP/DOWN, Page UP/DOWN, HOME/END
: scroll entries in home/notificationsp
: Show profile of currently selected entry (for boosts the boosters profile)P
: Show profile of currently selected entry (for boosts the original profile)CTRL-S
: Save screenshot as PNG. Screenshots are numbered, starting with1.PNG
.CTRL-P
: Search for a user/profile. The profile is displayed when pressingENTER
.CTRL-C
: Show config dialogDEL
: close dialog
b
: Boost/reblog currently selected toot in home screenB
: UN-Boost/reblog currently selected toot in home screenf
: Favorite/like currently selected toot in home screenF
: UN-Favorite/like currently selected toot in home screenm
: Bookmark currently selected toot in home screenM
: UN-Bookmark currently selected toot in home screenR
/r
: reply to selected toot in home screenD
/d
: Print JSON of selected toot in home screen to logfileC
/c
: Toggle toots with content warning1..4
: show media attachment 1 to 4. Any key to close.5
: show show YouTube preview image. Any key to close.CTRL-1..4
: show image description of media attachment 1 to 4. Any key to close.ENTER
: show thread view of current entry,DEL
orBACKSPACE
to return to timeline.CTRL-B
: Toggle toots&boosts, boosts only, toots onlyCTRL-M
: Toggle showing posts with media only
T
/t
: change tagENTER
: confirm tag in tag editorBACKSPACE
: delete character in tag editor
L
/l
: Toggle showing of favoritesB
/b
: Toggle showing of boostsF
/f
: Toggle showing of followsM
/m
: Toggle showing of mentionsO
/o
: Toggle showing of other notificationsSPACE
: Reset all filters
CTRL-ENTER
: Send toot in Toot editorCTRL-P
: Open account search, ENTER puts the selected account into the tootBACKSPACE
: delete characterDEL
: delete toot composer text and reply-to tootTAB
: switch toot visibility betweenpublic
,unlisted
,private
anddirect
.INSERT
: Image selector for image attachments to the toot.
ENTER
: close profilef
: followF
: unfollowb
: blockB
: unblockm
: muteM
: unmuteT
: Write toot to account
- DOStodon is busy while the Mastodon logo is displayed in middle of the screen. Don't hit keys like crazy, every keypress will be queued :)
- DOStodon polls home/notifications every 5 minutes for new entries. Countdown is in the lower right corner.
- To add a content warning/spoiler to a toot start the toot with "cw:". The first line of the toot will be the content warning, all subsequent lines will be the body text of the toot.
- If you press DOWN on the last entry in home/notifications older entries are fetched.
- Favourite/boost/bookmark status ([FBM]) is displayed below the profile picture of each toot.
- The selected hashtag is displayed in the upper right corner of the hashtag timeline.
- When first selecting the hashtag timeline you have to enter a hashtag.
- 2FA is not supported right now!
- logging in with passwords that contain characters outside 7bit ASCII might not be possible
- HTTPS requests can take quite a lot of time, be patient!
- Can't play videos/audio
- Image attachements are just drawn at the upper left corner
- No support for HTML tags, they are (badly) filtered out
- No support for emojis (replaced by spaces)
- No support for characters like umlauts, etc.
- The toot composer only supports BACKSPACE, it is not a real text editor.
- You can only remove the whole editor content. You can't undo adding an image.
- You can only add ALT text for the last image added.
- Bookmarks and favourites do not support pagination (yet).
- NO REAL TESTING/QUALITY ASSURANCE! Folks, this is a fun project, if you need a production ready client contribute or use something real! If it works for you, it works, but don't blame me for broken commits or missing features...
The source is split into several files right now:
dstdn.js
the "application"home.js
the home timelineimgcache.js
image fetching/cachinginfo.js
info screen displaysplash.js
splash screenmstdn.js
contains the Mastodon REST APInotific.js
the notification timelineprofile.js
profile viewertoot.js
toot creationutil.js
support codedialogs.js
all input fieldsfilsel.js
image file selector
DOStodon is implemented using DOjS native API (no p5js emulation). Network operations block the input processing/rendering.
I use DOSBox Staging to test this version of DOStodon. A NE2000 packet driver can be found on this page here.
DO NOT use DOSBox-X right now, it has a known bug in file io which creates broken SQLite databases DOSBox-staging has a problem with mouse support, thats why I disabled that in the example config!
My dosbox-staging.conf
looks like this:
[sdl]
capture_mouse = nomouse
[dosbox]
memsize = 64
[cpu]
cputype = pentium_slow
cycles = max
[ethernet]
ne2000 = true
nicbase = 300
nicirq = 3
macaddr = AC:DE:48:88:99:AA
[autoexec]
mount c E:\_DEVEL\GitHub\DOStodon
PATH=d:;%PATH%
c:
ne2000 0x60 3 0x300
- Busy indicator is missing for some network operations
- Some network errors lead to an endless loop
- Color themes?
- invert timeline (oldest post on top)
- Fix bugs
- Have fun
- Updated curl to 8.10.1
- Updated mbedTLS to 3.6.2
- Updated jpeg from 9e to 9f
- Updated SQLite to 3.46.1 (thanks to https://mastodon.social/@[email protected])
- Fixed a small bug when viewing threads in notification screem.
- Implemented setting for CW toots (default collapsed or visible)
- Fixed date calculation
- Fixed an issue with image viewing
- Added help screen to toot editor
- Changed some colors for better contrast
- Updated curl to 8.9.1
- Added ALT text for image uploads
- Updated curl to 8.8.0
- Updated mbedTLS to 3.6.0
- Added support for NOISE.SYS
- Updated curl to 8.7.1
- Updated mbedTLS to 2.28.8
- Updated zip to 0.3.2
- Updated mbedTLS and cURL for the DOS version
- removed Linux binaries, added link to the compilation instructions of DOjS v1.12
- Added Linux version for Ubuntu 20.04 and ArchLinux
- Display votes with results in the notifications
- Improve single choice voting dialog
- Implemented multiple choice voting
- Improved handling of Unicode characters (displaying German Umlauts and other diacritic characters)
- Finally display votes in the timeline
- Enable voting in single-choice votes (sorry, no multiple choice votes yet)
- Updated curl to 8.5.0
- Updated mbedTLS to 2.28.6
- Updated zip to 0.3.1
- Added example proxy config to `DOSTODON.BAT``
- Some tiny fixes after helpful comments from @[email protected]
- Added webp image format
- Security update to curl 8.4.0 and mbedTLS 2.28.5
- Fixed tag selection in tag screen display
- highlight DMs in timeline and notifications
- added visibility options to toot editor
- added visibility to toot display
- Added proxy support through ENV variables
- Updated DOjS to curl-8.2.0
- fixed drive letter detection in the file selector
- file selector cursor start position is between drives and files now
- fixed 'parent' handling in file selector
- accept HTTP status 206 for home timeline
- recompiled DOjS with GCC 12.2 and DJGPP CVS (fixes SSL/date bug AGAIN)
- added YouTube video preview
- added image upload/attachment to toots
- newly polled entries in home and notifications screens are now highlighted red
- Fixed a bug with displaying boosted toots when they had a content warning
- Moved filter display in notifications to lower left
- Added filtering of Toot-types to timelines: boosts, original toots and media attachments
- Updated to DOjS 1.11alpha with mbedTLS 2.28.3 and curl 8.0.1
- view the timeline of an account by pressing
F3
on the profile screen - updated DOjS, now using mbedTLS 2.28.2
- Help pages will now also be displayed when pressing
?
. - Enabled auto_vacuum for SQLite image cache.
- Added rainbow colors to the thread view.
- Reduced indentation in thread view.
- Added highligting of "root" entry in thread view.
- You can now press
RETURN
in thread view to see details of displayed children. - Added configuration dialog (press
CTRL-C
) and config saving toCFG.JSN
. - Changed some colors
CTRL-L
andCTRL-W
to load/save the timeline position is still work in progress!
- Profile view now shows the header image as well
- You can toot to the profile owner now by pressing
T
- DOStodon now returns to the calling screen after replying to a toot
- CTRL-P in the editor lets you search for an account
- Added "reply" marker
<
- Improved thread view and search dialog
- Implemented indentation and lines for toot context view (threads)
- Toots and notifications now show the time in a more readable fashion as a relative time.
- Added type filter for notifications
- Updated DOjS, new curl, new jpeg decoder and bugfixes
- Tinkered a little bit on the splash screen
- You can now press
t
to select a hashtag from the current toot and display the hashtags timeline - You can now press
F1
/F2
in profile view to show a list of followers/following accounts.
- Added 'LOCKED' and 'BOT' info to profile screen.
- Used a smaller font for timeline timestamps and toot stats
- You can now search for a user (profile) by pressing
CTRL-P
- Lots of small internal optimizations, especially text rendering
- New, experimental word wrapping algorithm with support for coloring hashtags and handles
- Reworked the "login" section in the README
- You can now save PNG screenshots using
CTRL-S
- Added scroll indicators
^
andv
at the very right of the screen - Added thread view for toots.
- Fixed bug with toggling content warnings on toots with no spoiler text
- Added image description viewing
- Added help screen when pressing
H
- Added local timeline
- Added global timeline
- Added hashtag timeline
- Added 'view bookmarks'
- Added 'view favorites'
- Added text input field
- Reworked sidebar
- Added auto refresh countdown
- Fixed issue with the image cache
- Fixed issue with profile screen follow/block/mute function
- Fixed wrong sound being played
- Added Makefile to create DOSTODON.ZIP
- Added follow/mute/block info to profile screen
- Added (un) follow/mute/block keys to profile screen (yet untested)
- Updated README regarding DOSBox (switched from DOSBox-X to DOSBox-staging)
- Added UnBoost and UnFav
- Added Bookmarks
- Added boost/fav/bookmark markers
- Added splash screen
- Added SQLite based image cache. Images are deleted from cache after 28 days.
- Updated README regarding DOSBox-X
- Added debug timestamp during startup
- Fixed 486 incompatibility (hopefully)
- Switched compiler for DOjS from GCC 7.2.0 to 12.2.0
- Added UTC date of toots
- Fixed a time() bug in DOjS and re-enabled certificate validation.
- Switched from nanojpeg to libjpeg to be able to load progressive JPEGs
- Added toot stat display to home screen
- Disabled TLS/SSL certificate verification for now. DOStodon is not able to verify the certificate of https://mastodon.social anymore and I need to dive deeper into the reason for that.
- Added Page UP/DOWN and HOME/END to home and notifications
- Added content warnings/spoilers to the toot composer
- Added fetching of older entries when viewing home/notifications
- Fixed a memory corruption in DOjS
- Images are no longer saved into TMP files
- Images are now scaled to fit the screen when displayed
- implemented LRU cache for images
- fixed some quirks with key handlings
- DOjS now uses cURL 7.86.0
- Blurhash is now implemented in C
- added
<CW>
for content warnings, you can toggle the toot withC
- added media indicator for non-images (e.g.
<video>
)
- added JS based blurhash
- implemented connection reuse
- you can now reply to toots by pressing R
- you can now clear the toot-composer by pressing DEL
- improved display of boosted toots
- added sounds
- DOjS now uses mbedTLS instead of OpenSSL
- changed display of user handles
- added info screen
- reworked Mastodon-API, prepared it to re-use cURL objects (doesn't work yet)
- now shows a busy indicator when fetchingt iages during scrolling
- disabled alpha channel to speed up rendering
- code cleanup
- several fixes all over the place
- added splash screen
- added entry scrolling
- added manual reload with F5
- changed polling time from 1min to 5min
- added profile viewer
- added media preview
- added media showing
- added liking
- added boosting
- added "busy" indicator
- added some help in README.md
- first working version
- first public release
- didn't work