Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-12-2017, 11:03 PM   #16
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
It works for mac, windows and linux. Python and PyQt4 run on all three platforms.

I don't have a mac, but I think it should be even easier than on windows. As far as I know, python is pre-installed on MacOS. You would only need PyQt4 for the gui (the comand line should work without it).
dickloraine is offline   Reply With Quote
Old 06-12-2017, 11:40 PM   #17
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Oh, OK, it looks like it will work for Mac. Sorry for the dumb question... but I'm not sure what Python and PyQt4 are.
American_Desi is offline   Reply With Quote
Advert
Old 06-13-2017, 09:01 AM   #18
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Python is a computer language, much of calibre is written in Python. Qt is a set of software libraries (a framework in the modern parlance) that facilitates the development of applications that can run on multiple platforms (e.g. Windows, OSX, Linux etc). PyQt4 is the glue that binds Python to Qt Version 4.

BR
BetterRed is offline   Reply With Quote
Old 06-13-2017, 10:29 AM   #19
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
You can get python here:
https://www.python.org/downloads/release/python-2713/

Homebrew: https://brew.sh/ is like chocolatey for mac os. With
brew install pyqt
You can then install pyqt4
dickloraine is offline   Reply With Quote
Old 06-23-2017, 12:50 AM   #20
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Quote:
Originally Posted by dickloraine View Post
You can get python here:
https://www.python.org/downloads/release/python-2713/

Homebrew: https://brew.sh/ is like chocolatey for mac os. With
brew install pyqt
You can then install pyqt4
OK, thanks for the help so far. Sorry for seeming dense, but this is all new to me. I installed Python and then installed Homebrew using the paste to terminal option. I'm actually not at all familiar with chocolatey.

So, I understand that the next step is to install something called pyqt4 using Homebrew.

So... how do I do that, exactly?
American_Desi is offline   Reply With Quote
Advert
Old 06-23-2017, 06:21 AM   #21
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Quote:
Originally Posted by American_Desi View Post
OK, thanks for the help so far. Sorry for seeming dense, but this is all new to me. I installed Python and then installed Homebrew using the paste to terminal option. I'm actually not at all familiar with chocolatey.

So, I understand that the next step is to install something called pyqt4 using Homebrew.

So... how do I do that, exactly?
You open the terminal and enter:
brew install pyqt

After that you go to the folder where you unzipped comictagger to and enter in the terminal:
pip install -r requirements.txt

Now comictagger can be started. You can try to just click on comictagger.py. If this doesn't work, enter the terminal again and type:
python comictagger.py
You can put that into a batch file, so that you don't have to enter the terminal every time you want to use comictagger.
dickloraine is offline   Reply With Quote
Old 06-25-2017, 05:44 PM   #22
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Quote:
Originally Posted by dickloraine View Post
You open the terminal and enter:
brew install pyqt

After that you go to the folder where you unzipped comictagger to and enter in the terminal:
pip install -r requirements.txt

Now comictagger can be started. You can try to just click on comictagger.py. If this doesn't work, enter the terminal again and type:
python comictagger.py
You can put that into a batch file, so that you don't have to enter the terminal every time you want to use comictagger.
OK, so this time when I did "brew install pyqt" it worked. Don't know why it didn't work the first time.

I was able to navigate into the directory where I unzipped the comictagger-master folder. It's in my users/Applications directory. There I installed i using the above directions and it looks like worked. I then clicked on "comictagger.py" in that director. Here's where things got a little weird. It opened a program called Xcode. I think I installed that a long time ago and never used it. Anyway, when I reloaded the program, I got a window that says "comictagger.py" and underneath it says:

#! python2.7
from comictaggerlib.main import ctmain

if __name__ == '__main__':


It looks like I can drag and drop a comic into it but nothing else happens... is there a button or command I'm supposed to put in to get it to process the file and find the metadata?
American_Desi is offline   Reply With Quote
Old 06-25-2017, 06:25 PM   #23
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Xcode seems to be registered as the standard program to open python files on your system. So it just opens the file as a text document. I don't know how to change that on a mac, maybe someone else can help with that (on windows , a right click would give you a context menu, where you coul use "open with" and select python. Maybe that is similar on a mac). For now, just open a terminal in the folder. There enter
python comictagger.py
That should work. If not, python is not in your path. If that is the case, you have to type the complete path to your python installation, instead of just python.
dickloraine is offline   Reply With Quote
Old 06-25-2017, 07:54 PM   #24
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Quote:
Originally Posted by dickloraine View Post
Xcode seems to be registered as the standard program to open python files on your system. So it just opens the file as a text document. I don't know how to change that on a mac, maybe someone else can help with that (on windows , a right click would give you a context menu, where you coul use "open with" and select python. Maybe that is similar on a mac). For now, just open a terminal in the folder. There enter
python comictagger.py
That should work. If not, python is not in your path. If that is the case, you have to type the complete path to your python installation, instead of just python.
I kept getting syntax errors when I did this. I think perhaps I must have messed with the comictagger.py file somehow when I had it open and was trying to import comic files into it. So.... I deleted the whole Comictagger-master directory and reinstalled it, both by putting the directory back in the same place and running the install command in the terminal. This time when I run it using the "python comictagger.py" command, it says that PyQt4 is not available and that ComicTagger is limited to command-line mode. So, I tried to redo the Pyqt installation using "brew install pyqt" It says something to the effect that pyqt 5.8.2 is already installed. Yet I get the same message about pyqt being not available when I run comictagger.
American_Desi is offline   Reply With Quote
Old 06-26-2017, 09:25 AM   #25
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Argh, apparently brew installs only PyQt5.
Try the version of comictagger I attached to this post. It uses PyQt5 instead of PyQt4.
Attached Files
File Type: zip ComictaggerPyQt5.zip (808.6 KB, 135 views)

Last edited by dickloraine; 06-26-2017 at 09:28 AM.
dickloraine is offline   Reply With Quote
Old 06-26-2017, 09:01 PM   #26
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Quote:
Originally Posted by dickloraine View Post
Argh, apparently brew installs only PyQt5.
Try the version of comictagger I attached to this post. It uses PyQt5 instead of PyQt4.
Thanks! I hope I'm getting closer, but it's now telling me that "PyQt5 is not available. ComicTagger is limited to command-line mode." This is in spite of the fact that it tells me that, "pyqt 5.8.2 is already installed"

If it helps, I am including the entire terminal window dialogue which occurred after unzipping the ComicTagger to the user/Applications directory. Aside from the occasional typos/wrongly written commands, if I did anything obviously wrong, try not to laugh too hard.... I haven't done command-line type entry since my college days taking courses using Linux systems. I have fond memories of those courses, but a computer programmer I definitely am not.

Last login: Sun Jun 25 20:28:59 on console
You have mail.
ComputerName:~ username$ cd applications
ComputerName:applications username$ cd Comictagger
ComputerName:Comictagger username$ pip install -r requirements.txt
Requirement already satisfied: configparser in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: beautifulsoup4>=4.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 2))
ComputerName:Comictagger username$ python comictagger.py
PyQt5 is not available. ComicTagger is limited to command-line mode.
You must specify at least one filename. Use the -h option for more info
ComputerName:Comictagger username$ brew installpyqt
Error: Unknown command: installpyqt
ComputerName:Comictagger username$ brew install pyqt
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
mruby-cli openfortivpn
==> Updated Formulae
angband folly jsoncpp paket weechat
camlp5 fwup lapack pegtl zurl
fibjs ipv6calc magic-wormhole pqiv
flow jenkins mkvtoolnix scalaenv

Warning: pyqt 5.8.2 is already installed
ComputerName:Comictagger username$ pip install-r requirements.txt
ERROR: unknown command "install-r" - maybe you meant "install"
ComputerName:Comictagger username$ pip install -r requirements.txt
Requirement already satisfied: configparser in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied: beautifulsoup4>=4.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 2))
ComputerName:Comictagger username$ python comictagger.py
PyQt5 is not available. ComicTagger is limited to command-line mode.
You must specify at least one filename. Use the -h option for more info
ComputerName:Comictagger username$ brew install pyqt5
Warning: pyqt 5.8.2 is already installed
ComputerName:Comictagger username$
American_Desi is offline   Reply With Quote
Old 06-26-2017, 11:20 PM   #27
dickloraine
Guru
dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.dickloraine ought to be getting tired of karma fortunes by now.
 
Posts: 631
Karma: 7544080
Join Date: Apr 2013
Location: Berlin
Device: PRS 350, Kobo Aura
Unfortunately I don't know macs. Brew likely installed it in the wrong place or the wrong python version is in your path. Maybe google can help you finding what to copy where. Another way would be to use https://www.continuum.io/downloads instead of pure python. Anaconda should be more easy to use and has its own package manager with many prebuild packages. Maybe it even ships with pyqt, otherwise
conda install pyqt
Will install it. To start comictagger with it, you need to make shure to start it with anacondas python. Maybe it automatically configeres your path, then just
python comictagger.py
Will suffice. Otherwise replace python with the path to anacondas python executable.
dickloraine is offline   Reply With Quote
Old 06-26-2017, 11:27 PM   #28
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just FYI, you can run python scripts using calibre without needing to install python/pyqt/etc.

/Applications/calibre.app/Contents/calibre-debug.app/Contents/MacOS/calibre-debug file.py
kovidgoyal is offline   Reply With Quote
Old 06-27-2017, 12:39 AM   #29
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Quote:
Originally Posted by kovidgoyal View Post
Just FYI, you can run python scripts using calibre without needing to install python/pyqt/etc.

/Applications/calibre.app/Contents/calibre-debug.app/Contents/MacOS/calibre-debug file.py
Let's just say I did that... what exactly do I do to run the ComicTagger software? Are you saying I should go the above directory (which I was able to find) and run it from there within terminal? In that case, I would move the ComicTagger directory there?
American_Desi is offline   Reply With Quote
Old 06-27-2017, 01:09 AM   #30
American_Desi
Connoisseur
American_Desi began at the beginning.
 
Posts: 72
Karma: 10
Join Date: Oct 2016
Device: iPad Pro 12.9"
Quote:
Originally Posted by dickloraine View Post
Unfortunately I don't know macs. Brew likely installed it in the wrong place or the wrong python version is in your path. Maybe google can help you finding what to copy where. Another way would be to use https://www.continuum.io/downloads instead of pure python. Anaconda should be more easy to use and has its own package manager with many prebuild packages. Maybe it even ships with pyqt, otherwise
conda install pyqt
Will install it. To start comictagger with it, you need to make shure to start it with anacondas python. Maybe it automatically configeres your path, then just
python comictagger.py
Will suffice. Otherwise replace python with the path to anacondas python executable.
So I tried the latter approach, installing Anaconda with the above link. It looks like it came with some version of Python. Here is what happened when I tried to run it:

ComputerName:Applications username$ cd Comictagger
ComputerName:Comictagger username$ python comictagger.py
Traceback (most recent call last):
File "comictagger.py", line 2, in <module>
from comictaggerlib.main import ctmain
File "/Users/username/Applications/Comictagger/comictaggerlib/main.py", line 76
print "Key set"
^
SyntaxError: Missing parentheses in call to 'print'


It then occurred to me that I should reinstall pyqt, so I did this:

ComputerName:Comictagger username$ conda install pyqt
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /Users/username/anaconda:

The following packages will be UPDATED:

anaconda: 4.4.0-np112py36_0 --> custom-py36_0
conda: 4.3.21-py36_0 --> 4.3.22-py36_0
pyqt: 5.6.0-py36_1 --> 5.6.0-py36_2

Proceed ([y]/n)? y

anaconda-custo 100% |################################| Time: 0:00:00 2.62 MB/s
pyqt-5.6.0-py3 100% |################################| Time: 0:00:00 8.74 MB/s
conda-4.3.22-p 100% |################################| Time: 0:00:00 10.21 MB/s


Looks like it worked, from what I see, so I next did this:

ComputerName:Comictagger username$ python comictagger.py
Traceback (most recent call last):
File "comictagger.py", line 2, in <module>
from comictaggerlib.main import ctmain
File "/Users/username/Applications/Comictagger/comictaggerlib/main.py", line 76
print "Key set"
^
SyntaxError: Missing parentheses in call to 'print'
ComputerName:Comictagger username$


I'm still getting this syntax error for some reason. I feel like I'm doing something stupid but I'm not sure what it is.
American_Desi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Embed Comic Metadata dickloraine Plugins 113 02-22-2024 01:01 PM
Problems finding a port for Calibre Server cptnemo Library Management 4 09-10-2012 02:37 AM
Comic Book / Graphic Novels: problems famousboot Kindle Fire 7 01-08-2012 03:16 AM
Comic Book Conversion with Calibre bmwr1200c Conversion 4 08-11-2011 03:31 PM
problems with metadata in Calibre dismukes Library Management 8 02-16-2011 02:06 PM


All times are GMT -4. The time now is 08:53 AM.


MobileRead.com is a privately owned, operated and funded community.