Skip to content

EPUB checker option "--version" issue #1533

Closed

Description

@Bala6644

@rdeltour
The EPUB validation has failed while using the option "--version" in the command line argument and getting the default message in the log file if there are any errors or warnings in the source EPUB file. The previous version 5.0.1 correctly indicated the error/warning with version details. Kindly check and assist us to resolve this issue.

EPUBCheck v5.1.0
Messages: 0 fatals / 0 errors / 0 warnings / 0 infos / 0 usages

EPUBCheck completed

Usage
C:\Users\euser>java -jar -Xss1024k "C:\Localfiles\Support\ePUB-Checker\5.1.0\epubcheck.jar" "C:\Localfiles\Support\ePUB-Checker\test.epub" --version > "C:\Localfiles\Support\ePUB-Checker\test.log" 2>&1

test_5.0.1.log
test_5.1.0.log

Activity

  1. rdeltour commented on Aug 31, 2023

    @rdeltour
    Member

    The EPUB validation has failed while using the option "--version" in the command line argument and getting the default message in the log file if there are any errors or warnings in the source EPUB file. The previous version 5.0.1 correctly indicated the error/warning with version details.

    This is likely due to the change made in #1526. The --version option now prints the version and exits the command, which I believe is the common behavior for command line tools.

    Do you need to print the EPUBCheck version number and the check messages at the same time?

  2. self-assigned this
    on Aug 31, 2023
  3. Bala6644 commented on Sep 1, 2023

    @Bala6644
    Author

    Hi @rdeltour ,
    Thanks for your kind support.

    Yes, I need to print the EPUBCheck version number and the check messages at the same time.

  4. TobiasWantzen commented on Jan 11, 2024

    @TobiasWantzen

    @rdeltour
    I'm in need of outputting the version info with the check messages either, but would propose to introduce a new CLI option for this, maybe "-i"/"--info", which will simply add the version info to the "normal" output, e.g.:

    java -jar /epubcheck.jar -i xyz.epub
    

    will then output:

    EPUBCheck v5.1.0 abgeschlossen
    Verwendung der EPUB 3.3 Prüfungen
    ERROR(RSC-005): xyz.epub/OEBPS/content.opf(3,56): Validierungsfehler: package dcterms:modified meta element must occur exactly once
    
    EPUBCheck mit Fehlern abgeschlossen
    Meldungen: 0 Schwerwiegende Fehler / 1 Fehler / 0 Warnungen / 0 Informationen
    


    To "--version":

    java -jar /epubcheck.jar --version
    

    now outputs this:

    EPUBCheck v5.1.0
    Meldungen: 0 Schwerwiegende Fehler / 0 Fehler / 0 Warnungen / 0 Informationen
    
    EPUBCheck abgeschlossen
    

    This is very misleading. Please reduce the output to the version info only and then exit:

    EPUBCheck v5.1.0
    

    Misleading, because in my workflow, which runs for a decade now, "--version" was always part of the CLI command to test my epubs, so it took me some time to realize that there were errors in the epub I was checking, even though epubcheck says there were none.

  5. TobiasWantzen commented on Jan 11, 2024

    @TobiasWantzen

    @rdeltour
    I made some testing and

    java -jar /epubcheck.jar --help
    

    outputs the trailing check informations either:

    [...]
    Meldungen: 0 Schwerwiegende Fehler / 0 Fehler / 0 Warnungen / 0 Informationen
    
    EPUBCheck abgeschlossen
    

    This should be fixed!

    For a workaround until this is fixed:

    java -jar /epubcheck.jar --version -q
    java -jar /epubcheck.jar --help -q
    

    suppresses the misleading check informations at the end.

  6. added
    status: in progressThe issue is being implemented by the development team
    and removed
    status: waiting for feedbackThe development team needs feedback from the issue’s creator
    on Dec 27, 2024
  7. added a commit that references this issue on Dec 28, 2024
    26fd614
  8. added
    status: has PRThe issue is being processed in a pull request
    and removed
    status: in progressThe issue is being implemented by the development team
    priority: lowTo be processed when time allows
    on Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

status: has PRThe issue is being processed in a pull requesttype: regressionSomething that broke

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址