Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2019, 04:17 PM   #61
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@GitHub gurus, I need some help please.

Windows 10 64bit user. I've tested my plugins for Python3 compatibility as well as I can in the 4.99.2 beta of calibre portable. However one of them does require that I also test it in a Win64 environment. For reasons best known to Microsoft, the MS SAPI functions for text-to-speech don't seem to work the same in Win32 and Win64.

To do this I'd like to create a complete new copy of Python3 run from source calibre which doesn't interfere with my normal Python2 run from source calibre. (in case it's relevant, I only ever use run from source as a convenient way of quickly testing not-yet-released features or for having access to python code.)

My knowledge and experience of GitHub cloning/pulling is limited to what I read in the calibre user manual "Getting the code", namely, from a CMD window:

To clone:
Code:
"C:\Program Files\Git\cmd\git" clone git://github.com/kovidgoyal/calibre.git
To pull:
Code:
"C:\Program Files\Git\cmd\git" pull --no-edit
I read Kovid's post #1 but do not see anything in the above 2 lines that I can change from 'master' to 'py3'.

Please can you tell me what I need to change to do what's required?

Last edited by jackie_w; 12-19-2019 at 04:20 PM.
jackie_w is offline   Reply With Quote
Old 12-19-2019, 05:46 PM   #62
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
I always just go to Github for Kovid, go to Calibre, select the Branch of 'py3' (not the default Branch of 'master'), and download the code as a Zip file.

DaltonST

Last edited by DaltonST; 12-19-2019 at 05:48 PM.
DaltonST is offline   Reply With Quote
Advert
Old 12-19-2019, 05:50 PM   #63
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by DaltonST View Post
I always just go to Github for Kovid, go to Calibre, select the Tag of 'py3' (not the default Tag of 'master'), and download the code as a Zip file.
Thank you for replying. But would I be able to keep any changed files up-to-date with some sort of PULL if I did this?
jackie_w is offline   Reply With Quote
Old 12-19-2019, 05:58 PM   #64
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
No, the indicated method is non-Github. To get new files, have to repeat the Zip download.
DaltonST is offline   Reply With Quote
Old 12-19-2019, 06:21 PM   #65
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by jackie_w View Post
I read Kovid's post #1 but do not see anything in the above 2 lines that I can change from 'master' to 'py3'.

Please can you tell me what I need to change to do what's required?
I use Github Desktop. Its a GUI interface for the most common uses for Git. With it you can change branches just with 2 clicks.
thiago.eec is offline   Reply With Quote
Advert
Old 12-19-2019, 06:48 PM   #66
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
@jackie_w,

Use the command:

Code:
git checkout py3
to switch to the "py3" branch. Since you don't have a personal branch with that name, it will find it from the remote server instead.

You can then switch between checking out master and py3 by repeating the "git checkout" command.

...

Github desktop is a very good idea to use if you're not familiar with git.
eschwartz is offline   Reply With Quote
Old 12-19-2019, 07:07 PM   #67
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by eschwartz View Post
@jackie_w,

Use the command:

Code:
git checkout py3
to switch to the "py3" branch. Since you don't have a personal branch with that name, it will find it from the remote server instead.

You can then switch between checking out master and py3 by repeating the "git checkout" command.

...

Github desktop is a very good idea to use if you're not familiar with git.
Guys, I know you're trying to help and I truly appreciate it, but I'm going to need more detail.

@eschwartz, Switch to it where? In the .bat file which I double-click when I want to run from source? If so, it currently contains 2 lines:
Code:
set CALIBRE_DEVELOP_FROM=D:\JS_git_devel\cal\src
"c:\program files\calibre2\calibre.exe"
Are you just suggesting I add the following line between the other 2 lines?
Code:
"C:\Program Files\Git\cmd\git" checkout py3
... or something else entirely?
jackie_w is offline   Reply With Quote
Old 12-19-2019, 07:14 PM   #68
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,307
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Has there been any discussion yet about volunteers for the orphan plugins? It would be nice to both avoid duplicating work and cover the common ones.

In addition to my own plugins, I've already posted py3 test versions for a couple and plan to do a few more, since I use them and did the pyqt5 migration for them.

Test version posted in thread:
  • FanFicFare
  • EpubMerge
  • EpubSplit
  • SmartEject
  • Favourites Menu*
  • View Manager*
  • Manage Series*
  • Reading List*
  • Generate Cover*

* 'orphan' plugins, IE, not mine.

Last edited by JimmXinu; 12-20-2019 at 01:28 PM. Reason: Update list
JimmXinu is offline   Reply With Quote
Old 12-19-2019, 08:21 PM   #69
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by jackie_w View Post
Guys, I know you're trying to help and I truly appreciate it, but I'm going to need more detail.

@eschwartz, Switch to it where? In the .bat file which I double-click when I want to run from source? If so, it currently contains 2 lines:
No, you do it right after you clone.

Code:
# download the calibre project
git clone https://github.com/kovidgoyal/calibre

# make sure you're actually using the correct version of the project by
# changing all the files to point to the right development branch
git checkout py3

## profit

# run calibre
calibre.bat

# update calibre by downloading new versions of all source code
# this will also update the files on disk according to your currently
# configured branch
git pull --no-edit
Do not continue to run "git checkout py3". If you do, you'll get a status message:

Already on 'py3'

and nothing will happen. It's a total waste of time.

...

To give you a non-git analogy...

git clone is like downloading a zip file and extracting it into a new folder "myproject", then creating a new folder called "current", which is a directory link to a hidden folder called "myproject/.hidden/available-versions/master". You always access the project using "current", though.
RELEVANT: when you git clone, there is an implied "git checkout master", that is run automatically by git, as part of the cloning process. This is what set your initial version to use.

git pull is like downloading a new copy of the zip file, nuking the "myproject" folder, and re-extracting.
(git checkout is *not* implicitly run here. In the analogy of the "current" link, your link still exists, and does not need changing.)

git checkout py3 is like changing the directory link for "current", to "myproject/.hidden/available-versions/py3", and future git pulls will continue to nuke myproject, update all the .hidden/available-versions/, and leave the "current" directory link intact, still pointing to your preferred version.
eschwartz is offline   Reply With Quote
Old 12-19-2019, 09:10 PM   #70
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@JimmXinu: That traceback is caused precisely by the code to preserve the clipboard contents on exit, https://bugreports.qt.io/browse/QTBUG-41125
and is now fixed.
kovidgoyal is offline   Reply With Quote
Old 12-20-2019, 12:04 AM   #71
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by jackie_w View Post
Guys, I know you're trying to help and I truly appreciate it, but I'm going to need more detail.

@eschwartz, Switch to it where? In the .bat file which I double-click when I want to run from source? If so, it currently contains 2 lines:
Code:
set CALIBRE_DEVELOP_FROM=D:\JS_git_devel\cal\src
"c:\program files\calibre2\calibre.exe"
Are you just suggesting I add the following line between the other 2 lines?
Code:
"C:\Program Files\Git\cmd\git" checkout py3
... or something else entirely?
The git commands given are to swap between branches. What they are saying is to decide which branch you need and then run the command to update your local repository to that branch. Then you do what you are doing above, except you also need to make sure the calibre binaries match the branch.

What you might want to do is do the checkout for each branch in different directories. Then you can have a startup script that sets CALIBRE_DEVELOP_FROM to the appropriate directory and runs the correct binary. That should work to run the beta version of the portable install, but, I haven't tried it yet.
davidfor is offline   Reply With Quote
Old 12-20-2019, 10:16 AM   #72
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by davidfor View Post
What you might want to do is do the checkout for each branch in different directories. Then you can have a startup script that sets CALIBRE_DEVELOP_FROM to the appropriate directory and runs the correct binary. That should work to run the beta version of the portable install, but, I haven't tried it yet.
I've done the GitHub stuff (thanks @eschwartz). My first mistake after that was not realising that I then needed to run a 4.99.2 beta version of calibre.exe. I can point at the one in beta calibre portable. It runs OK but it doesn't move me forward testing my awkward plugin which has always worked slightly differently in Win32 and Win64 environments.

Running a calibre portable 4.99.2 executable just runs my Win64 PC in Win32 mode, so I still can't test what I need to.

Is there any way, other than installing the Win64 4.99.2 beta over the top of my Win64 4.6 production version, to get these Win64 tests done? Obviously I'm not eager to mess up my production setup.
jackie_w is offline   Reply With Quote
Old 12-20-2019, 10:41 AM   #73
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
There is probably a way to tell the MSI installer service to simply extract the contents of the installer, rather than actually putting it in "C:\Program Files\".

If you cannot figure out how to do that, another thing that should work is simply copying the "C:\Program Files\Calibre2\" directory to "C:\Users\Jackie_w\My Documents\", then installing the beta. Run the production version from wherever you copied it to, run the beta by default. Or install the beta, copy that to a secondary location, and then reinstall the production version.
eschwartz is offline   Reply With Quote
Old 12-20-2019, 10:54 AM   #74
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,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Install the beta, copy c:\program files\calibre2 to somewhere else. Uninstall the beta. Install regular calibre. Now run the beta from wherever you copied it.
kovidgoyal is offline   Reply With Quote
Old 12-20-2019, 10:57 AM   #75
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,208
Karma: 16534692
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by eschwartz View Post
There is probably a way to tell the MSI installer service to simply extract the contents of the installer, rather than actually putting it in "C:\Program Files\".

If you cannot figure out how to do that, another thing that should work is simply copying the "C:\Program Files\Calibre2\" directory to "C:\Users\Jackie_w\My Documents\", then installing the beta. Run the production version from wherever you copied it to, run the beta by default. Or install the beta, copy that to a secondary location, and then reinstall the production version.
What about if I install a new Win32 4.6 production version and then a Win64 4.99.2 beta version over the top of my Win64 4.6 production? They would be sharing the same config directory. Will that trash my config?

Edit: Sorry, Kovid, didn't see your reply.

Last edited by jackie_w; 12-20-2019 at 11:02 AM.
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin Devs: Should we include a License or COPYING file? KevinH Plugins 3 08-15-2017 01:09 PM
Attn plugin developers: calibre moving to Qt 5 kovidgoyal Plugins 157 01-01-2015 11:22 PM
Can I develop a plugin in a launguage other than Python? jamawg Development 2 06-13-2014 12:38 AM
Calibre in a Python 3.2 world, attn: Kovid Kevin McAleavey Calibre 8 01-09-2012 05:49 PM
How do I Create a Python Plugin? Sydney's Mom Plugins 25 01-27-2010 06:26 AM


All times are GMT -4. The time now is 10:26 PM.


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