Page 1 of 1

Rename Apple Store receipts based on App name

PostPosted: Thu Jul 06, 2017 3:46 pm
by Woody1981
Hi

I would like to know if there is a way to rename all my app store and itunes subscriptions receipts based on the purchased app or subscription within the document itself?

I have already setup rules for different utility services based on the service providers but seeing as the App store has so many apps i would like to name them based on app purchased.

I usually receive these receipts via email which i then export to pdf and save to a folder which hazel look for but i can't figure out a specific rule to get hazel to look at the purchased content and rename based on that.

I can extract purchased dates add rename that portion but i would also like it to rename the receipt for each app

i.e.. 2017-06-23- Evernote.pdf
2017-06-25 - Airmail.pdf

My thoughts were that i could send the created pdf from email to PDF Expert, which i could then highlight the apps name and have hazel look for the highlighted text and rename but i just can't figure that part out.

If anyone has any suggestions that would be great!!

The apps i have using on my iPhone that could be useful for a workflow are Airmail, Workflow, PDF Expert, Scanbot/ Scanner Pro & Hazel on the Mac side of things

Re: Rename Apple Store receipts based on App name

PostPosted: Fri Jul 07, 2017 12:06 pm
by Mr_Noodle
You can have Hazel filter on contents using "Contents contain match". When you preview the rule, you can see the files contents there and set up a pattern to match as needed.

Re: Rename Apple Store receipts based on App name

PostPosted: Fri Jul 07, 2017 9:17 pm
by Woody1981
Mr_Noodle wrote:You can have Hazel filter on contents using "Contents contain match". When you preview the rule, you can see the files contents there and set up a pattern to match as needed.



Thanks for replying.

I'm not looking at setting up a rule for every single app I purchase as I make as I make random purchases all the time and would take up too much time setting the contains match to be, "dispatch,Evernote, airmail" etc...

I would like to setup one generic App Store rule that either looks at a certain line of the receipt and names it based in the app or if it can rename based off highlighting the Apps name before sending it to my hazel watch folder

Re: Rename Apple Store receipts based on App name

PostPosted: Mon Jul 10, 2017 11:00 am
by Mr_Noodle
Yes, that should be doable. Read the manual on doing matches as it shows how you set up a pattern instead of hardcoding it each time.

Re: Rename Apple Store receipts based on App name

PostPosted: Wed Jul 12, 2017 1:45 am
by Woody1981
Mr_Noodle wrote:Yes, that should be doable. Read the manual on doing matches as it shows how you set up a pattern instead of hardcoding it each time.


Thanks for the help Mr noodle.

I'm having a hard time trying to figure out which rules exactly I need to setup

The following is an example app store receipt i have that i would like hazel to automatically extract the purchased apps name without having to setup multiple rules for every app purchased.

Ultimately I would like the one "app store receipts" rule run and have it rename based on the date (which i know how to do) and then extract that apps name and rename it

This example would be named, 2017-07-06 - Dispatch.PDF

OR

The whole line if need be, 2017-07-06 - Dispatch: Email Meets GTD.PDF

Image

Re: Rename Apple Store receipts based on App name

PostPosted: Wed Jul 12, 2017 10:40 am
by Mr_Noodle
Your image didn't come through but in general, use "Contents contains match". I'm assuming every receipt has the same format so create a pattern to find the text in there you need to extract. Read the manual as it goes into detail on how to create the pattern here.

Re: Rename Apple Store receipts based on App name

PostPosted: Wed Jul 12, 2017 8:44 pm
by Woody1981
Mr_Noodle wrote:Your image didn't come through but in general, use "Contents contains match". I'm assuming every receipt has the same format so create a pattern to find the text in there you need to extract. Read the manual as it goes into detail on how to create the pattern here.



Yes I read the manual but I'm not too tech savvy and couldn't find a specific way to pinpoint uncertain line in a receipt

On what page or section specifically are you talking about?

Here is two receipts as an example I would to rename with date of invoice, which I know how to do and also by the purchased apps name.

If you could help me out I would really appreciate it

https://www.dropbox.com/sh/7p5v8e15w60i ... 6wCja?dl=0

Re: Rename Apple Store receipts based on App name

PostPosted: Thu Jul 13, 2017 10:52 am
by Mr_Noodle
These chapters should help:

https://www.noodlesoft.com/manual/hazel ... onditions/
https://www.noodlesoft.com/manual/hazel ... ew-a-rule/

Use the preview to view the contents of the file as Hazel sees it. From there, you can create a pattern.