command line tool to extract info from ACBF

Bug #1815597 reported by uwe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Advanced Comic Book Format
New
Undecided
Unassigned

Bug Description

This is a feature request.

In order to be able to incorporate acbf in workflows, it is useful to have a command line tool that is able to extract from a cb? file different aspects of the metadata, just as the GUI acbf tools do, but for cmd.

# Outputting specific information items such as the values of certain fields either recoded in the XML (author, title, languages, reading direction ...etc) or deduced from the cb? container , such as number of pages or page dimensions to stdout.

# Additionally, It would be great to have the ACBF metadata in a more accessible format such as JSON.

A hypothetical command would be:

$ acbf-info get-acbf "meta-data/book-title"

OR

$ acbf-info get-acbf "data/binary/@content-type"

OR

$ acbf-info get-acbf "meta-data/author[@activity=writer]/name"

which is an xpath query, basically

OR deduced, possibly from a separate domain of properties:

$ acbf-info get-cbx "page-count"

binary/base64 output of actual image files
$ acbf-info get-cbx page #

page dimensions (or rotation, ...etc)
$ acbf-info get-cbx page-info #

all pages dimensions as an array
$ acbf-info get-cbx pages-dimentions

Revision history for this message
Robert Kubík (Pastierovič) (just-me) wrote :

Hi,

thanks for sharing the idea.
I think the first step would be to have ACBF library which would be able to handle ACBF files, extract different information from it. That is currently missing.
This library can be used then by GUI tools as well as by any command line tool. Writing a command line wrapper around that would be very simple.
Currently next in my ToDo list is to port the ACBF Editor code to Python 3 and GTK3 once I have some more time to work on it.
So if you or anyone can start with coding the library or command line tool, you're welcome.

Regards,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.