A CLI Tool for Backing up PTT Internal Mail

Blake Bradford Avatar

·

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:

  1. Open your command-line interface.
  2. 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:

  1. Execute the CLI command:
    ptt-mail-backup ...
  2. Follow the prompt to enter your PTT username and password, or manually specify them using the -u and -p options.
  3. Specify the destination folder where you want to save the backup using the -d option. The default destination is the current directory.
  4. Optionally, enable verbose mode by using the -v option for more detailed output.
  5. 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.
  6. To download all your mail, use the --all option.
  7. 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

Leave a Reply

Your email address will not be published. Required fields are marked *