This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo -e " | |
ROOT PRIVILEDGES NEEDED! | |
You have to run this script as root. | |
Aborting... | |
" | |
exit 1 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Automator -> File -> New -> Service -> Run Applescript | |
# setting up the basic search and replace function | |
on searchReplace(theText, SearchString, ReplaceString) | |
set OldDelims to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to SearchString | |
set newText to text items of theText | |
set AppleScript's text item delimiters to ReplaceString | |
set newText to newText as text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Automator -> File -> New -> Service -> Run Applescript | |
# setting up the basic search and replace function | |
on searchReplace(theText, SearchString, ReplaceString) | |
set OldDelims to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to SearchString | |
set newText to text items of theText | |
set AppleScript's text item delimiters to ReplaceString | |
set newText to newText as text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Notes" | |
set theMessages to every note | |
repeat with thisMessage in theMessages | |
# added identification of folder to create notebooks based on existing folder hierarchy | |
set myFolder to the container of thisMessage | |