-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cli commands for ptt and parsett
- Loading branch information
1 parent
9222c56
commit 7580b29
Showing
7 changed files
with
102 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# Project specific files | ||
.vscode | ||
*.txt | ||
data.json | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import argparse | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description="Parse filename or torrent name using Parsett") | ||
parser.add_argument('filename', type=str, help="Parse filename") | ||
|
||
args = parser.parse_args() | ||
|
||
if args.filename: | ||
from PTT import parse_title | ||
print(parse_title(args.filename)) | ||
|
||
if __name__ == "__main__": | ||
main() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,14 @@ version = "1.3.1" | |
description = "PTT" | ||
authors = ["Dreu LaVelle <[email protected]>"] | ||
license = "MIT" | ||
package-mode = true | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
regex = "^2023.12.25" | ||
arrow = "^1.3.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pyright = "^1.1.352" | ||
pyperf = "^2.2.0" | ||
ruff = "^0.3.0" | ||
isort = "^5.10.1" | ||
|
@@ -20,6 +20,7 @@ pytest-cov = "^5.0.0" | |
codecov = "^2.1.13" | ||
coverage = "^7.4.4" | ||
black = "^24.4.2" | ||
pytest-xdist = "^3.6.1" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
|
@@ -28,6 +29,10 @@ build-backend = "poetry.core.masonry.api" | |
[[tool.poetry.packages]] | ||
include = "PTT" | ||
|
||
[tool.poetry.scripts] | ||
parsett = "cli:main" | ||
ptt = "cli:main" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters