Page 1 of 1

Can't match date in Apple Pages.app documents

PostPosted: Thu May 11, 2017 11:22 pm
by RabbitUrban
I have used Hazel quite a bit for text files (BBEdit) and also electronic PDF files.

But I have just started using it with Pages.app files, and am having trouble with date matching.

i.e. the rule fails in the Preview function, if I use

Contents | contain match | Custom Date

If I copy and paste the Pages.app document content (which is mostly styled text and no graphics) into a text file in BBEdit, then I the above rule will match, so I know that the Custom Date bit should work.

And strangely, in the Pages.app document, if I type the date directly, the rule will also work. i.e.:

Contents | contain | 23 Dec 1995

But I would like to extract the date and use it to rename the file, so would prefer that the contain match work.

Just wondering if anyone else has encountered this and has a solution. I have tried several Pages documents with various different date formats, and different matching string arrangements, without success. Sorry if this has been asked before. I searched. Thanks.

Edit: Hazel 4.0.9, macOS 10.12.4, Pages 6.1.1

Re: Can't match date in Apple Pages.app documents

PostPosted: Fri May 12, 2017 10:50 am
by Mr_Noodle
Pages has a proprietary format so Hazel cannot read those files directly. You'd need to either find some program out there that can parse those files, or convert the files into a format that can be read.