https://github.com/eight04/ptt-article-parser
A python tool to parse PTT articles.
https://github.com/eight04/ptt-article-parser
bbs cli ptt python
Last synced: 4 months ago
JSON representation
A python tool to parse PTT articles.
- Host: GitHub
- URL: https://github.com/eight04/ptt-article-parser
- Owner: eight04
- License: mit
- Created: 2015-04-29T02:01:08.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2021-06-30T05:07:56.000Z (almost 4 years ago)
- Last Synced: 2025-01-31T11:49:38.454Z (5 months ago)
- Topics: bbs, cli, ptt, python
- Language: Python
- Size: 140 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
PTT Article Parser
==================.. image:: https://github.com/eight04/ptt-article-parser/actions/workflows/test.yml/badge.svg
:target: https://github.com/eight04/ptt-article-parser/actions/workflows/test.yml一個用來分析 PTT 文章的工具。
Features
--------* 根據文章標題或 .DIR 檔案,重新命名檔案名稱
* 白金緩慢增加中Install
-------From `pypi `__::
pip install ptt-article-parser
Usage
-----::
PTT Article Parser (PAP)
Usage:
pap rename [--format=] [--dir=] ...
pap rename [--format=] [--dir=] --interactive
pap (--help | --version)Options:
-v --version Show version.
-h --help Show this.
-f --format= Set output format.
[default: [{board}] {title} [{author}] ({time:%Y%m%d%H%M%S}).ans]
-d --dir= Read additional ".DIR" file. The tool always tries to
read the ".DIR" file under the parent folder of the
article. Use this option to read from other locations.
-i --interactive Use interactive mode, get file name from stdin.
File path. If the file doesn't exists, pap will try to
parse it as glob pattern.For example:
::
pap rename ./M.*
Output screenshot
----------------------.. image:: http://i.imgur.com/zISlFeP.png
:alt: screenshotChangelog
---------* 0.6.0 (Jun 30, 2021)
- Bump dependencies.
* 0.5.0 (Jun 12, 2018)
- Update dependencies.
- Fix: handle crlf.
- Refactor: ptt_article_parser.tools -> ptt_article_parser.rename
- Drop uao_decode.py, switch to uao.* 0.4.0 (Feb 19, 2018)
- Change: automatically find .DIR file.
* 0.3.0 (Dec 5, 2017)
- Parse .DIR file, use the title by default.
* 0.2.1 (May 14, 2016)
- Extract author from old_edits.
- Fix installing issue (maybe more?).* 0.2.0 (Apr 16, 2016)
- Change how glob pattern work.
- Fix same file name bug.
- Rewrite. Try matching best result.* 0.1.0 (Apr 15, 2016)
- First release.