|
3 weeks ago | |
---|---|---|
dist | 4 weeks ago | |
README.md | 3 weeks ago | |
compress.sh | 3 weeks ago | |
index.html | 4 weeks ago | |
script.py | 4 weeks ago |
README.md
Chat2Print
A tool to create booklets from a Telegram Chat!:)
Dependencies
python3, imagemagick, ffmpeg, pillow (python library, install it via pip: pip3 install pillow
)
Workflow
-
From Telegram Desktop, go to a group and from the three dots click "Export Chat History" as JSON (not HTML!) and export also photos, files and videos;
-
Move the exported folder from Telegram into the folder of the repo and name it "telegram_files";
-
From the terminal, change directory to the folder of the repo;
-
Compress the file with the tool compress.sh. This tool will compress the files (but not the pictures in photo folder, since they're already compressed from Telegram itself). The video will not be compressed but will be exported some frames, the quantity of the frames changes according to the length of the video (this is meant to have a flipbook mood)(the script will delete the original video file and thumbnail); Run the script:
sh compress.sh
; -
Run the Python script:
python3 script.py
; -
Visualize the html page in "dist" directory. You can activate a live serever with:
python3 -m http.server
-
go to
localhost:8000/dist
-
just print with cmd+p / ctrl+p
CSS
Just open the style.css
file in dist/
License
Habitat License is adopted