Code Monkey home page Code Monkey logo

metron-tagger's People

Contributors

bpepple avatar codacy-badger avatar dependabot[bot] avatar sourcery-ai[bot] avatar sturmianseq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sturmianseq

metron-tagger's Issues

Mokkari-3.0.0

Describe the solution you'd like
New release of Mokkari.

Fix tox failure on Windows

Describe the bug
Running tox tests on windows, causes the following error:

 =================================== ERRORS ====================================
________________ ERROR collecting tests/test_metron_tagger.py _________________
tests\test_metron_tagger.py:10: in <module>
    from metrontagger.main import (
metrontagger\main.py:17: in <module>
    SETTINGS = MetronTaggerSettings()
metrontagger\settings.py:36: in __init__
    folder = MetronTaggerSettings.get_settings_folder()
metrontagger\settings.py:19: in get_settings_folder
    windows_path = PurePath(environ["APPDATA"]).joinpath("MetronTagger")
C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\os.py:675: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'APPDATA'
=========================== short test summary info ===========================
ERROR tests/test_metron_tagger.py - KeyError: 'APPDATA'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 0.26s ===============================
ERROR: InvocationError for command 'C:\Users\runneradmin\AppData\Roaming\Python\Scripts\bin\poetry.EXE' run pytest tests/ (exited with code 2)

Desktop:

  • OS: Windows

Additional context
Looks like this code is causing the problem:
https://github.com/bpepple/metron-tagger/blob/2b4a86efc6703d66ed893fefb8338b6b0ffa1410/metrontagger/settings.py#L19

Need to see how this information should be retrieved (tho since I don't have a windows machine it will probably require a bit of google-fu).

Error when tagging files

-o creates the following error on my Windows install:

Starting online search and tagging:

Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Python312\Scripts\metron-tagger.exe_main
.py", line 7, in
File "C:\Users\Matt\AppData\Roaming\Python\Python312\site-packages\metrontagger\cli.py", line 64, in main
runner.run()
File "C:\Users\Matt\AppData\Roaming\Python\Python312\site-packages\metrontagger\run.py", line 322, in run
t.identify_comics(file_list, self.config)
File "C:\Users\Matt\AppData\Roaming\Python\Python312\site-packages\metrontagger\talker.py", line 296, in identify_comics
issue_id, multiple_match = self._process_file(fn, config.interactive)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Matt\AppData\Roaming\Python\Python312\site-packages\metrontagger\talker.py", line 161, in process_file
source, id
= self._get_source_id(md)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Matt\AppData\Roaming\Python\Python312\site-packages\metrontagger\talker.py", line 127, in _get_source_id
lower_notes = md.notes.lower()
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'

Windows 11. Running out of both cmd and Powershell

Connection Timeout Error when searching online

Describe the bug
While searching online, a connection timeout exception error was produced

Expected behavior
This exception should be handled correctly.

Additional context

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bpepple/.local/bin/metron-tagger", line 8, in <module>
    sys.exit(main())
  File "/home/bpepple/.local/lib/python3.8/site-packages/metrontagger/main.py", line 239, in main
    issue_id, multiple_match = process_file(filename, match_results, talker)
  File "/home/bpepple/.local/lib/python3.8/site-packages/metrontagger/main.py", line 114, in process_file
    res = talker.search_for_issue(query_dict)
  File "/home/bpepple/.local/lib/python3.8/site-packages/metrontagger/taggerlib/metrontalker.py", line 88, in search_for_issue
    return self.fetch_response(url)
  File "/home/bpepple/.local/lib/python3.8/site-packages/ratelimit/decorators.py", line 113, in wrapper
    return func(*args, **kargs)
  File "/home/bpepple/.local/lib/python3.8/site-packages/ratelimit/decorators.py", line 80, in wrapper
    return func(*args, **kargs)
  File "/home/bpepple/.local/lib/python3.8/site-packages/metrontagger/taggerlib/metrontalker.py", line 57, in fetch_response
    content = urlopen(request, context=self.ssl)
  File "/usr/lib64/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib64/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib64/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib64/python3.8/urllib/request.py", line 1393, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib64/python3.8/urllib/request.py", line 1353, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 110] Connection timed out>
bpepple@frodo ~ $ uname -a
Linux frodo 5.7.16-200.fc32.x86_64 #1 SMP Wed Aug 19 16:58:53 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

[Feature Request] Use existing `comicinfo.xml` to identify comic

Is your feature request related to a problem?
Sometimes users will want to get data from Metron on comics that have been already tagged with Comic Vine data from using ComicTagger.

Describe the solution you'd like
Read the comics comicinfo.xml and get the CVID, and use that to query the Issue endpoint using the cv_id param.

Describe alternatives you've considered
Wouldn't be a bad idea to also read comicinfo.xml that were written with metron-tagger and use the metron issue id to update the users metadata with fresh data.

Add support for Issue rating

Is your feature request related to a problem? Please describe.
Now that Metron has rating field for issues, we can use that information in the metadata files.

Identify and Remove Duplicate Pages

Is your feature request related to a problem? Please describe.
Might be nice to have a feature that detected duplicated pages among a users books, and give them the option to delete them.

Describe the solution you'd like
Just a command line option that will scan a directory of books. To show the duplicated images to the user, using something like this should suffice:

>>> from PIL import Image
>>> img = Image.open("p-milanez.webp")
>>> img.show()

Additional context
Komga has this feature, which is documented here

Add option for interactive matching

Is your feature request related to a problem? Please describe.

Sometimes the user might want to be shown what information from Metron is going to be written in a tag before it's done.

Describe the solution you'd like

Simple option for the user to use to go into an interactive mode showing the comic issue matched from Metron.

Strip commas from Series Name

Describe the bug
There are some situations where having a comma in the filename fails to match with the API. For example:

Moon Knight - Black, White, & Blood 001

This wouldn't result in a match since the series name on Metron is Moon Knight: Black, White & Blood (Note the lack of a comma after 'White')

Solution
If we strip the series name of any commas (and it might make sense to do it for other special characters), it should produce a match.

[Regression] Metron-Tagger doesn't write comic credits to tag

Describe the bug
Metron-Tagger no longer writes the creator credits to the tag file.

To Reproduce
Steps to reproduce the behavior:

  1. Perform an online search for a comic archive.
  2. Check the comics tag file for any creator credits.

Expected behavior
The comic creator credits are written to the tag file

  • Version metron-tagger-1.0.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.