Project moved to Codeberg: https://codeberg.org/harveyk/threema2html
Convert a Threema chat export to nicely formatted, long term preservation friendly HTML
https://github.com/hkramski/threema2html
- For long-running exports, make sure that your smartphone does not go into standby mode during the export process otherwise you may end up with a corrupted .zip file.
- Export a chat in Threema (including media files), see https://threema.ch/en/faq/chatexport.
- Unpack the .zip file (without any subfolders) into the folder where this .awk script lives.
gawk -f threema2html.awk messages-chatname.txt > index.html
(Seegawk -f threema2html.awk -- -h
for more options.)- Copy relevant media files:
grep "href=\"./media/" index.html | cut -d= -f2 | cut -d\" -f2 | cut -d/ -f3 > medialist.txt xargs --arg-file=medialist.txt cp --target-directory=./media/
- Adjust
./lib/default.css
.
This script expects German date formats and the user name "Ich" for the exporter. For languages other than German, you will probably need to adjust some code.
It has been tested on Android based exports only.