Lots of changes, including some breaking ones.
API changes
- :warning: `mandown.convert(..., convert_to, ...)` has been renamed to `mandown.convert(..., to, ...)` (0516b365bb98ece040ca68a5a5c42b88dd723695)
- :warning: `mandown.init_parse_comic()` now only accepts a `BaseComic` instead of a `str` URL. You can mimick legacy behaviour by calling `mandown.query(url)` to get the equivalent `BaseComic`.
- `mandown.init_parse_comic()` can download the cover image upon initialisation if `download_cover=True` is passed (0d622d545a847fe7542e9dcc6b370c216b27cf87)
- ***Many*** documented functions are now exposed through the Mandown API: (52)
- `mandown.ConvertFormats` is an Enum that lists all of the supported formats
- `mandown.get_converter` returns the class for a given ConvertFormat
- `mandown.ProcessConfig` is mostly used for the `resize` process op
- `mandown.ProcessOps` is an Enum that lists all of the supported operations
- `mandown.Processor` is the class doing the heavy lifting to process things
- `mandown.BaseComic`, `mandown.BaseMetadata`, and `mandown.BaseChapter` are often passed around Mandown, and now it's easier to instantiate them directly
- `mandown.MD_METADATA_FILE` is the name of `md-metadata.json` if you ever want to use it in a future-compatible way
- `mandown.ProcessOptionMismatchError` is raised if you don't know how to use `resize` properly
- `mandown.SupportedProfiles` is a **union type alias** for each of the possible processing device profiles
- `mandown.all_profiles` is a dict of all supported profiles and their properties
- `mandown.process` and `mandown.process_progress` now accept a `ProcessConfig` object to specify the options for the `resize` operation, which was also added to `ProcessOps` (51)
- e.g., `mandown.process("/path", ["resize"], ProcessConfig(output_profile="kindle"))`
- A valid `ProcessConfig` with one of `output_profile` or `target_size` set is **required** for the `resize` operation, which will throw `ProcessOptionMismatchError`, `ValueError`, and `AttributeError` if not set up properly.
- A list of all profiles was added and exposed in `mandown.all_profiles`
- `mandown.convert` and `mandown.convert_progress` now accept `remove_after: bool = False` to delete the original folder after conversion (50)
CLI changes
- The `--download-cover` (shorthand `-d`) flag was added for `mandown init-metadata` to mimick API behaviour and make the UX more smooth (0d622d545a847fe7542e9dcc6b370c216b27cf87)
- **`mandown init-metadata` now defaults to an interactive prompt.** Use `mandown init-metadata --help` for a look at the regular options. (36f83153b8d49a0383a4f9e7288209bfe9d19908)
- The `--remove-after` (shorthand `-r`) flag was added for `mandown get --convert` and `mandown convert` with the same effect as in the API (50)
- Resizing images was added to the `process` and `mandown get -p` command with one of the following flags required (`--target-size` / `-z` or `--profile` / `-r`) (51, 52)
- e.g., `mandown process resize --profile kindle` to resize images for the original Kindle!
- e.g., `mandown process resize --target-size 480 640` to resize images to 480x640!
- `mandown --list-profiles` was added to list all of the device profiles
- A *lot* of nicer error and help messages!
Bug fixes
Y'know, there's probably at least one bug that's fixed. Lots more introduced, too.
Misc
- Lots of documentation was added in the `/docs` folder and functions are now as documented as ever thanks to Copilot!