Skip to main content

Backup PTT mail

Project description

https://travis-ci.org/eight04/ptt-mail-backup.svg?branch=master

一個用來備份 PTT 站內信的 CLI 工具。不會再因為站內信打包失敗而把信箱塞爆一整個禮拜。

Features

  • 使用 SSH 連上 PTT,再一頁頁爬

  • 下載回來的檔案為 Big5-UAO 編碼

  • 支援自動換行、寬度大於 80 的文章

Installation

>From PYPI:

pip install ptt-mail-backup

Usage

執行 ptt-mail-backup ...:

usage: ptt-mail-backup [-h] [-u USER] [-p PASSWORD] [-d DEST] [-v]
                       [-f FILENAME_FORMAT] (-r START END | --all)

Backup PTT mail.

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  username, otherwise prompt for the value.
  -p PASSWORD, --pass PASSWORD
                        password, otherwise prompt for the value.
  -d DEST, --dest DEST  save to dest. Default: '.'
  -v, --verbose         print verbose message.
  -f FILENAME_FORMAT, --filename-format FILENAME_FORMAT
                        filename format. Default: '{index}. [{board}] {title}
                        [{author}] ({time:%Y%m%d%H%M%S}).ans'
  -r START END, --range START END
                        specify a range (inclusive). Negative values and zeros
                        are allowed, they are treated as (last_index + value)
                        i.e. --range 0 0 would download the last mail.
  --all                 download all

或是 python -m ptt_mail_backup ...

範例

下載所有信件到 2018-06-12 資料夾:

ptt-mail-backup -d 2018-06-12 --all

下載最新的十封信件:

ptt-mail-backup -r -9 0

從 CLI 傳入使用者名稱、密碼,並下載最舊的信件:

ptt-mail-backup -u myusername -p mypassword -r 1 1

Changelog

  • 0.1.0 (Next)

    • First release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ptt-mail-backup-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

ptt_mail_backup-0.1.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file ptt-mail-backup-0.1.0.tar.gz.

File metadata

File hashes

Hashes for ptt-mail-backup-0.1.0.tar.gz
Algorithm Hash digest
SHA256 39cb25d4dc70dc529b697f543646ddb171b550fccf0e58ac746a8c6f89c7f421
MD5 6f192ca7fb2a585573309c1cdbb1fee6
BLAKE2b-256 f28f85638e42b0a300e42ef6fbd9b4f74f66a2e29a22413d5118749c3bf1009d

See more details on using hashes here.

File details

Details for the file ptt_mail_backup-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ptt_mail_backup-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43fe7b6788fc656fa8ebf62104dfe5839e171e3697724a36f26a4b1992b1e239
MD5 9cf856ce0a7d4c478172ca4af999bac5
BLAKE2b-256 202605bcc3eedee1e41f23b96e1b56d204c8adc23c719343d8bc38e14400f959

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page