Skip to main content

A renaming tool for PTT articles

Project description

一個用來分析 PTT 文章的工具。

Features

  • 根據文章標題或 .DIR 檔案,重新命名檔案名稱

  • 白金緩慢增加中

Install

pip install ptt-article-parser

Usage

PTT Article Parser (PAP)

Usage:
  pap rename [--format=<format>] [--dir=<file>] <file>...
  pap rename [--format=<format>] [--dir=<file>] --interactive
  pap (--help | --version)

Options:
  -v --version          Show version.
  -h --help             Show this.
  -f --format=<format>  Set output format.
                                                [default: [{board}] {title} [{author}] ({time:%Y%m%d%H%M%S}).ans]
  -d --dir=<file>       Location of ".DIR" file. [default: ./.DIR]
  -i --interactive      Use interactive mode, get file name from stdin.
  <file>                File path. If the file doesn't exists, pap will try to parse it as glob pattern.

For example:

pap rename ./M.*

Output screenshot

screenshot

Notes

Todos

  • Identify article part and pushes part.

Changelog

  • 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.

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-article-parser-0.4.0.tar.gz (108.1 kB view details)

Uploaded Source

Built Distribution

ptt_article_parser-0.4.0-py3-none-any.whl (109.8 kB view details)

Uploaded Python 3

File details

Details for the file ptt-article-parser-0.4.0.tar.gz.

File metadata

File hashes

Hashes for ptt-article-parser-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8988b1e60fb4e17617dad5712214f3d5bdd5888826138fdc24b474aac2644b57
MD5 9e33ada175f7ee680b545d3ad353a25e
BLAKE2b-256 80d1bb590100eab444fb3a9016b9f94dd826ab6596c418f695550b266d7aa271

See more details on using hashes here.

File details

Details for the file ptt_article_parser-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ptt_article_parser-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e95286981883ba518e5243314ec832b22f1cc46b80ac25b2f3cc59c8a5c50221
MD5 57dd3a7164db8231436cdc5be1896704
BLAKE2b-256 67a5a87eb8347db0a7a8541f186e39b56afe4619009bb9f4286eeda5351704e7

See more details on using hashes here.

Supported by

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