Rename File - First Line of the Receipts

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Rename File - First Line of the Receipts Fri Jan 12, 2018 10:42 am • by Adriane
Hello,

How can I get the first line of a receipt being part of the file name?

I have tried but not yet found the answer. I have bought a great video course from David Sparky teaching how to use Hazel but have not found a way to do it. Have written to Noodlesoft support and Paul kindly gave me an idea have not yet found my way. Can anyone one help me? Please! All docs are OCR

Paul told me to:
"You can create a rule using “Contents contain match”. Search for “match patterns” in the help for more information on this. If you create a custom attribute with just “anything” as the pattern, it should match everything on the first line.

I did this:
If all
contents contains match ...
Rename with: text content extension

Did not work. Does anyone have an idea?

Thanks
Adriane
Adriane
 
Posts: 3
Joined: Thu Jan 04, 2018 4:46 pm

Re: Rename File - First Line of the Receipts Fri Jan 12, 2018 11:37 am • by Mr_Noodle
Here's a troubleshooting guide: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

In particular, the preview feature should help you to tweak your match pattern.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Rename File - First Line of the Receipts Fri Jan 12, 2018 1:27 pm • by Adriane
Mr_Noodle wrote:Here's a troubleshooting guide: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/

In particular, the preview feature should help you to tweak your match pattern.


The attributes are not the issue. The action is. If I could find an action ("Others" list) that could tell Hazel to get the first line of the document, that would make it.

Is there a way?

I live in Brazil, Hazel action list in my Mac is a mix of English and Portuguese. The receipt is in Portuguese. I have tried item, title, and many others actions from the drop-down "Others list, but none works.
Adriane
 
Posts: 3
Joined: Thu Jan 04, 2018 4:46 pm

Re: Rename File - First Line of the Receipts Mon Jan 15, 2018 11:03 am • by Mr_Noodle
If you read the section on match patterns, you'll see that you do that part in the condition. You create a custom attribute to grab the part of the text you want to use later. That attribute will then show up in any actions for you to use.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support