Skip to content

Commit 29c5916

Browse files
0.4.0 dev (#30)
- Complete rewrite - Use [rich-codex](https://github.com/ewels/rich-codex) to generate doc images. - Update dependencies - Drop support for [custom metadata](https://github.com/Buried-In-Code/schemas) - Add format support for Omnibus - Store logs in XDG_STATE_HOME (Defaults to `~/.local/state/perdoo`) - Add support for updating a cbz without extracting/archiving everytime - Use [Typer](https://github.com/fastapi/typer) to create subcommands and extra functionality - Drop support for Py3.8 and Py3.9 #29 - Add support for Py3.13 #28 - Convert from [xmltodict](https://github.com/martinblech/xmltodict) to [pydantic-xml](https://github.com/dapper91/pydantic-xml) - Use [comicfn2dict](https://github.com/ajslater/comicfn2dict) to better guess what the comic is when metadata is unavailable --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8b6355a commit 29c5916

44 files changed

Lines changed: 2832 additions & 2664 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,9 @@ trim_trailing_whitespace = true
99
insert_final_newline = true
1010
max_line_length = 100
1111

12-
[*.cs]
13-
indent_size = 4
14-
insert_final_newline = false
15-
16-
[{*.html,*.jte,*.kte,*.jinja}]
17-
indent_size = 4
18-
insert_final_newline = false
19-
max_line_length = off
20-
21-
[*.java]
22-
indent_size = 4
23-
insert_final_newline = false
24-
25-
[*.json]
26-
insert_final_newline = false
27-
28-
[{*.kt,*.kts}]
29-
ij_kotlin_allow_trailing_comma = true
30-
ij_kotlin_allow_trailing_comma_on_call_site = true
31-
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
32-
ij_kotlin_packages_to_use_import_on_demand = unset
33-
indent_size = 4
34-
ktlint_code_style = ktlint_official
35-
ktlint_standard = enabled
36-
ktlint_experimental = disabled
37-
ktlint_standard_string-template-indent = disabled
38-
ktlint_standard_multiline-expression-wrapping = disabled
39-
ktlint_function_signature_body_expression_wrapping = multiline
40-
max_line_length = 140
41-
4212
[*.md]
4313
trim_trailing_whitespace = false
4414
max_line_length = off
4515

4616
[*.py]
4717
indent_size = 4
48-
49-
[{*.xml,*.xsd}]
50-
indent_size = 4
51-
insert_final_newline = false
52-
max_line_length = off

.github/workflows/rich-codex.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Rich Codex
2+
3+
on:
4+
push:
5+
paths:
6+
- README.md
7+
- perdoo/__main__.py
8+
- perdoo/cli/**
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
rich_codex:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: astral-sh/setup-uv@v3
20+
- name: Setup Python
21+
run: uv python install '3.13'
22+
- name: Install project
23+
run: uv sync --dev
24+
25+
- name: Generate terminal images with rich-codex
26+
uses: ewels/rich-codex@v1
27+
with:
28+
commit_changes: true
29+
clean_img_paths: true

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ logs/
1010

1111
# =====Files=====
1212
*.iml
13-
.python-version
1413
*.log
15-
16-
# =====Project=====
14+
.pdm-python
15+
.python-version
16+
pdm.lock
17+
uv.lock

.pre-commit-config.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.5.6
3+
rev: v0.8.0
44
hooks:
55
- id: ruff-format
66
- id: ruff
77
- repo: https://github.com/executablebooks/mdformat
8-
rev: 0.7.17
8+
rev: 0.7.19
99
hooks:
1010
- id: mdformat
1111
additional_dependencies:
@@ -15,7 +15,7 @@ repos:
1515
- --number
1616
- --wrap=keep
1717
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.6.0
18+
rev: v5.0.0
1919
hooks:
2020
- id: check-ast
2121
- id: check-builtin-literals
@@ -41,8 +41,10 @@ repos:
4141
- id: trailing-whitespace
4242
args:
4343
- --markdown-linebreak-ext=md
44+
exclude_types:
45+
- svg
4446
- repo: https://github.com/pappasam/toml-sort
45-
rev: v0.23.1
47+
rev: v0.24.2
4648
hooks:
4749
- id: toml-sort
4850
args:

README.md

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
[![PyPI - Version](https://img.shields.io/pypi/v/Perdoo.svg?logo=PyPI&label=Version&style=flat-square)](https://pypi.python.org/pypi/Perdoo/)
66
[![PyPI - License](https://img.shields.io/pypi/l/Perdoo.svg?logo=PyPI&label=License&style=flat-square)](https://opensource.org/licenses/MIT)
77

8-
[![Rye](https://img.shields.io/badge/Rye-informational?style=flat-square&logo=rye&labelColor=grey)](https://rye.astral.sh)
9-
[![Pre-Commit](https://img.shields.io/badge/Pre--Commit-informational?style=flat-square&logo=pre-commit&labelColor=grey)](https://github.com/pre-commit/pre-commit)
10-
[![Ruff](https://img.shields.io/badge/Ruff-informational?style=flat-square&logo=ruff&labelColor=grey)](https://github.com/astral-sh/ruff)
8+
[![Pre-Commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&style=flat-square)](https://github.com/pre-commit/pre-commit)
9+
[![Ruff](https://img.shields.io/badge/ruff-enabled-brightgreen?logo=ruff&style=flat-square)](https://github.com/astral-sh/ruff)
1110

1211
[![Github - Contributors](https://img.shields.io/github/contributors/Buried-In-Code/Perdoo.svg?logo=Github&label=Contributors&style=flat-square)](https://github.com/Buried-In-Code/Perdoo/graphs/contributors)
1312

@@ -23,23 +22,50 @@ Unlike other tagging tools, Perdoo employs a manual approach when metadata files
2322
1. Ensure you have [Pipx](https://pipxproject.github.io/pipx/) installed: `pipx --version`
2423
2. Install the project: `pipx install perdoo`
2524

26-
### From Source
25+
## Usage
2726

28-
1. Ensure you have a supported version of [Python](https://www.python.org/) installed: `python --version`
29-
2. Clone the repository: `git clone https://github.com/Buried-In-Code/Perdoo`
30-
3. Install the project: `pip install .`
27+
<details><summary>Perdoo Commands</summary>
3128

32-
## Execution
29+
<!-- RICH-CODEX hide_command: true -->
30+
![`uv run Perdoo --help`](docs/img/perdoo-commands.svg)
3331

34-
- `Perdoo <arguments>`
32+
</details>
33+
<details><summary>Perdoo import</summary>
3534

36-
### Arguments
35+
<!-- RICH-CODEX hide_command: true -->
36+
![`uv run Perdoo import --help`](docs/img/perdoo-import.svg)
3737

38-
| Argument | Type | Description |
39-
| ----------- | ---- | ----------------------------------------------------------------------- |
40-
| `--force` | bool | Forces the sync of archives, regardless of when they were last updated. |
41-
| `--version` | bool | Displays the version of Perdoo running. |
42-
| `--debug` | bool | Displays extra/debug messages while running. |
38+
</details>
39+
40+
### Perdoo archive Commands
41+
42+
<details><summary>Perdoo archive view</summary>
43+
44+
<!-- RICH-CODEX hide_command: true -->
45+
![`uv run Perdoo archive view --help`](docs/img/perdoo-archive-view.svg)
46+
47+
</details>
48+
49+
### Perdoo settings Commands
50+
51+
<details><summary>Perdoo settings view</summary>
52+
53+
<!-- RICH-CODEX hide_command: true -->
54+
![`uv run Perdoo settings view --help`](docs/img/perdoo-settings-view.svg)
55+
56+
</details>
57+
<details><summary>Perdoo settings locate</summary>
58+
59+
<!-- RICH-CODEX hide_command: true -->
60+
![`uv run Perdoo settings locate --help`](docs/img/perdoo-settings-locate.svg)
61+
62+
</details>
63+
<details><summary>Perdoo settings update</summary>
64+
65+
<!-- RICH-CODEX hide_command: true -->
66+
![`uv run Perdoo settings update --help`](docs/img/perdoo-settings-update.svg)
67+
68+
</details>
4369

4470
## Supported Formats
4571

@@ -48,19 +74,18 @@ Unlike other tagging tools, Perdoo employs a manual approach when metadata files
4874
- .cbr
4975
- .cbt
5076
- .cbz
51-
- .cb7 _(Requires installing `cb7` dependencies: `pip install perdoo[cb7]`)_
77+
- .cb7 _(Requires installing `cb7` dependencies: `pipx install perdoo[cb7]`)_
5278

5379
### Output Extensions
5480

5581
- .cbt
5682
- .cbz _(Default)_
57-
- .cb7 _(Requires installing `cb7` dependencies: `pip install perdoo[cb7]`)_
83+
- .cb7 _(Requires installing `cb7` dependencies: `pipx install perdoo[cb7]`)_
5884

5985
### Metadata Files
6086

61-
- [Metadata.xml](https://github.com/Buried-In-Code/Schemas)
6287
- [MetronInfo.xml](https://github.com/Metron-Project/metroninfo)
63-
- Perdoo supports a slightly modified [ComicInfo.xml](https://github.com/anansi-project/comicinfo) to ignore field ordering. _See [Buried-In-Code/Schemas](https://github.com/Buried-In-Code/Schemas) for details._
88+
- Perdoo supports a slightly modified [ComicInfo.xml](https://github.com/anansi-project/comicinfo) to ignore field ordering.
6489

6590
## Services
6691

@@ -79,14 +104,15 @@ Series with a volume greater than 1 will display its volume in the title.
79104

80105
The files are named based on the format of the comic:
81106

82-
- **_Default/Comic_**: `{Series Title}_#{Issue Number}.cbz`
107+
- **_Default_**: `{Series Title}_#{Issue Number}.cbz`
83108
- Annual: `{Series Title}_Annual_#{Issue Number}.cbz`
84109
- Digital Chapter: `{Series Title}_Chapter_#{Issue Number}.cbz`
85-
- Hardcover: `{Series Title}_#{Issue Number}_HC.cbz`
86-
- Trade Paperback: `{Series Title}_#{Issue Number}_TP.cbz`
87110
- Graphic Novel: `{Series Title}_#{Issue Number}_GN.cbz`
111+
- Hardcover: `{Series Title}_#{Issue Number}_HC.cbz`
112+
- Omnibus: `{Series Title}_#{Issue Number}.cbz`
113+
- Trade Paperback: `{Series Title}_#{Issue Number}_TPB.cbz`
88114

89-
## Collection Folder Structure
115+
### Folder Structure
90116

91117
```
92118
Collection Root
@@ -95,16 +121,16 @@ Collection Root
95121
| | +-- Series_#001.cbz
96122
| | +-- Series_Annual_#01.cbz
97123
| | +-- Series_Chapter_#01.cbz
98-
| | +-- Series_#01_HC.cbz
99-
| | +-- Series_#01_TP.cbz
100124
| | +-- Series_#01_GN.cbz
125+
| | +-- Series_#01_HC.cbz
126+
| | +-- Series_#01_TPB.cbz
101127
| +-- Series-v2
102128
| | +-- Series-v2_#001.cbz
103129
| | +-- Series-v2_Annual_#01.cbz
104130
| | +-- Series-v2_Chapter_#01.cbz
105-
| | +-- Series-v2_#01_HC.cbz
106-
| | +-- Series-v2_#01_TP.cbz
107131
| | +-- Series-v2_#01_GN.cbz
132+
| | +-- Series-v2_#01_HC.cbz
133+
| | +-- Series-v2_#01_TPB.cbz
108134
```
109135

110136
## Socials

0 commit comments

Comments
 (0)