Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-30-2013, 04:40 PM   #1
davidnwelton
Member
davidnwelton began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jul 2011
Location: Padova, Italy
Device: Kindle
Flight Crew ValidateEpub method

Hi,

Anyone know what is going on here? This is in ValidateEpub.cpp:

Code:
   try
    {
        throw(std::exception());
    }
    
    catch ( std::exception& exception )
    {
        results.push_back( Result( ERROR_EPUB_NOT_VALID_ZIP_ARCHIVE )
                           .SetCustomMessage( exception.what() ) );
        return results;
    }
If it's not implemented yet, perhaps that would be a better return/error message?
davidnwelton is offline   Reply With Quote
Old 10-31-2013, 01:14 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,909
Karma: 3017317
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Probably checking if the ePUB is a valid ePUB. After all, it is an zip file. However, it must be created in a certain manner.
Toxaris is offline   Reply With Quote
Old 10-31-2013, 05:10 AM   #3
davidnwelton
Member
davidnwelton began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jul 2011
Location: Padova, Italy
Device: Kindle
Quote:
Originally Posted by Toxaris View Post
Probably checking if the ePUB is a valid ePUB. After all, it is an zip file. However, it must be created in a certain manner.
Well, as written, it's guaranteed to throw an exception and then an error, no matter what file you give it. Seems kind of odd.
davidnwelton is offline   Reply With Quote
Old 10-31-2013, 05:31 AM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,919
Karma: 40404050
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
And yet epubs are validated without any errors all the time by the integrated Flightcrew. So we're missing something. As written... yes, there will be an exception and an error, but the snippet of code doesn't tell us when; under what circumstances; or even IF that code gets called.
DiapDealer is online now   Reply With Quote
Old 10-31-2013, 05:36 AM   #5
davidnwelton
Member
davidnwelton began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jul 2011
Location: Padova, Italy
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
And yet epubs are validated without any errors all the time by the integrated Flightcrew. So we're missing something. As written... yes, there will be an exception and an error, but the snippet of code doesn't tell us when; under what circumstances; or even IF that code gets called.
No, that method does not get called from the integrated code. I read that, and it uses an already opened ePub directory via this method:

FC_WIN_DLL_API std::vector< Result > ValidateEpubRootFolder( const std::string &root_folder_path );

Which works great when I tested it myself. I'm just wondering what the story is with the other method.

I'm interested in this because I'd like to have a flight crew command line executable again, but don't know the code base very well, yet.

Thanks
davidnwelton is offline   Reply With Quote
Old 10-31-2013, 05:54 AM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,919
Karma: 40404050
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Which works great when I tested it myself. I'm just wondering what the story is with the other method.
Not sure. Could just be residual debugging stuff. Clearly there's no reason for the integrated Flightcrew to test the validity of a zip archive that already had to be successfully unzipped by Sigil before Flightcrew could be run ... so perhaps it was just a kludge left over from the transition from stand-alone program to integrated library.

Last edited by DiapDealer; 10-31-2013 at 06:00 AM.
DiapDealer is online now   Reply With Quote
Old 11-03-2013, 07:38 PM   #7
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,433
Karma: 950001
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
The FlightCrew in Sigil and the FlightCrew as a standalone library are not in sync with one another. Sigil doesn't use that method because there is no reason to validate the archive because it was already validated by being opened.

What happened is I replaced zipios with minizip in Sigil. Since that method isn't used by Sigil I just removed the zipios functionality from the bundled FlightCrew. I never got around to changing FlightCrew to use minizip instead of zipios.
user_none is offline   Reply With Quote
Old 11-03-2013, 07:39 PM   #8
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,433
Karma: 950001
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Just so it's clear that function actually works and is proper in the standalone FlightCrew source. It's only in Sigil that that function doesn't do anything.
user_none is offline   Reply With Quote
Old 11-04-2013, 12:54 AM   #9
davidnwelton
Member
davidnwelton began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Jul 2011
Location: Padova, Italy
Device: Kindle
@user_none - thanks for taking the time to answer; it's appreciated. So I guess my next question is: which one should I be utilizing? I went with the Sigil one because I thought that was the latest and greatest, but perhaps it's pretty stable and I should just utilize this one?

https://code.google.com/p/flightcrew/

Thanks!
davidnwelton is offline   Reply With Quote
Old 11-04-2013, 07:50 AM   #10
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 15,125
Karma: 13495770
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by davidnwelton View Post
@user_none - thanks for taking the time to answer; it's appreciated. So I guess my next question is: which one should I be utilizing? I went with the Sigil one because I thought that was the latest and greatest, but perhaps it's pretty stable and I should just utilize this one?

https://code.google.com/p/flightcrew/

Thanks!



the only prolem with this is that one cannot pass an ePub to it on the command line.

At least this is true on win7 pro with the 64bit version,
crutledge is offline   Reply With Quote
Old 11-04-2013, 08:05 AM   #11
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 6,693
Karma: 43902502
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
Quote:
Originally Posted by crutledge View Post
the only prolem with this is that one cannot pass an ePub to it on the command line.

At least this is true on win7 pro with the 64bit version,
Huh?

Code:
Syntax for cli is 
Usage: flightcrew-cli [options] file...
Code:
D:\Downloads>"c:\Program Files\FlightCrew\FlightCrew-cli.exe" "The Pharaoh and the Priest.epub"
No problems found.
and this is using Windows 7, 64 bit and the current version (Windows (x64) build 0.7.2) of FlightCrew.
PeterT is offline   Reply With Quote
Old 11-04-2013, 10:28 AM   #12
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,501
Karma: 5567067
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by crutledge View Post
the only prolem with this is that one cannot pass an ePub to it on the command line.

At least this is true on win7 pro with the 64bit version,
That is true for XP also.
When did that get fixed? My Bug 26 is still open from 2011

Last edited by theducks; 11-04-2013 at 10:34 AM. Reason: add bug number
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help please with Flight Crew error message ??? wannabee ePub 9 08-10-2011 09:27 AM
Flight Crew report crutledge Sigil 4 01-13-2011 07:06 PM
Sigil conversion doesn't pass Flight Crew mrmikel Sigil 1 11-07-2010 05:53 AM
Flight Crew Hitch Sigil 2 10-29-2010 05:28 AM


All times are GMT -4. The time now is 08:22 PM.


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