From 715e091eb9e935127841009a54df808b313a4c2e Mon Sep 17 00:00:00 2001 From: Rekushi <170186554+RekuNote@users.noreply.github.com> Date: Mon, 31 Aug 2026 20:39:00 +0100 Subject: [PATCH] docs: update README for Python 3 port * Update Python 2.7 references to Python 3 * Add dependency installation instructions * Document how to run the server * Add DSi proxy setup instructions for port 8080 * Document bundled Hatenatools utilities * Note Python 3.13 compatibility changes * Add information about the Python 3 port and project documentation --- readme.md | 71 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 59 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index acf80e8..3d789a8 100644 --- a/readme.md +++ b/readme.md @@ -1,12 +1,59 @@ -Hatena server - by pbsds -====== - -This is a replacement for the Flipnote Hatena service for the DSi which has ended. -It's written in Python 2.7 and requires Twisted. -Future versions could need PIL aswell. -This project uses Hatenatools, which is also written by me. It can be found here: http://pbsds.net/projects/hatenatools - -To use it, simply run server.py. -On the DSi, set the proxy settings to point to this server on port 8080, then access Flipnote Studio as usual. A more detailed guide is on the wiki section. - -Documentation on the formats Flipnote Studio uses can be found in the wiki section of this git. \ No newline at end of file +# Hatena server — Python 3 port + +This is a replacement server for the discontinued Flipnote Hatena service used by Flipnote Studio on Nintendo DSi. + +This repository has been ported from its original Python 2.7 implementation to **Python 3**. The server protocol, URL layout, plaintext database, bundled Hatena resources, PPM/TMB handling, UGO handling, and NTFT handling are retained. + +## Requirements + +- Python 3.9 or newer (the port is tested with Python 3.13) +- Twisted +- NumPy +- Pillow +- `ffmpeg` only if you want to use the optional PPM-to-MKV export command + +Install Python dependencies with: + +```bash +python3 -m pip install -r requirements.txt +``` + +## Run the server + +From the repository root: + +```bash +python3 server.py +``` + +The server listens on TCP port **8080** by default, matching the original project. Point the DSi proxy settings at the machine running this server, port 8080, then open Flipnote Studio. + +The server accepts the absolute-form HTTP request targets normally sent by a proxy client and restricts normal Hatena routes to requests carrying the DSi session header, as the original implementation did. + +## Hatenatools utilities + +The bundled format utilities are Python 3 compatible: + +```bash +python3 Hatenatools/PPM.py +python3 Hatenatools/UGO.py +python3 Hatenatools/NTFT.py +``` + +PPM/TMB parsing, thumbnails, frame decoding, sound decoding, UGO packing/parsing, and NTFT packing/parsing use `bytes` explicitly under Python 3. The PPM sound decoder no longer depends on the removed `audioop` standard-library module, so it works on Python 3.13+. + +## Tests + +Run the included smoke/regression suite with: + +```bash +python3 -m unittest discover -s tests -v +``` + +The tests use the original repository's bundled sample Flipnote and NTFT/UGO assets. The server resource-tree smoke test can run even when Twisted is not installed by using a minimal test-only stub; running the actual server still requires Twisted. + +## Notes + +The database remains the original single-process plaintext backend. Its files live under `database/`, and uploaded Flipnotes are written under `database/Creators//`. + +The original project and Hatenatools licensing files are retained. See `license.md` and `Hatenatools/License.txt`.