Commit Graph

30 Commits

Author SHA1 Message Date
Timmy Welch
bf0a46055a Fix parsing ' in filenames
Fixes #672
2024-12-06 23:18:45 -08:00
Timmy Welch
1803a37591 Handle None values when doing conversions and catch indexing errors 2024-09-17 09:20:11 -07:00
Timmy Welch
c28dc19df6 Improve filename parsing 2024-06-29 18:43:40 -07:00
Timmy Welch
979a54e2b8 Fix lexing a dot '.' as a symbol
Fixes #652
2024-06-03 13:06:49 -07:00
Timmy Welch
887c383229 Fix an infinite loop issue parsing numbers outside of 0-9 fixes #639 2024-04-29 10:20:25 -07:00
Timmy Welch
8b4bf8d51f Allow preserving the original filename when moving 2024-04-27 19:25:33 -07:00
Timmy Welch
b2d3869488 Update filerenaming for web_links
Ensure the j specifier in MetadataFormatter converts to str before joining
Add a web_link variable to the filerenamer
2024-02-17 17:42:07 -08:00
pre-commit-ci[bot]
df762746ec [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-01-29 17:14:26 +00:00
Timmy Welch
1ff6f1768b Use importlib.resources instead of __file__ 2023-11-25 12:32:50 -08:00
Timmy Welch
bd9b3522d8 Improve edge cases
Lex `'` as a symbol
Lex multiple symbols as a single item
Prefer `$` at the start of a number
Simplify issue number parsing
2023-10-27 23:26:40 -07:00
Timmy Welch
29ddc3779a Ensure FilenameInfo is always filled out fixes #556 2023-10-23 21:08:55 -07:00
Timmy Welch
114a0bb615 Fix parsing '&' with the "complicated" filename parser 2023-10-12 01:26:31 -07:00
Timmy Welch
abfd97d915 Merge branch 'protofolius_issue_scheme' into develop 2023-10-11 17:05:27 -07:00
Timmy Welch
582b8cc57b Add more parseable filenames 2023-10-11 17:03:07 -07:00
Timmy Welch
78a890f900 Fix parsing a month name in the series fixes #542 2023-10-06 20:06:39 -07:00
Timmy Welch
f6be7919d7 Implement support for protofolius's permission scheme 2023-09-06 04:50:05 -04:00
Timmy Welch
ea84031b87 Add more 4-digit issue number tests 2023-08-04 21:04:21 -07:00
Timmy Welch
2c3a2566cc Convert ComicIssue into GenericMetadata
I could not find a good reason for ComicIssue to exist other than that
 it had more attributes than GenericMetadata, so it has been replaced.
New attributes for GenericMetadata:
  series_id:        a string uniquely identifying the series to tag_origin
  series_aliases:   alternate series names that are not the canonical name
  title_aliases:    alternate issue titles that are not the canonical name
  alternate_images: a list of urls to alternate cover images

Updated attributes for GenericMetadata:
  genre        -> genres:        str -> list[str]
  comments     -> description:   str -> str
  story_arc    -> story_arcs:    str -> list[str]
  series_group -> series_groups: str -> list[str]
  character    -> characters:    str -> list[str]
  team         -> teams:         str -> list[str]
  location     -> locations:     str -> list[str]
  tag_origin   -> tag_origin:    str -> TagOrigin (tuple[str, str])

ComicSeries has been relocated to the ComicAPI package, currently has no
 usage within ComicAPI.
CreditMetadata has been renamed to Credit and has replaced Credit from
 ComicTalker.
fetch_series has been added to ComicTalker, this is currently only used
 in the GUI when a series is selected and does not already contain the
 needed fields, this function should always be cached.

A new split function has been added to ComicAPI, all uses of split on
 single characters have been updated to use this

cleanup_html and the corresponding setting are now only used in
 ComicTagger proper, for display we want any html directly from the
 upstream. When applying the metadata we then strip the description of
 any html.

A new conversion has been added to the MetadataFormatter:
  j: joins any lists into a string with ', '. Note this is a valid
     operation on strings as well, it will add ', ' in between every
     character.

parse_settings now assigns the given ComicTaggerPaths object to the
 result ensuring that the correct path is always used.
2023-08-02 09:00:04 -07:00
Timmy Welch
f83f72fa12
Improve issue number handling regarding the '#' 2022-12-31 02:15:17 -08:00
Timmy Welch
fb4786159d
Handle issue numbers with more than 3 digits 2022-12-30 21:50:10 -08:00
Timmy Welch
a6d55cd21a
Update MetadataFormatter
Several custom conversions (the s in {title!s}) have been created
u - str.upper()
l - str.casefold()
S - str.swapcase()
t - str.title()
c - str.Capitalize()

A new syntax has been added '{title+str}' and '{title-str}':
The + indicates an alternate value.
The - indicates a default value.

If the title of a comic is not set then
'{title-str}' will output 'str'
and
'{title+str} will output ''

If the title of a comic is 'hello' then
'{title+str}' will output 'str'
and
'{title-str}' will output 'hello'
2022-10-04 16:15:20 -07:00
Timmy Welch
acaf5ed510
Fix issues with renaming
Stop a crash when renaming
Properly handle replacements on linux/macos
2022-09-17 01:28:26 -07:00
Timmy Welch
06255f7848 Perform replacements on literal text and format values 2022-08-18 13:48:23 -07:00
Timmy Welch
00e649bb4c Move colon handling when renaming to the MetadataFormatter class
Fixes #356
2022-08-17 16:16:38 -07:00
Timmy Welch
aadeb07c49 Fix issues
Refactor add_to_path with tests
Fix type hints for titles_match
Use casefold in get_language
Fix using the recursive flag in cli mode
Add http status code to ComicVine exceptions
Fix parenthesis getting removed when renaming
Add more tests
2022-08-08 18:05:06 -07:00
Timmy Welch
a00891f622 Add more tests 2022-07-13 22:27:31 -07:00
Timmy Welch
cb5b321539 Update filerenamer
Remove space separated right partition of previous literal text
2022-06-26 01:53:40 -07:00
Timmy Welch
b9af606f87 Improve filename parsing and cover image scaling
Cover image scaling now uses the smooth transformation option in Qt
Filename parsing now identifies a single number as a filename
e.g. '52.cbz' gets parsed as issue: 52 and series: 52
2022-06-09 12:31:57 -07:00
Timmy Welch
ff73cbf2f9 Fix small issues
Fix spelling errors
Remove Redundant exception types
Remove dead code
Change the forum link to point to GitHub discussions
2022-06-07 20:22:33 -07:00
Timmy Welch
fd4c453854 Apply pre-commit configuration 2022-06-02 18:32:16 -07:00