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 "Numbers" | |
set theSpreadsheet to (make new document with properties {document template:template "Receipt List"}) | |
set theTable to table 1 of sheet 1 of theSpreadsheet | |
end tell | |
tell application "Finder" | |
set theFiles to every file of folder "Internal:Users:steven:Documents:Receipts" | |
repeat with thisFile in theFiles | |
set theComment to the comment of thisFile | |
tell application "System Events" | |
do shell script "echo " & the quoted form of theComment & " > /tmp/json.json" |
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 "Finder" | |
set theFiles to every file of folder "Internal:Users:steven:Documents:Receipts" | |
repeat with thisFile in theFiles | |
set |filename| to the name of thisFile | |
set |metadata| to (open for access file ("|filename|" & ".json") with read access) | |
set the comment of thisFile to (read |metadata|) | |
close access |metadata| | |
end repeat | |
end tell |
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
function myFunction() { | |
var receiptDirectory = DriveApp.getFolderById("<your receipt folder's ID here>"); | |
var receipts = receiptDirectory.getFiles(); | |
while receipts.hasNext(){ | |
var receipt = receipts.next(); | |
DriveApp.createFile(receipt.getName() + '.json', receipt.getDescription(), 'text/json'); | |
} | |
} |
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
(* Change line 12 to the name of the Reminders List you want to copy to (here I've used "Finances") *) | |
tell application "Evernote" | |
set theNotes to (find notes "reminderorder:* -reminderdonetime:*") | |
repeat with thisNote in theNotes | |
set reminderTime to the reminder time of thisNote | |
set reminderTitle to the title of thisNote | |
set reminderURL to the note link of thisNote | |
tell application "Reminders" | |
set theReminders to (every reminder whose due date is reminderTime and name is reminderTitle) |
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
/* | |
This Google Script requires the moment.js library to parse IFTTT's date format. | |
Go to the script menu and select "Resources > Libraries" and search for Library ID 'MHMchiX6c1bwSqGM1PZiW_PxhMjh3Sh48'. | |
*/ | |
function myFunction() { | |
// initialize references and starting variables | |
var moment = Moment.load(); | |
var cal = CalendarApp.getCalendarById("ipovguj4o6k6r3cg1r89d9ieis@group.calendar.google.com"); |
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 "Finder" | |
set theFiles to the selection | |
repeat with thisFile in theFiles | |
try | |
(* get path and filename information from UNIX *) | |
set theExtension to the name extension of thisFile | |
set thePath to the POSIX path of (folder of thisFile as string) | |
set theFilename to the POSIX path of (thisFile as string) | |
set theBaseName to (do shell script "/bin/bash -c \"basename " & theFilename & " ." & theExtension & "\"") | |
set theURLEncodedFilename to (do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of theFilename) |
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 "Finder" | |
set theFiles to the selection | |
repeat with thisFile in theFiles | |
try | |
set thePath to the POSIX path of (thisFile as string) | |
set theExtension to the name extension of thisFile | |
set theScanResult to (do shell script "/usr/local/bin/zbarimg -q " & the quoted form of thePath) | |
if the length of theScanResult > 0 then | |
set theNewFilename to text 9 thru -1 of theScanResult | |
set theNewPath to (do shell script "/bin/bash -c \"dirname " & the quoted form of theNewFilename & "\"") |
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
Sub CCCR_Client_Reports_by_State_20150812() | |
Dim wb As Workbook | |
Dim ws As Worksheet | |
inputFile = MyDocs & "\Client Reporting\CCCR Query List.csv" | |
Open inputFile For Input As #1 | |
Application.ScreenUpdating = False | |
Application.DisplayAlerts = False | |
Do While Not EOF(1) | |
Input #1, ClientName, ClientSQL | |
Set wb = Workbooks.Open(MyDocs & "\Client Reporting\Templates\New Formats\CCCR - General Template.xlsx") |
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
Sub FixOutlookEmail() | |
Dim notebookxml As String | |
Dim outXML, pageXML As String | |
Dim notebookname As Variant | |
Dim appON As OneNote.Application | |
Dim notes As MSXML2.DOMDocument60 | |
Dim page As MSXML2.DOMDocument60 | |
Set appON = New OneNote.Application |
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
<?php | |
/* | |
* Converts CSV to JSON | |
* Example uses Google Spreadsheet CSV feed | |
* csvToArray function I think I found on php.net | |
*/ | |
header('Content-type: application/json'); | |
// Set your CSV feed |