Autofile from Hazel -> OCR (PDFPenPro) -> DevonThink

From your noodle to other noodles. Talk about ways to get the most from Hazel. Even exchange recipes for the cool rules you've thought up. DO NOT POST YOUR QUESTIONS HERE.

Moderators: Mr_Noodle, Moderators

I've looked around and couldn't find a comprehensive way of taking a PDF, OCRing it, renaming it, and then auto-filing it into DevonTHINKPro. There are other postings that tell you how to rename a PDF to make it easier to import into DevonTHINK. But I could not find one that automatically took a file and put the PDF in the correct Group in DevonTHINK.

So, I built the following solution. To use, you need to have a copy of Hazel, PDFPenPro and DevonTHINKPro... plus the ability to edit a shell script.

Step 1
To use, you need to create the following directories in your home filesystem:

First create a directory called HazelAutomation, and add these subfolders under it.

HazelAutomation
1.HazelOCR
2.HazelSort
3.HazelProcessed
4.HazelBakup

To test, open a terminal session and type "cd ~/HazelAutomation" and it should go to the top-level directory that is needed. You should see only the four directories listed above in this folder.

Image



Step 2

Setup Hazel to monitor the directory "1.HazelOCR". For any PDF file, it OCRs it (if needed) and then sends the file to the next step ("2.HazelSort").

We have two rules, one OCR PDFs that need it and the other to just move PDFs to the next step.

Image

Rule 1: OCR Files, if needed - move to 2.HazeSort

Image

Here is the code in each embedded script:

The first checks to see if the file needs to be OCRd:
Code: Select all
if ! grep Font "$1"
then
     exit 0
else
     exit 1
fi


This second will OCR the file. I use PDFPenPro to do this:
Code: Select all
tell application "PDFpenPro"
   open theFile as alias
   tell document 1
      ocr
      repeat while performing ocr
         delay 1
      end repeat
      delay 1
      close with saving
   end tell
end tell


The second rule moves all remaining PDFs to "2.HazelSort":

Image

Now all your files are in the "2.HazelSort" folder. Here is where the hard work occurs!

Step 3 - auto rename and auto file the PDF

Setup Hazel to watch the "2.HazelSort" folder. This is the hardest step, because you have to analyze each PDF to determine how to find the date and name of the bill. The key for each rule is to move a matched file to "3.HazelProcesssed". I always rename the files to "YYYY-MM-DD-billname.pdf"

Image

Here is a sample rule:

Image

You can find many instructions in this forum on how to do the above. Again, you need to setup one rule per PDF.

Step 4 - autofile to DevonThinik

This is the magic step!

Setup Hazel to watch "3.HazelProcessed"

Image

Image

This script will look at the name of the file (created in Step 3) and auto-file it into the correct group in DevonTHINK. Any file that it cannot auto-file is moved to the DevonTHINK global Inbox. When this script runs, it creates an error log at ~/HazelAutomation/log.txt that you can look to see how it is working.

Here is the content of the script.


Code: Select all
#!/bin/sh

# This script moves files of to DevonThink folders automatically
# based on the $Matches variable.
#
# It looks for a match in the PDF File Name, and moves the file to
# the corresponding DevonTHINK Folder Name.
#
# If it does not find a match, it copies the file to the Inbox.
#
# In either case, it moves the file to the Backup folder
#
# use this pattern to match files:  PDFFileName|DevonTHINKFolderName

Matches="Cleaners|/Utilities/Cleaners
Phone|/Utilities/Phone
Bank|/Finance/Bank
Cable|/Utilities/Cable
Community Giving|/Charity/Community Giving
Paystub|/Employment/My Employer"

IFS=$'\n' read -rd '' -a MatchNames <<<"$Matches"

FullPath=`echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"`

echo `date` > ~/HazelAutomation/log.txt
echo "Looking in [$1] for:" > ~/HazelAutomation/log.txt

j=0
for i in "${MatchNames[@]}"
do
      IFS=$'|' read -rd '' -a GroupNames <<<"${MatchNames[$j]}"

      MatchString=${GroupNames[0]}
      FolderName=$(echo ${GroupNames[1]})  #use this to remove trailing new line character

      echo $j "["$MatchString"]" >> ~/HazelAutomation/log.txt
      echo "$1" | grep -q "$MatchString"
      greprc=$?
      if [[ $greprc -eq 0 ]] ; then
         echo "Found:[$MatchString] in [$1] moving to [$FolderName]" >> ~/HazelAutomation/log.txt
         Command='
         tell application id "com.devon-technologies.thinkpro2"\n
            launch\n
            set theDatabase to open database "PATH_TO_DEVONTHINK_DB/DevonTHINK/MyScans.dtBase2"\n
            set theGroup to create location "'$FolderName'" in theDatabase\n
            import "'$FullPath'" to theGroup\n
         end tell\n
         '
         echo $Command  >> ~/HazelAutomation/log.txt
         echo $Command | osascript
         mv "$FullPath" ~/HazelAutomation/4.HazelBackup/.
         exit
      fi
      let "j++"
done
echo "No match found for $1"   >> ~/HazelAutomation/log.txt
cp "$FullPath" "/Users/USERNAME/Library/Application Support/DEVONthink Pro 2/Inbox/."
mv "$FullPath" ~/HazelAutomation/4.HazelBackup/.
exit


Note that you need to edit the file a bit to match your setup

Find the variable Matches.
Code: Select all
Matches="Cleaners|/Utilities/Cleaners
Phone|/Utilities/Phone
Bank|/Finance/Bank
Cable|/Utilities/Cable
Community Giving|/Charity/Community Giving
Paystub|/Employment/My Employer"


You need to replace the content of this to variable to match how you setup your DevonTHINK database. The variable is setup to have one line per file you want to auto-file.

The first part (before the "I") is the part that should match the name of the PDF File. It should be the same names that you used in Step 3 above.

The second part (after the "I") is the name of the DevonTHINK group you want the file to be sorted to. Note you can have sub-groups and spaces in the name are OK.

Next, find this line:
Code: Select all
set theDatabase to open database "PATH_TO_DEVONTHINK_DB/DevonTHINK/MyScans.dtBase2"\n


Change "PATH_TO_DEVONTHINK_DB/DevonTHINK/MyScans.dtBase2" to be the location of your DevonThink database and the real name. Don't use relative paths (e.g. ~/Document" but use "/Users/username/Document".

Last, find this line:
Code: Select all
cp "$FullPath" "/Users/USERNAME/Library/Application Support/DEVONthink Pro 2/Inbox/."


Change "/Users/USERNAME/Library/Application Support/DEVONthink Pro 2/Inbox" to be the path to your DevonThink Inbox.

When this script runs, it creates an error log at ~/HazelAutomation/log.txt that you can look to see how it is working.

That's it!
Last edited by baandab on Mon Dec 26, 2016 1:22 pm, edited 1 time in total.
baandab
 
Posts: 6
Joined: Sun Apr 12, 2015 6:35 pm

Wow!

Very useful - many thanks!

Bought Hazel 4 years ago, to convert all my unOCR'ed files into readable, ℅ PDFPen >> which (2400 pdf's later) paid for itself ten times over with the time it saved me.

Only stumbled across DTPO several months after that - and I've never looked back. But anyone using DTPO currently, and needing to do this in batch - the above will be an absolute lifesafer/life-changer! :D
Cassady
 
Posts: 45
Joined: Wed Mar 06, 2013 4:34 pm

Hej there,
great script....thanks a lot for that.... but for me it doesn't work.... Can´t figure out where my fault is....
So please, i need some help...

i modified the script as you described, but i only get an error : "Error processing shell script on File 20161008-Kontoauszug.pdf" without more information's...
i also didn't get a log.txt file....?

The file 20161008-Kontoauszug.pdf definitely exists...

Here is my modified script... (my modifications are marked in red)

Thanks for your Feedback in advance...
--------------
!/bin/sh

# This script moves files of to DevonThink folders automatically
# based on the $Matches variable.
#
# It looks for a match in the PDF File Name, and moves the file to
# the corresponding DevonTHINK Folder Name.
#
# If it does not find a match, it copies the file to the Inbox.
#
# In either case, it moves the file to the Backup folder
#
# use this pattern to match files: PDFFileName|DevonTHINKFolderName



Matches="Kontoauszug|/Finanzen"


IFS=$'\n' read -rd '' -a MatchNames <<<"$Matches"

FullPath=`echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"`

echo `date` > ~/HazelAutomation/log.txt
echo "Looking in [$1] for:" > ~/HazelAutomation/log.txt

j=0
for i in "${MatchNames[@]}"
do
IFS=$'|' read -rd '' -a GroupNames <<<"${MatchNames[$j]}"

MatchString=${GroupNames[0]}
FolderName=$(echo ${GroupNames[1]}) #use this to remove trailing new line character

echo $j "["$MatchString"]" >> ~/HazelAutomation/log.txt
echo "$1" | grep -q "$MatchString"
greprc=$?
if [[ $greprc -eq 0 ]] ; then
echo "Found:[$MatchString] in [$1] moving to [$FolderName]" >> ~/HazelAutomation/log.txt
Command='
tell application id "com.devon-technologies.thinkpro2"\n
launch\n
set theDatabase to open database "/Volumes/LWD_20160523/02_DevonThink/test/test.dtBase2"\n
set theGroup to create location "'$FolderName'" in theDatabase\n
import "'$FullPath'" to theGroup\n
end tell\n
'
echo $Command >> ~/HazelAutomation/log.txt
echo $Command | osascript
mv "$FullPath" ~/HazelAutomation/4.HazelBackup/.
exit
fi
let "j++"
done
echo "No match found for $1" >> ~/HazelAutomation/log.txt
cp "$FullPath" "/Users/rolf/Library/Application Support/DEVONthink Pro 2/Inbox/."
mv "$FullPath" ~/HazelAutomation/4.HazelBackup/.
exit
Happy wife .... Happy life... :D
HaubenTaucher
 
Posts: 17
Joined: Sun Oct 23, 2016 8:23 am
Location: Germany / OWL

Here is the updated script.

Change:

    Line 30, 31, 41, 46, 57, 59, 64,66: "~/HazelAutomation” to the directory structure you want to use to store the logging, etc.
    Line 51: "/Users/me/DevonTHINK/MyScans.dtBase2” to the unix path of your DevonTHINK database that you want to store. In DevonTHINK, right click on the Database you want to use, click on “Show in Finder”. Copy the path of that file onto line 51 replacing the text I have.
    Line 59, 66: "~/HazelAutomation/4.HazelBackup/.” to the unix path of where you want the backup files moved to.
    Line 65: "/Users/bob/Library/Application Support/DEVONthink Pro 2/Inbox” to the folder where your DevonTHINK Inbox is stored. In Finder, copy the path of that Folder onto line 65 replacing the text I have.

Then Change Lines 15-19 to put in the names of the folders you want to auto file to. In the format of "PDFFileName|DevonTHINKFolderName” where:
    PDFFileName is the text in the filename you are searching for.
    DevonTHINKFolderName is the folder you want to drop the file into.

Code: Select all
#!/bin/sh

# This script moves files of to DevonThink folders automatically
# based on the $Matches variable.
#
# It looks for a match in the PDF File Name, and moves the file to
# the corresponding DevonTHINK Folder Name.
#
# If it does not find a match, it copies the file to the Inbox.
#
# In either case, it moves the file to the Backup folder
#
# use this pattern to match files:  PDFFileName|DevonTHINKFolderName

Matches="AAAA|/Utilities/AAAA
BBBBA Credit Card|/Finance/BBBBA Credit Card
CCCC|/Finance/American Express
DDDD|/Utilities/DDDD
EEEE|/Finance/EEEE
"

IFS=$'\n' read -rd '' -a MatchNames <<<"$Matches"

FullPath=`echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"`
NewName=`echo "$(basename "$1")" | sed "s/.[pP][dD][fF]//"`

echo $FullPath
echo $NewName

echo `date` > ~/HazelAutomation/log.txt
echo "Looking in [$1] for:" > ~/HazelAutomation/log.txt

j=0
for i in "${MatchNames[@]}"
do
      IFS=$'|' read -rd '' -a GroupNames <<<"${MatchNames[$j]}"

      MatchString=${GroupNames[0]}
      FolderName=$(echo ${GroupNames[1]})  #use this to remove trailing new line character

      echo $j "["$MatchString"]" >> ~/HazelAutomation/log.txt
#      echo $j "["$MatchString"]"
      echo "$1" | grep -q "$MatchString"
      greprc=$?
      if [[ $greprc -eq 0 ]] ; then
         echo "Found:[$MatchString] in [$1] moving to [$FolderName]" >> ~/HazelAutomation/log.txt
#         echo "Found:[$MatchString] in [$1] moving to [$FolderName]"
         Command='
         tell application id "com.devon-technologies.thinkpro2"\n
            launch\n
            set theDatabase to open database "/Users/me/DevonTHINK/MyScans.dtBase2"\n
            set theGroup to create location "'$FolderName'" in theDatabase\n
            set theRecord to import "'$FullPath'" to theGroup\n
            set the name of theRecord to "'$NewName'"\n
         end tell\n
         '
         echo $Command  >> ~/HazelAutomation/log.txt
         echo $Command | osascript
         mv "$FullPath" ~/HazelAutomation/4.HazelBackup/.
         exit
      fi
      let "j++"
done
echo "No match found for $1"   >> ~/HazelAutomation/log.txt
cp "$FullPath" "/Users/bob/Library/Application Support/DEVONthink Pro 2/Inbox"
mv "$FullPath" ~/HazelAutomation/4.HazelBackup/.
exit
baandab
 
Posts: 6
Joined: Sun Apr 12, 2015 6:35 pm

Hi Bob,
thank you so much..... Feel embraced... :P

Rolf
Happy wife .... Happy life... :D
HaubenTaucher
 
Posts: 17
Joined: Sun Oct 23, 2016 8:23 am
Location: Germany / OWL

Hi!

Merry Christmas!
First of all a BIG thank you for this extremely nice example!!
I'm trying to follow the example rules.
When previewing the rule, it seems there's something wrong with the embedded shell script (1.HazelOCR).
I'm not familiar with scripting (yet) but it seems to have to do with the double quotes, as they show up in red??
Imageimage hosting site over 5mb

Do you have any idea or suggestion?
Thanks for helping out!

Erwin
panini
 
Posts: 23
Joined: Mon Dec 08, 2014 6:54 pm

Hej Erwin,

Try to delete the last ]

Rolf
Happy wife .... Happy life... :D
HaubenTaucher
 
Posts: 17
Joined: Sun Oct 23, 2016 8:23 am
Location: Germany / OWL

Hey Rolf, works a treat! Thx.
Don't know where the square bracket came from...
panini
 
Posts: 23
Joined: Mon Dec 08, 2014 6:54 pm

panini wrote:Hey Rolf, works a treat! Thx.
Don't know where the square bracket came from...

maybe a tip error?

fine if it works for you.... Have a great day...

Rolf
Happy wife .... Happy life... :D
HaubenTaucher
 
Posts: 17
Joined: Sun Oct 23, 2016 8:23 am
Location: Germany / OWL

understanding -> the next step Tue Dec 27, 2016 10:29 am • by panini
Hi,

Could someone more knowledgeable please explain?
I realise this is to find out whether a document is OCR'ed or not, but what are the underpinnings?

Code: Select all
if [ $(grep -ci "Font" "$1") -gt 0 ]; then
     echo 1;
else
     echo 0;
fi


What are we doing here? Dissection?
I believe that "$1" stands for "longfilename" > /path/filename
I understand we are using grep to search.
Also understand the if, else, and closing fi clause.

So it is mainly the
Code: Select all
[ $(grep -ci "Font" "$1") -gt 0 ]
part that I'd like to grasp.
panini
 
Posts: 23
Joined: Mon Dec 08, 2014 6:54 pm

It is a simple and fast way to check to see if a file has been OCR'd.

The word "font" will be in any file that has been OCRd.

"grep -ci" tell us to ignore case and return only counts. (It will find "Font", "FONT", "font", "foNT", etc.)

Thus, if that returns a count greater than zero, then we know that the file has been OCRd.

If the file has been OCRd, we can skip the step of having to OCR it.

Bob
baandab
 
Posts: 6
Joined: Sun Apr 12, 2015 6:35 pm

Hi Bob,

Thank you very much for explaining!
At least this way I can learn!

At this very moment I'm also struggling with your step 3 above.
capturing the date out of the contents of a document and then using the YYYY and MM of found date to rename the pdf is what I try to do.

Would you mind showing in detail how you go about getting 'BillingDate'?

I'd like to do the following:
- have OCR'ed pdf - watched folder will for now only have scanned credit card statements
- the statement contains the last 4 digits of the credit card
- statement will also contain "Previous total amount at 04/07/2016" [In my case, dutch, Vorig saldo van 04/07/2016]
- I need to extract the last 4 digits of the card number, here 4444 (statement contains: Cardnumber NNNN-NNXX-XXXX-4444 NAME SURNAME)
- Next I need to rename according to:
mc_4444_YYYYMM.pdf -> mc_9382_201607

I'm very close but not there yet...
Image
panini
 
Posts: 23
Joined: Mon Dec 08, 2014 6:54 pm

Have you read this?

http://www.myproductivemac.com/blog/date-matching-in-hazel2992015?rq=hazel

It shows you how to match dates (you can then extend that to capture the credit card numbers).

Bob
baandab
 
Posts: 6
Joined: Sun Apr 12, 2015 6:35 pm

baandab wrote:Have you read this?

http://www.myproductivemac.com/blog/date-matching-in-hazel2992015?rq=hazel

It shows you how to match dates (you can then extend that to capture the credit card numbers).

Bob


Wow!
I'm just spending near my whole day to decipher all this!!
And I'm near the end :?
But thanks a lot!!
Do you have more of this?? I'm working with MacSparky's video field guide + Duncan Brooks' tips

I am still fighting with:
rename > with pattern
then I'm trying to make use of a previously created attribute existing of a [txt string + DD/MM/YYYY] which is correctly found in the pdf, but then I try to > replace text > to get the 'mc' part in
and this does not work yet..

I'll do some more experimenting!!
Huge thank you!!
panini
 
Posts: 23
Joined: Mon Dec 08, 2014 6:54 pm

Hmmm,

Unfortunately I'm running into some problem too so it seems.
Here's what I did:
First goal for me was to limit the actions and what I'm letting Hazel do to what I can comprehend... :lol:
- copied the ~/HazelAutomation/ dir structure a 100% (no changes to script paths etc)
- I left the original Matches in place (easy to check my own addings for structural errors)
- but added |mc_7814/mc_7814 and |mc_0170/mc_0170
Here I have a little doubt, as I initially to keep things simple did not want to go into a more complicated DT folder/group structure. Do I understand correctly that in the original script you Match Cleaners| and PDF's with Cleaners in the filename will then be filed into DT group /Utilitis/Cleaners?

I also wonder:
- Do I understand correctly: last part of the script in 3.HazelProcessed: if no match found for "$1", it will file treated PDF's to DT's Global Inbox?
- If so, is it possible to use the Inbox of the MyScans.dtBase2?

Now to what is happening:
- Listing of my ~/HazelAutomation dir
(shows file naming using mc_0170 and mc_7814)
--------------------------------------------
mbpi7:4.HazelBackup erwin$ pwd
/Users/erwin/HazelAutomation/4.HazelBackup
mbpi7:4.HazelBackup erwin$ ls -la
total 4120
drwxr-xr-x 8 erwin staff 272 Dec 27 22:15 .
drwxr-xr-x 8 erwin staff 272 Dec 27 22:07 ..
-rw-r--r--@ 1 erwin staff 6148 Dec 27 22:14 .DS_Store
-rw-r--r--@ 1 erwin staff 420806 Dec 27 20:06 mc_0170_201607.pdf
-rw-r--r--@ 1 erwin staff 311440 Dec 27 20:06 mc_0170_201608.pdf
-rw-r--r--@ 1 erwin staff 321078 Dec 27 20:00 mc_0170_201610.pdf
-rw-r--r--@ 1 erwin staff 299314 Dec 27 19:47 mc_0170_201611.pdf
-rw-r--r--@ 1 erwin staff 734373 Dec 25 22:46 mc_7814_201607.pdf
mbpi7:4.HazelBackup erwin$
---------------------------------------


- the log.txt file:
----------------------------------------
mbpi7:HazelAutomation erwin$ tail -f log.txt
0 [Cleaners]
1 [Phone]
2 [Bank]
3 [Cable]
4 [Community Giving]
5 [Paystub]
6 [mc_0170]
7 [mc_7814]
Found:[mc_7814] in [/Users/erwin/HazelAutomation/3.HazelProcessed/mc_7814_201607.pdf] moving to [/mc_7814]
tell application id "com.devon-technologies.thinkpro2"\n launch\n set theDatabase to open database "/Users/erwin/DT_bases/MyScans.dtBase2\n set theGroup to create location "/mc_7814" in theDatabase\n import "/Users/erwin/HazelAutomation/3.HazelProcessed/mc_7814_201607.pdf" to theGroup\n end tell\n
Tue Dec 27 22:14:58 CET 2016
---------------------------------------

- From viewing the Hazel.log it seems that erroneously files are treated as symlinks???
excerpt from the Hazel.log (I have moved the files back to 3.HazelProcessed and let the rule run again)
---------------------------------------
== End script output ==
2016-12-27 22:15:11.089 hazelworker[66891] DEBUG: Action changed file: mc_7814_201607.pdf
2016-12-27 22:15:11.092 hazelworker[66891] DEBUG: Writing out DB file: /Users/erwin/HazelAutomation/3.HazelProcessed
2016-12-27 22:15:11.093 hazelworker[66891] DEBUG: Directory /Users/erwin/HazelAutomation/3.HazelProcessed processed in 12.923234 seconds
2016-12-27 22:15:11.094 HazelHelper[56393] DEBUG: Checking events for path /Users/erwin/HazelAutomation/3.HazelProcessed, folder 3.HazelProcessed
2016-12-27 22:15:11.095 hazelworker[66891] DEBUG: Received file event: {
date = "2016-12-27 21:15:10 +0000";
path = "<ComNoodlesoft_NoodlePathSet: 0x7ffca9d66090>\n /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201607.pdf : 0\n";
}
2016-12-27 22:15:11.095 hazelworker[66891] DEBUG: Sleeping
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Thread 0x7f94c852ac30: Received events (
{
date = "2016-12-27 21:15:11 +0000";
path = "/Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201608.pdf";
shouldDoFullScan = 0;
},
{
date = "2016-12-27 21:15:11 +0000";
path = "/Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201610.pdf";
shouldDoFullScan = 0;
},
{
date = "2016-12-27 21:15:11 +0000";
path = "/Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201611.pdf";
shouldDoFullScan = 0;
},
{
date = "2016-12-27 21:15:11 +0000";
path = "/Users/erwin/HazelAutomation/3.HazelProcessed/mc_7814_201607.pdf";
shouldDoFullScan = 0;
}
) for stream at path: /Users/erwin/HazelAutomation/3.HazelProcessed
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Error resolving symlinks for path /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201608.pdf:, No such file or directory
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Error resolving symlinks for path /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201610.pdf:, No such file or directory
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Error resolving symlinks for path /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201611.pdf:, No such file or directory
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Error resolving symlinks for path /Users/erwin/HazelAutomation/3.HazelProcessed/mc_7814_201607.pdf:, No such file or directory
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Thread 0x7f94c852ac30: Run worker for folder: /Users/erwin/HazelAutomation/3.HazelProcessed
2016-12-27 22:15:11.447 HazelHelper[56393] DEBUG: Task already running for folder: /Users/erwin/HazelAutomation/3.HazelProcessed
2016-12-27 22:15:13.098 hazelworker[66891] DEBUG: Unexpected type for Mail download URL: (null)
2016-12-27 22:15:13.098 hazelworker[66891] DEBUG: About to process directory /Users/erwin/HazelAutomation/3.HazelProcessed
2016-12-27 22:15:13.099 hazelworker[66891] DEBUG: Writing out DB file: /Users/erwin/HazelAutomation/3.HazelProcessed
2016-12-27 22:15:13.099 hazelworker[66891] DEBUG: Directory /Users/erwin/HazelAutomation/3.HazelProcessed processed in 0.000948 seconds
2016-12-27 22:15:13.100 HazelHelper[56393] DEBUG: Checking events for path /Users/erwin/HazelAutomation/3.HazelProcessed, folder 3.HazelProcessed
2016-12-27 22:15:13.100 hazelworker[66891] DEBUG: Received file event: {
date = "2016-12-27 21:15:11 +0000";
path = "<ComNoodlesoft_NoodlePathSet: 0x7ffca9c253b0>\n /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201611.pdf : 0\n /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201608.pdf : 0\n /Users/erwin/HazelAutomation/3.HazelProcessed/mc_0170_201610.pdf : 0\n /Users/erwin/HazelAutomation/3.HazelProcessed/mc_7814_201607.pdf : 0\n";
}
2016-12-27 22:15:13.100 hazelworker[66891] DEBUG: Sleeping

- I would like to try to modify the Hazel rule so that it will give a notification for each file treated BEFORE moving, but this is not so easy for me, as moving is embedded in the script?
- I have created a new DT database, MyScans
- Only 2 groups are present: mc_0170 and mc_7814
- The DB remains empty
- Nothing gets filed to the Global Inbox

Thanks for your patience and help!

Erwin
panini
 
Posts: 23
Joined: Mon Dec 08, 2014 6:54 pm

Next

Return to Tips & Tricks - DO NOT POST QUESTIONS