Backup PTT mail
Project description
一個用來備份 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. This option could be used multiple times. --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
License
The distributed package includes a branch of pyte which supports blinking text. pyte is licensed under LGPL v3 and ptt_mail_backup itself is licensed under MIT.
Changelog
0.2.2 (Nov 18, 2018)
Fix: Support Python 3.7.
0.2.1 (Jul 25, 2018)
Fix: handle mailbox is full message.
Fix: handle add new board to favorite message.
0.2.0 (Jun 22, 2018)
The distributed package now includes pyte with blinking text support.
Add: a better way to get full title.
Add: allow multiple --range.
Fix: handle password error.
Fix: handle article recovery screen.
Fix: handle password attack alert screen.
0.1.1 (Jun 12, 2018)
Fix: missing deps.
0.1.0 (Jun 12, 2018)
First release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ptt-mail-backup-0.2.2.tar.gz
.
File metadata
- Download URL: ptt-mail-backup-0.2.2.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bed29d761c0109ca2ceff3d6fd5939ce967d14c2029c252ab63ec0b89b8cae14 |
|
MD5 | d885fb69661c90c35041eb3742ad4a1c |
|
BLAKE2b-256 | 99d4a48de740b85236d97a706694591cd8aa7ade4c57aedf1689cf2cd863e94c |
File details
Details for the file ptt_mail_backup-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: ptt_mail_backup-0.2.2-py3-none-any.whl
- Upload date:
- Size: 39.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 388098d03c34068f346d38939b3d98027b0354f1242d4d870deed98047ed5af7 |
|
MD5 | f584fb0670798d5c01fa54578396edd7 |
|
BLAKE2b-256 | 3b30dc196bb72443a2aaef0f7b4e56cf3253973dbdcf989f9edeb5031384ea36 |