metron-project / metron-tagger Goto Github PK
View Code? Open in Web Editor NEWCommand line tool to tag comic archives with metadata from Metron Comic Book Database.
Home Page: https://metron.cloud/
License: GNU General Public License v3.0
Command line tool to tag comic archives with metadata from Metron Comic Book Database.
Home Page: https://metron.cloud/
License: GNU General Public License v3.0
Describe the solution you'd like
New release of Mokkari.
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:
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).
-o creates the following error on my Windows install:
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
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
Ask for user input on issues with multiple matches after all issues have been searched, so main processing isn't held up.
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.
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.
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
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.
Describe the bug
Removed code for Window in setting.py. Need to re-add that functionality.
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.
Describe the bug
Metron-Tagger no longer writes the creator credits to the tag file.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The comic creator credits are written to the tag file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.