text
stringlengths
0
15.7k
source
stringlengths
6
112
set cardRecord to ""
mail_receipt_process_lyft.applescript
set match1 to "Lyft fare"
mail_receipt_process_lyft.applescript
set counter to false
mail_receipt_process_lyft.applescript
set totals to 0 as real
mail_receipt_process_lyft.applescript
repeat with eachMessage in unprocessedMessages
mail_receipt_process_lyft.applescript
set counts to 0
mail_receipt_process_lyft.applescript
set theSender to sender of eachMessage
mail_receipt_process_lyft.applescript
set theDate to date received of eachMessage
mail_receipt_process_lyft.applescript
if theSender contains sender1 then
mail_receipt_process_lyft.applescript
set theContent to content of eachMessage
mail_receipt_process_lyft.applescript
repeat with aParagraph in (paragraphs of theContent)
mail_receipt_process_lyft.applescript
set aParagraph to contents of aParagraph
mail_receipt_process_lyft.applescript
if counter is true then
mail_receipt_process_lyft.applescript
set counts to 1
mail_receipt_process_lyft.applescript
if (aParagraph contains cardmatch1) then
mail_receipt_process_lyft.applescript
set cardcounter to true
mail_receipt_process_lyft.applescript
if (aParagraph contains match1) then
mail_receipt_process_lyft.applescript
set counter to true
mail_receipt_process_lyft.applescript
if (counter is true) and (counts = 1) then
mail_receipt_process_lyft.applescript
set textItems to every text item of aParagraph
mail_receipt_process_lyft.applescript
set value to (last item of textItems)
mail_receipt_process_lyft.applescript
set totals to totals + value
mail_receipt_process_lyft.applescript
set counts to counts + 1
mail_receipt_process_lyft.applescript
set AppleScript's text item delimiters to "<"
mail_receipt_process_lyft.applescript
set processedSender to every text item of theSender
mail_receipt_process_lyft.applescript
set processedSender to (first item of processedSender)
mail_receipt_process_lyft.applescript
if cardcounter is true then
mail_receipt_process_lyft.applescript
set cardRecord to cardmatch1
mail_receipt_process_lyft.applescript
set loc to space & "~/desktop/Receipts.db" & space
mail_receipt_process_lyft.applescript
set insertion to "insert into receipts values ('" & theDate & "', '" & processedSender & "','" & value & "','" & cardRecord & "')"
mail_receipt_process_lyft.applescript
set test_exists to "select exists (select * from receipts where entity_paid='" & processedSender & "' and date='" & theDate & "')"
mail_receipt_process_lyft.applescript
set test_result to do shell script head & (test_exists) & quote
mail_receipt_process_lyft.applescript
if (test_result as number = 0) then
mail_receipt_process_lyft.applescript
do shell script head & insertion & quote
mail_receipt_process_lyft.applescript
set theMessage to forward eachMessage
mail_receipt_process_lyft.applescript
make new recipient at end of to recipients with properties {address:testreceiver}
mail_receipt_process_lyft.applescript
make new recipient at end of cc recipients with properties {address:testreceiver}
mail_receipt_process_lyft.applescript
set subject to processedSender & theDate
mail_receipt_process_lyft.applescript
repeat with i from (count of paragraphs) to 1 by -1
Text -remove blank lines.applescript
delete paragraph i
Text -remove blank lines.applescript
on linkinuscmd(cmd)
spotfm.scpt
set theString to "/me is not currently running Spotify."
spotfm.scpt
set user to ""
spotfm.scpt
set apikey to ""
spotfm.scpt
set lastfm_uri to "https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=" & user & "&api_key=" & apikey & "&limit=1&format=json"
spotfm.scpt
set last_scrobble to fetch JSON from (lastfm_uri) with cleaning feed
spotfm.scpt
set track to track of recenttracks of last_scrobble
spotfm.scpt
set theArtist to |#text| of artist of track of recenttracks of last_scrobble
spotfm.scpt
set theAlbum to |#text| of album of track of recenttracks of last_scrobble
spotfm.scpt
set theTrack to |name| of track of recenttracks of last_scrobble
spotfm.scpt
set theUrl to |url| of track of recenttracks of last_scrobble
spotfm.scpt
set spotify_uri to "https://ws.spotify.com/search/1/track.json?q=" & (do shell script "php -r 'echo urlencode(\"" & "" & theArtist & " - " & theTrack & "\");'")
spotfm.scpt
set last_spotify to fetch JSON from spotify_uri
spotfm.scpt
set theUrl to href of item 1 of tracks of last_spotify
spotfm.scpt
if (count of theTrack) < 1 then
spotfm.scpt
if (count of theTrack) > 0 then
spotfm.scpt
set theString to "/me is listening to ♫ " & theTrack & " ♫" & " by " & theArtist & ", from the album " & theAlbum & " via Spotify (" & theUrl & ")"
spotfm.scpt
on adding folder items to this_folder after receiving this_item
dbRun.scpt
if (this_item as string) does not end with ":" then
dbRun.scpt
run script this_item
dbRun.scpt
to reverse_string given a_string:string_to_reverse
Script 18-13.applescript
return (reverse of (characters of string_to_reverse)) as text
Script 18-13.applescript
end reverse_string
Script 18-13.applescript
set kindle to false
Send%20Clippings%20to%20Readwise.scpt
repeat with added_item in added_items
Send%20Clippings%20to%20Readwise.scpt
set item_name to name of added_item
Send%20Clippings%20to%20Readwise.scpt
if item_name is "Kindle" then
Send%20Clippings%20to%20Readwise.scpt
set kindle to true
Send%20Clippings%20to%20Readwise.scpt
if not kindle then
Send%20Clippings%20to%20Readwise.scpt
set attachmentPath to "/Volumes/Kindle/documents/My Clippings.txt"
Send%20Clippings%20to%20Readwise.scpt
set theAttachment to POSIX file attachmentPath
Send%20Clippings%20to%20Readwise.scpt
if not (theAttachment exists) then
Send%20Clippings%20to%20Readwise.scpt
set recipientName to "Readwise"
Send%20Clippings%20to%20Readwise.scpt
set recipientAddress to "[email protected]"
Send%20Clippings%20to%20Readwise.scpt
set subjectLine to "Kindle import"
Send%20Clippings%20to%20Readwise.scpt
set mailBody to ""
Send%20Clippings%20to%20Readwise.scpt
set AppleScript's text item delimiters to {"\\n"}
Send%20Clippings%20to%20Readwise.scpt
set mailBody to text items of mailBody
Send%20Clippings%20to%20Readwise.scpt
set AppleScript's text item delimiters to {" "}
Send%20Clippings%20to%20Readwise.scpt
set mailBody to mailBody as text
Send%20Clippings%20to%20Readwise.scpt
set newMessage to make new outgoing message with properties {subject:subjectLine, content:mailBody, visible:false}
Send%20Clippings%20to%20Readwise.scpt
make new attachment with properties {file name:theAttachment} at after the last paragraph
Send%20Clippings%20to%20Readwise.scpt
display notification "Clippings sent!" with title "Readwise" subtitle "Clippings sent!"
Send%20Clippings%20to%20Readwise.scpt
if not (exists record with URL theUrl) then create record with {name:theName, type:bookmark, URL:theUrl, tags:theTags} in theGroup
Pinboard.applescript
tell application "GeekTool Helper.app"
geektoolcheck.applescript
properties of «class gLet» id "87C7FBD3-61F7-4494-8A3A-9DC8D7B09C4F"
geektoolcheck.applescript
set myps to first item of (every «class gLet» whose name is "myps")
geektoolcheck.applescript
set position of myps to {-200, 400}
geektoolcheck.applescript
set openTabs to name of tabs of window 1
Padlet - Extract names.applescript
set padletTab to choose from list openTabs with prompt "Select Padlet Page"
Padlet - Extract names.applescript
set padletTab to item 1 of padletTab
Padlet - Extract names.applescript
tell tab padletTab of window 1
Padlet - Extract names.applescript
set numberOfPosts to do JavaScript "document.getElementsByClassName('accessibility oob').length"
Padlet - Extract names.applescript
repeat with i from 0 to numberOfPosts - 1
Padlet - Extract names.applescript
set end of names to do JavaScript "document.getElementsByClassName('accessibility oob')[" & i & "].textContent"
Padlet - Extract names.applescript
set L to names as text
Padlet - Extract names.applescript
set FL to words of L
Padlet - Extract names.applescript
set splitNames to {}
Padlet - Extract names.applescript
repeat with i from 1 to count of FL
Padlet - Extract names.applescript
if item i of FL is not "and" then
Padlet - Extract names.applescript