Feature Request: JSON output option for pdfinfo
I just discovered pdfinfo
. I wanted to rename a pdf to its title. pdfinfo
extracted it beautifully. But parsing the output, while relatively easy, could have been far easier. I piped the output into grep -Po 'Title:\s+\K.*'
. I didn't know about \K
, I found that through a stackoverflow answer.
Anyway, this would have been easier if pdfinfo
had an option to output in JSON format. Then I could have just piped the output into jq .Title
. I know next to no jq
, but I came up with this off the top of my head
echo '{"Title":"Foo"}' | jq .Title
"Foo"