View Single Post
Old 12-01-2018, 09:45 AM   #42
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,221
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Pass further arguments do EPUBCheck

Hi, @Doitsu

Altough I'm a complete noob to python (an to programming in general), I was trying to modify your plugin so I could pass the "--usage" argument to epubcheck. I've tried changing this lines:


Spoiler:
Code:
line 131:   args = ['java', '-jar', epc_path, '--version', epub_path]
to
Code:
line 131:   args = ['java', '-jar', epc_path, '--version', epub_path, '--usage']


Spoiler:
Code:
line 163:   if line.startswith(('ERROR', 'WARNING', 'FATAL', 'INFO')):
to
Code:
line 163:   if line.startswith(('ERROR', 'WARNING', 'FATAL', 'INFO', 'USAGE')):


Spoiler:
Code:
line 295:   elif err_code.startswith('WARNING'):
to
Code:
line 295:   elif err_code.startswith(('WARNING', 'USAGE')):


But I got no luck... Is this possible? Am I just missing some other reference or it would need a more profound change to the code?

EDIT: Of course this wouldn't be default behavior. It could be enabled by another entry to EpubCheck.json. Somethin like "usage": true.

Last edited by thiago.eec; 12-01-2018 at 12:03 PM.
thiago.eec is offline   Reply With Quote