Page 1 of 1

Access to history sequence date

Posted: 04 Dec 2017, 02:05
by tpc
After reading this post viewtopic.php?f=4&t=5#p2459 I was unable to figure out how to access the actual date stored in the history.xml. I've tried each of the following with no luck. I'd like to obtain the delta between the prior run and the latest run in order to get a list of files that were processed during the latest run.

filebot -script fn:history --format '${date}\t${from}\t${to}' > history.tsv
filebot -script fn:history --format '${sequence}\t${from}\t${to}' > history.tsv
filebot -script fn:history --format '${sequence.date}\t${from}\t${to}' > history.tsv

How can I get the actual date from history?

Great tool!

Re: Access to history sequence date

Posted: 04 Dec 2017, 12:09
by rednoah
Unfortunately, the information you seek is not exposed to the history script.

The from/to variables are the only available variables in your custom GString expression.

If you need dates and times, then reading the xml file yourself is the only option.

Re: Access to history sequence date

Posted: 04 Dec 2017, 15:36
by tpc
I had considered that option but thought that I would check if date was exposed before I went that route.

Thank you for the fast reply and for the superb tool!

Re: Access to history sequence date

Posted: 05 Dec 2017, 17:54
by tpc
For those who may be interested in doing this programmatically using the raw history xml, here's some xpath to query for those entries that were added since the prior run.

Code: Select all

//sequence[@date>"2017-12-04T03:07:21.718Z"]