Skip to content

Commit

Permalink
0.4.0 dev (#30)
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Buried-In-Code and github-actions[bot] authored Nov 29, 2024
1 parent 8b6355a commit 29c5916
Show file tree
Hide file tree
Showing 44 changed files with 2,832 additions and 2,664 deletions.
35 changes: 0 additions & 35 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,44 +9,9 @@ trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100

[*.cs]
indent_size = 4
insert_final_newline = false

[{*.html,*.jte,*.kte,*.jinja}]
indent_size = 4
insert_final_newline = false
max_line_length = off

[*.java]
indent_size = 4
insert_final_newline = false

[*.json]
insert_final_newline = false

[{*.kt,*.kts}]
ij_kotlin_allow_trailing_comma = true
ij_kotlin_allow_trailing_comma_on_call_site = true
ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
ij_kotlin_packages_to_use_import_on_demand = unset
indent_size = 4
ktlint_code_style = ktlint_official
ktlint_standard = enabled
ktlint_experimental = disabled
ktlint_standard_string-template-indent = disabled
ktlint_standard_multiline-expression-wrapping = disabled
ktlint_function_signature_body_expression_wrapping = multiline
max_line_length = 140

[*.md]
trim_trailing_whitespace = false
max_line_length = off

[*.py]
indent_size = 4

[{*.xml,*.xsd}]
indent_size = 4
insert_final_newline = false
max_line_length = off
29 changes: 29 additions & 0 deletions .github/workflows/rich-codex.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Rich Codex

on:
push:
paths:
- README.md
- perdoo/__main__.py
- perdoo/cli/**
workflow_dispatch:

permissions:
contents: write

jobs:
rich_codex:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- name: Setup Python
run: uv python install '3.13'
- name: Install project
run: uv sync --dev

- name: Generate terminal images with rich-codex
uses: ewels/rich-codex@v1
with:
commit_changes: true
clean_img_paths: true
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ logs/

# =====Files=====
*.iml
.python-version
*.log

# =====Project=====
.pdm-python
.python-version
pdm.lock
uv.lock
10 changes: 6 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.8.0
hooks:
- id: ruff-format
- id: ruff
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.19
hooks:
- id: mdformat
additional_dependencies:
Expand All @@ -15,7 +15,7 @@ repos:
- --number
- --wrap=keep
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -41,8 +41,10 @@ repos:
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
exclude_types:
- svg
- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort
args:
Expand Down
80 changes: 53 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
[![PyPI - Version](https://img.shields.io/pypi/v/Perdoo.svg?logo=PyPI&label=Version&style=flat-square)](https://pypi.python.org/pypi/Perdoo/)
[![PyPI - License](https://img.shields.io/pypi/l/Perdoo.svg?logo=PyPI&label=License&style=flat-square)](https://opensource.org/licenses/MIT)

[![Rye](https://img.shields.io/badge/Rye-informational?style=flat-square&logo=rye&labelColor=grey)](https://rye.astral.sh)
[![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)
[![Ruff](https://img.shields.io/badge/Ruff-informational?style=flat-square&logo=ruff&labelColor=grey)](https://github.com/astral-sh/ruff)
[![Pre-Commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&style=flat-square)](https://github.com/pre-commit/pre-commit)
[![Ruff](https://img.shields.io/badge/ruff-enabled-brightgreen?logo=ruff&style=flat-square)](https://github.com/astral-sh/ruff)

[![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)

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

### From Source
## Usage

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

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

- `Perdoo <arguments>`
</details>
<details><summary>Perdoo import</summary>

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

| Argument | Type | Description |
| ----------- | ---- | ----------------------------------------------------------------------- |
| `--force` | bool | Forces the sync of archives, regardless of when they were last updated. |
| `--version` | bool | Displays the version of Perdoo running. |
| `--debug` | bool | Displays extra/debug messages while running. |
</details>

### Perdoo archive Commands

<details><summary>Perdoo archive view</summary>

<!-- RICH-CODEX hide_command: true -->
![`uv run Perdoo archive view --help`](docs/img/perdoo-archive-view.svg)

</details>

### Perdoo settings Commands

<details><summary>Perdoo settings view</summary>

<!-- RICH-CODEX hide_command: true -->
![`uv run Perdoo settings view --help`](docs/img/perdoo-settings-view.svg)

</details>
<details><summary>Perdoo settings locate</summary>

<!-- RICH-CODEX hide_command: true -->
![`uv run Perdoo settings locate --help`](docs/img/perdoo-settings-locate.svg)

</details>
<details><summary>Perdoo settings update</summary>

<!-- RICH-CODEX hide_command: true -->
![`uv run Perdoo settings update --help`](docs/img/perdoo-settings-update.svg)

</details>

## Supported Formats

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

### Output Extensions

- .cbt
- .cbz _(Default)_
- .cb7 _(Requires installing `cb7` dependencies: `pip install perdoo[cb7]`)_
- .cb7 _(Requires installing `cb7` dependencies: `pipx install perdoo[cb7]`)_

### Metadata Files

- [Metadata.xml](https://github.com/Buried-In-Code/Schemas)
- [MetronInfo.xml](https://github.com/Metron-Project/metroninfo)
- 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._
- Perdoo supports a slightly modified [ComicInfo.xml](https://github.com/anansi-project/comicinfo) to ignore field ordering.

## Services

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

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

- **_Default/Comic_**: `{Series Title}_#{Issue Number}.cbz`
- **_Default_**: `{Series Title}_#{Issue Number}.cbz`
- Annual: `{Series Title}_Annual_#{Issue Number}.cbz`
- Digital Chapter: `{Series Title}_Chapter_#{Issue Number}.cbz`
- Hardcover: `{Series Title}_#{Issue Number}_HC.cbz`
- Trade Paperback: `{Series Title}_#{Issue Number}_TP.cbz`
- Graphic Novel: `{Series Title}_#{Issue Number}_GN.cbz`
- Hardcover: `{Series Title}_#{Issue Number}_HC.cbz`
- Omnibus: `{Series Title}_#{Issue Number}.cbz`
- Trade Paperback: `{Series Title}_#{Issue Number}_TPB.cbz`

## Collection Folder Structure
### Folder Structure

```
Collection Root
Expand All @@ -95,16 +121,16 @@ Collection Root
| | +-- Series_#001.cbz
| | +-- Series_Annual_#01.cbz
| | +-- Series_Chapter_#01.cbz
| | +-- Series_#01_HC.cbz
| | +-- Series_#01_TP.cbz
| | +-- Series_#01_GN.cbz
| | +-- Series_#01_HC.cbz
| | +-- Series_#01_TPB.cbz
| +-- Series-v2
| | +-- Series-v2_#001.cbz
| | +-- Series-v2_Annual_#01.cbz
| | +-- Series-v2_Chapter_#01.cbz
| | +-- Series-v2_#01_HC.cbz
| | +-- Series-v2_#01_TP.cbz
| | +-- Series-v2_#01_GN.cbz
| | +-- Series-v2_#01_HC.cbz
| | +-- Series-v2_#01_TPB.cbz
```

## Socials
Expand Down
Loading

0 comments on commit 29c5916

Please sign in to comment.