On Sat, May 24, 2025 at 2:31 AM William Michels <w...@caa.columbia.edu>
wrote:

> Thanks, Sean!
>
> Do any of the various `PDF` modules work to solve your page-counting quest?
>

My task was just a one-off, so I didn't look.  If I were working on a more
permanent program, I'd try to reduce external dependencies in that way.

Similarly, I think exiftool has some option that would print *only* the
metadata I wanted, but it would have taken longer to look it up than to
just process the entire output.


> I'll have to play around with your code a bit. Normally I would use
> `.dir(test => /:i \.pdf / )`  to pull out PDF files.
>

Oh yeah, that's a bit better.  I'm not as familiar with the path API as I
could be.

Yesterday I noticed that there were some duplicate PDFs among some pairs of
directories, so I identified them like so:

.say for sort keys 'dir1'.IO.dir».basename ∩ 'dir2'.IO.dir».basename

It's tempting to golf that down a bit, but it just a one-time need, so...
¯\_(ツ)_/¯

Reply via email to