A CLI Tool for Backing up PTT Internal Mail
Are you tired of losing important PTT internal mail due to failed backups? Look no further. Introducing a command-line interface (CLI) tool called PTT Mail Backup, designed to make backing up your PTT internal mail hassle-free.
Features
PTT Mail Backup offers a range of features to ensure a smooth and efficient backup process. The key features include:
- SSH Connection: The tool uses SSH to connect to PTT, making it easy to authenticate and access your internal mail.
- Big5-UAO Encoding: All downloaded files are encoded in Big5-UAO, ensuring compatibility and preserving the integrity of your messages.
- Automatic Line Wrapping: PTT Mail Backup supports automatic line wrapping, allowing you to read long messages without scrolling horizontally.
- Wide Article Support: Articles with a width greater than 80 characters are fully supported, ensuring the backup captures all pertinent information.
- Text Formatting: Enjoy enhanced readability with formatting options such as coloring, blinking text, and dual-colored text.
Installation
You can install PTT Mail Backup easily from the Python Package Index (PYPI). Just follow these steps:
- Open your command-line interface.
- Execute the following command:
pip install ptt-mail-backup
Usage
PTT Mail Backup provides a user-friendly and intuitive interface. To start backing up your PTT internal mail, follow these steps:
- Execute the CLI command:
ptt-mail-backup ...
- Follow the prompt to enter your PTT username and password, or manually specify them using the
-u
and-p
options. - Specify the destination folder where you want to save the backup using the
-d
option. The default destination is the current directory. - Optionally, enable verbose mode by using the
-v
option for more detailed output. - Specify the filename format for the saved mail using the
-f
option. The default format is{index}. [{board}] {title} [{author}] ({time:%Y%m%d%H%M%S}).ans
. - To download all your mail, use the
--all
option. - To download a specific range of mail, use the
-r
option followed by the start and end indices. For example,-r -9 0
downloads the latest ten mail items, while-r 1 1
downloads the oldest mail item.
Examples
Here are a few examples to get you started with PTT Mail Backup:
-
Download all mail and save it in a folder named “2018-06-12”:
ptt-mail-backup -d 2018-06-12 --all
-
Download the ten latest mail items:
ptt-mail-backup -r -9 0
-
Download the oldest mail item, providing the username and password through the command line:
ptt-mail-backup -u myusername -p mypassword -r 1 1
License
Please note that the distributed package includes a branch of pyte
that supports blinking text. pyte
is licensed under the LGPL v3. The ptt_mail_backup
tool itself is licensed under the MIT license, ensuring transparency and compliance.
If you want to learn more about PTT Mail Backup and start safeguarding your important PTT internal mail, visit the official repository for detailed documentation and updates.
References
- PTT Mail Backup GitHub repository: eight04/ptt-mail-backup
- PyPI package page: ptt-mail-backup
Leave a Reply