Skip to content

Export a Xournal++ file to PDF, input a description, then send it to a Telegram channel

Notifications You must be signed in to change notification settings

victoriaemc/xournalpptotelegrampdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Xournal++ to Telegram PDF

Export a Xournal++ file to PDF, input a description, then send it to a Telegram channel

Requirements and installation

Install the required Python packages listed in the requirements.txt file by running the command

pip install -r requirements.txt

Make the script executable by running the command

chmod +x xournalpptotelegrampdf.py

Add this script to your PATH by adding this line to your shell configuration file (.bashrc or .zshrc)

export PATH=$PATH:/wherever/you/have/saved/xournalpptotelegrampdf

After this, restart your terminal or run source ~/.bashrc/source ~/.zshrc for the changes to take effect.

Get a Telegram bot token by following the prompts given by BotFather. Don't worry about the bot's name, it is irrelevant. Just remember to save the token somewhere!

Usage

Run the script using xournalpptotelegrampdf.py <your xournal file> in the same directory where the Xournal++ file you want to convert to PDF and send to telegram is in. The PDF and the config.txt file will be stored in that same directory. Just follow the prompts!

IMPORTANT: FOR PRIVATE CHANNELS

To send your files to a private channel, you will have to input the channel's id manually. Get it using either of these methods:

  1. Forwarding any message sent in that channel to Json Dump Bot. It is found in either the 'id' field inside the 'chat' field of the 'forward_origin' field of the response, or the 'id' field of the 'forward_from_chat' field. It always starts with -100.

  2. Access your private channel using Telegram Web. The url should be of a form very similar to https://web.telegram.org/k/#-XXXXXXXXXX. Your id would be -100XXXXXXXXXX.

About

Export a Xournal++ file to PDF, input a description, then send it to a Telegram channel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages