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. --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.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
ptt-mail-backup-0.1.1.tar.gz
(10.1 kB
view details)
Built Distribution
File details
Details for the file ptt-mail-backup-0.1.1.tar.gz
.
File metadata
- Download URL: ptt-mail-backup-0.1.1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eddac58cac2d4a55e5a1b3b3a02d5bb1621ac411189a3a81b90a1b8021b7e61 |
|
MD5 | de76d3e1dfe02d32162bde6c696a8201 |
|
BLAKE2b-256 | 186d446377decd853da246a697678d205bbb508a951ee3a5ae0ac6b9b0e775b4 |
File details
Details for the file ptt_mail_backup-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: ptt_mail_backup-0.1.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8769e279338e56f6d33989454f4f77661cf5a204692befb4126b1ea2aa8d5c99 |
|
MD5 | d36bd6938bf77dc21aeb50ef8760bbe2 |
|
BLAKE2b-256 | 460aade1c4b11e4e4bd7c2686c19583f06c6b7fdd1d5cb8282f9182bc0e6b364 |