ptt-mail-backup
===============
.. image:: https://travis-ci.com/eight04/ptt-mail-backup.svg?branch=master
:target: https://travis-ci.com/eight04/ptt-mail-backup
一個用來備份 PTT 站內信的 CLI 工具。不會再因為站內信打包失敗而把信箱塞爆一整個禮拜。
Features
--------
* 使用 SSH 連上 PTT,再一頁頁爬
* 下載回來的檔案為 Big5-UAO 編碼
* 支援自動換行、寬度大於 80 的文章
* 支援上色、閃爍、雙色字
Installation
------------
> NOTE: This package requires python 3.7+
From `PYPI <https://pypi.org/project/ptt-mail-backup/>`__:
::
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 <https://github.com/eight04/pyte/tree/dev-blink>`__ which supports blinking text. ``pyte`` is licensed under LGPL v3 and ``ptt_mail_backup`` itself is licensed under MIT.
Changelog
---------
* 0.6.0 (Feb 28, 2024)
- Bump dependencies.
- Change: require python 3.7+.
- Fix: issues with wcwidth 0.2.13.
* 0.5.0 (Feb 3, 2024)
- Bump dependencies.
- Fix: hang while refreshing screen.
* 0.4.0 (Jun 30, 2021)
- Bump dependencies
- Fix: hang while fetching index
* 0.3.0 (Aug 26, 2019)
- Breaking: stop relying on the footer information.
- Fix: unable to download articles including ``**s`` or ``**n``.
* 0.2.3 (Aug 21, 2019)
- Fix: handle login views.
* 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/eight04/ptt-mail-backup",
"name": "ptt-mail-backup",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "ptt,mail",
"author": "eight",
"author_email": "eight04@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d3/90/cb06ae518ae4b6144520976b707aaba39c49489a0f784fc50378a8cc190e/ptt-mail-backup-0.6.0.tar.gz",
"platform": null,
"description": "ptt-mail-backup\r\n===============\r\n\r\n.. image:: https://travis-ci.com/eight04/ptt-mail-backup.svg?branch=master\r\n :target: https://travis-ci.com/eight04/ptt-mail-backup\r\n \r\n\u4e00\u500b\u7528\u4f86\u5099\u4efd PTT \u7ad9\u5167\u4fe1\u7684 CLI \u5de5\u5177\u3002\u4e0d\u6703\u518d\u56e0\u70ba\u7ad9\u5167\u4fe1\u6253\u5305\u5931\u6557\u800c\u628a\u4fe1\u7bb1\u585e\u7206\u4e00\u6574\u500b\u79ae\u62dc\u3002\r\n\r\nFeatures\r\n--------\r\n\r\n* \u4f7f\u7528 SSH \u9023\u4e0a PTT\uff0c\u518d\u4e00\u9801\u9801\u722c\r\n* \u4e0b\u8f09\u56de\u4f86\u7684\u6a94\u6848\u70ba Big5-UAO \u7de8\u78bc\r\n* \u652f\u63f4\u81ea\u52d5\u63db\u884c\u3001\u5bec\u5ea6\u5927\u65bc 80 \u7684\u6587\u7ae0\r\n* \u652f\u63f4\u4e0a\u8272\u3001\u9583\u720d\u3001\u96d9\u8272\u5b57\r\n\r\nInstallation\r\n------------\r\n\r\n> NOTE: This package requires python 3.7+\r\n\r\nFrom `PYPI <https://pypi.org/project/ptt-mail-backup/>`__:\r\n\r\n::\r\n\r\n pip install ptt-mail-backup\r\n \r\nUsage\r\n-----\r\n\r\n\u57f7\u884c ``ptt-mail-backup ...``::\r\n\r\n usage: ptt-mail-backup [-h] [-u USER] [-p PASSWORD] [-d DEST] [-v]\r\n [-f FILENAME_FORMAT] (-r START END | --all)\r\n\r\n Backup PTT mail.\r\n\r\n optional arguments:\r\n -h, --help show this help message and exit\r\n -u USER, --user USER username, otherwise prompt for the value.\r\n -p PASSWORD, --pass PASSWORD\r\n password, otherwise prompt for the value.\r\n -d DEST, --dest DEST save to dest. Default: '.'\r\n -v, --verbose print verbose message.\r\n -f FILENAME_FORMAT, --filename-format FILENAME_FORMAT\r\n filename format. Default: '{index}. [{board}] {title}\r\n [{author}] ({time:%Y%m%d%H%M%S}).ans'\r\n -r START END, --range START END\r\n specify a range (inclusive). Negative values and zeros\r\n are allowed, they are treated as (last_index + value)\r\n i.e. --range 0 0 would download the last mail. This\r\n option could be used multiple times.\r\n --all download all\r\n\r\n\u6216\u662f ``python -m ptt_mail_backup ...``\u3002\r\n\r\n\u7bc4\u4f8b\r\n~~~~\r\n\r\n\u4e0b\u8f09\u6240\u6709\u4fe1\u4ef6\u5230 2018-06-12 \u8cc7\u6599\u593e::\r\n\r\n ptt-mail-backup -d 2018-06-12 --all\r\n \r\n\u4e0b\u8f09\u6700\u65b0\u7684\u5341\u5c01\u4fe1\u4ef6::\r\n\r\n ptt-mail-backup -r -9 0\r\n \r\n\u5f9e CLI \u50b3\u5165\u4f7f\u7528\u8005\u540d\u7a31\u3001\u5bc6\u78bc\uff0c\u4e26\u4e0b\u8f09\u6700\u820a\u7684\u4fe1\u4ef6::\r\n\r\n ptt-mail-backup -u myusername -p mypassword -r 1 1\r\n \r\nLicense\r\n-------\r\n\r\nThe distributed package `includes a branch of pyte <https://github.com/eight04/pyte/tree/dev-blink>`__ which supports blinking text. ``pyte`` is licensed under LGPL v3 and ``ptt_mail_backup`` itself is licensed under MIT.\r\n \r\nChangelog\r\n---------\r\n\r\n* 0.6.0 (Feb 28, 2024)\r\n\r\n - Bump dependencies.\r\n - Change: require python 3.7+.\r\n - Fix: issues with wcwidth 0.2.13.\r\n\r\n* 0.5.0 (Feb 3, 2024)\r\n\r\n - Bump dependencies.\r\n - Fix: hang while refreshing screen.\r\n\r\n* 0.4.0 (Jun 30, 2021)\r\n\r\n - Bump dependencies\r\n - Fix: hang while fetching index\r\n\r\n* 0.3.0 (Aug 26, 2019)\r\n\r\n - Breaking: stop relying on the footer information.\r\n - Fix: unable to download articles including ``**s`` or ``**n``.\r\n\r\n* 0.2.3 (Aug 21, 2019)\r\n\r\n - Fix: handle login views.\r\n\r\n* 0.2.2 (Nov 18, 2018)\r\n\r\n - Fix: Support Python 3.7.\r\n\r\n* 0.2.1 (Jul 25, 2018)\r\n\r\n - Fix: handle ``mailbox is full`` message.\r\n - Fix: handle ``add new board to favorite`` message.\r\n\r\n* 0.2.0 (Jun 22, 2018)\r\n\r\n - The distributed package now includes ``pyte`` with blinking text support.\r\n - Add: a better way to get full title.\r\n - Add: allow multiple ``--range``.\r\n - Fix: handle password error.\r\n - Fix: handle article recovery screen.\r\n - Fix: handle password attack alert screen.\r\n\r\n* 0.1.1 (Jun 12, 2018)\r\n\r\n - Fix: missing deps.\r\n\r\n* 0.1.0 (Jun 12, 2018)\r\n\r\n - First release.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Backup PTT mail",
"version": "0.6.0",
"project_urls": {
"Homepage": "https://github.com/eight04/ptt-mail-backup"
},
"split_keywords": [
"ptt",
"mail"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fba9770dce0e19f92e4469e2aef19f18ae587980fa4892be4dc8ff25ba79d9ef",
"md5": "d430c990af9386c0f152e95a8eb196b1",
"sha256": "725128fffc477936782cc463f285307a8c530db4dcefc8ed4963a99d0e35f20d"
},
"downloads": -1,
"filename": "ptt_mail_backup-0.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d430c990af9386c0f152e95a8eb196b1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 38294,
"upload_time": "2024-02-28T11:20:11",
"upload_time_iso_8601": "2024-02-28T11:20:11.897402Z",
"url": "https://files.pythonhosted.org/packages/fb/a9/770dce0e19f92e4469e2aef19f18ae587980fa4892be4dc8ff25ba79d9ef/ptt_mail_backup-0.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d390cb06ae518ae4b6144520976b707aaba39c49489a0f784fc50378a8cc190e",
"md5": "2d92c726709f827b58ef9e85cc090777",
"sha256": "445c5b77040791e105258d329736d816b075f4f5d33ee55cad7c217e05709a3f"
},
"downloads": -1,
"filename": "ptt-mail-backup-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "2d92c726709f827b58ef9e85cc090777",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 35807,
"upload_time": "2024-02-28T11:20:13",
"upload_time_iso_8601": "2024-02-28T11:20:13.438649Z",
"url": "https://files.pythonhosted.org/packages/d3/90/cb06ae518ae4b6144520976b707aaba39c49489a0f784fc50378a8cc190e/ptt-mail-backup-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-28 11:20:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eight04",
"github_project": "ptt-mail-backup",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "ptt-mail-backup"
}