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 05-03-2017, 05:47 PM   #16
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
... additional info in case it's relevant ...

The /sysfiles/temp part of my versions of the 'message' fields are my Windows Temp directory which is actually located at D:\sysfiles\Temp not the default C:\Users\username\AppData\Local\Temp

Might this be the problem?
jackie_w is offline   Reply With Quote
Old 05-03-2017, 07:07 PM   #17
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Following up on my own thoughts...

I've managed to make EpubCheck work on my PC by making the following minor changes:

1. lines 154-157

Code:
                    if iswindows:
                        # drive_letter = os.getenv("SystemDrive")    
                        # line = re.sub(drive_letter, 'C^',  line)
                        # line = re.sub(drive_letter.lower(), 'C^',  line)
                        pathx = epub_path.replace(os.sep, '/')
                        line = re.sub(pathx, '',  line)
and also comment out lines 191 and 192

Code:
                    # if iswindows:
                    #    filename = os.path.basename(re.sub('C^', drive_letter, filename))
Only time will tell whether it's a robust solution or a temporary Band-Aid
jackie_w is offline   Reply With Quote
Advert
Old 05-03-2017, 07:22 PM   #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: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by jackie_w View Post
... additional info in case it's relevant ...

The /sysfiles/temp part of my versions of the 'message' fields are my Windows Temp directory which is actually located at D:\sysfiles\Temp not the default C:\Users\username\AppData\Local\Temp
So... it seems you are not a '...a plain old Windows user..."

Quote:
Originally Posted by jackie_w View Post
Might this be the problem?
Could be - in theory plugins 'should' use the same place for their temporary files as the host application uses, but with a wrapper around 3rd party java code who knows.

Calibre's temporary location can be set by the CALIBRE_TEMP_DIR environment variable.

There are two sets of TEMP and TMP environment variables, one at the System and one per User level. I don't why, when, and by what the System ones are used, I've never noticed them at my %systemroot% location. There's also a Temp folder in %windir%

It might also be the Path setting, make sure there's only one entry for Java in particular.

I find Rapid Environment Editor useful for 'managing' environment variables, see attachment.

BR
Attached Thumbnails
Click image for larger version

Name:	envvars.jpg
Views:	716
Size:	117.2 KB
ID:	156504  
BetterRed is offline   Reply With Quote
Old 05-03-2017, 07:50 PM   #19
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by BetterRed View Post
So... it seems you are not a '...a plain old Windows user..."
Emphasis on the 'old'

When I got this new laptop I was told my C: drive was an SSD drive and that they wore out faster than normal hard disks. Given how much calibre epub tweaking I do I concluded the Temp directory was going to see a lot of action so I'd better move it to the D: drive which is not SSD. All my programs are installed on C:. (I wish I fully understood what I've just written).
jackie_w is offline   Reply With Quote
Old 05-03-2017, 08:50 PM   #20
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: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by jackie_w View Post
Emphasis on the 'old'
As long as it's not on the 'plain'

SSD's wearing out faster is theoretically true, but for practical purposes its an Urban Myth

But why not give calibre its own temp folder - as I have, not to save war and tar on my SSD just so's I can get at things when I want them.

BR
BetterRed is offline   Reply With Quote
Advert
Old 06-18-2017, 02:31 PM   #21
Feldegast
Junior Member
Feldegast began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2014
Device: samsung galaxy s2
Exclamation not showing file names in list of errors

when i run epub check it shows me the 1st html file that has an error but not files after that and if the 1st error is not in the 1st html file it doesn't show the name of the 1st file with an error
when i run the same file on http://validator.idpf.org/application/validate it shows the file names

instead of the file name it returns NA

i am using epub check 0.1.1
calibre 3.0
on OSX Sierra 10.12.5
Feldegast is offline   Reply With Quote
Old 06-18-2017, 02:48 PM   #22
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Feldegast View Post
when i run epub check it shows me the 1st html file that has an error but not files after that
The plugin hasn't been thoroughly tested with the macOS version of Calibre. BTW, it's known to cause problems, if users change the default temp folder location.

In order to fix this problem, I'll need the file that caused this problem. Please zip it up in a password protected .zip file and send me the download link and the password via PM.
Doitsu is offline   Reply With Quote
Old 06-23-2017, 02:18 AM   #23
Feldegast
Junior Member
Feldegast began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2014
Device: samsung galaxy s2
not showing file names in list of errors

i will send you the next one i find an issue with
i have not changed the location of the temp folder
Feldegast is offline   Reply With Quote
Old 11-04-2018, 10:28 AM   #24
thiago.eec
Wizard
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: 1,089
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Hi, @Doitsu

Thanks for the great plugin.

Just one question: is it possible to prevent the CMD window showing up when the plugin is running? The Sigil version does not show the CMD window. It looks more clean that way.
thiago.eec is offline   Reply With Quote
Old 11-04-2018, 11:18 AM   #25
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by thiago.eec View Post
Just one question: is it possible to prevent the CMD window showing up when the plugin is running? The Sigil version does not show the CMD window. It looks more clean that way.
I don't see a CMD window on my Windows machine.
Can you please take a screen capture of it?

What's your operating system?
Doitsu is offline   Reply With Quote
Old 11-04-2018, 12:12 PM   #26
thiago.eec
Wizard
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: 1,089
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by Doitsu View Post
I don't see a CMD window on my Windows machine.
Can you please take a screen capture of it?

What's your operating system?
I'm using Windows 10 x64 (1809 version). My Calibre is version 3.33.1 (latest).
The CMD window open shows for two seconds, then closes itself.
Attached Thumbnails
Click image for larger version

Name:	2018-11-04.png
Views:	624
Size:	327.9 KB
ID:	167435  
thiago.eec is offline   Reply With Quote
Old 11-04-2018, 12:35 PM   #27
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by thiago.eec View Post
I'm using Windows 10 x64 (1809 version). My Calibre is version 3.33.1 (latest).
The CMD window open shows for two seconds, then closes itself.
Since I wasn't able to reproduce this issue on my 64bit Windows 10 machine with the latest Calibre version, this is most likely an OS/Java issue, which I can't fix.
Doitsu is offline   Reply With Quote
Old 11-04-2018, 01:20 PM   #28
thiago.eec
Wizard
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: 1,089
Karma: 1221485
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by Doitsu View Post
Since I wasn't able to reproduce this issue on my 64bit Windows 10 machine with the latest Calibre version, this is most likely an OS/Java issue, which I can't fix.
I've tested it on another machine with Windows 10 Pro x64 (1803 version) and I noticed something:

1) If I open Calibre main program, select the book and click EDIT BOOK, then the CMD Window won't show up.
2) If I open the book directly with the Editor (by right-clicking on the file and choosing the Editor), then the CMD shows up. This happens even if Calibre main program is still running.

This is happening on both my machines.

Looks like the Editor doesn't work independently of the main program. Maybe, when I click on EDIT BOOK, calibre treats it differently from when I open the Editor as a standalone process.

Last edited by thiago.eec; 11-04-2018 at 01:25 PM.
thiago.eec is offline   Reply With Quote
Old 11-04-2018, 11:03 PM   #29
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: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the editor does work independently of the main program. @Doitsu when you call subprocess to run epubcheck, you should specify the creationflags variable to ensure cd window is not created. something like

Code:
import win32process
subprocess.Popen(...., creationflags=win32process.CREATE_NO_WINDOW)
kovidgoyal is offline   Reply With Quote
Old 11-05-2018, 01:47 AM   #30
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by kovidgoyal View Post
the editor does work independently of the main program. @Doitsu when you call subprocess to run epubcheck, you should specify the creationflags variable to ensure cd window is not created. something like

Code:
import win32process
subprocess.Popen(...., creationflags=win32process.CREATE_NO_WINDOW)
Thanks for the code snippet! I'll add it to the plugin and release a new version today.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epubcheck plugin for Sigil Doitsu Plugins 533 10-24-2024 04:32 PM
Open Metadata Editor from plugin notbuu Development 5 10-05-2016 01:10 AM
Sample Plugin for the Editor DiapDealer Editor 77 12-10-2014 08:16 AM
Editor plugin question DiapDealer Development 2 07-28-2014 11:23 PM
Web-based epubcheck upgraded to epubcheck 1.0.5 kjk ePub 4 02-09-2010 10:53 PM


All times are GMT -4. The time now is 02:32 AM.


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