text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set callDuration to word 4 of item 14 of theStatusResults | Deskpro Volume Utility v2.scpt |
set callStatus to word 4 of item 15 of theStatusResults | Deskpro Volume Utility v2.scpt |
end get_xml | Deskpro Volume Utility v2.scpt |
on set_tplink(state) | Deskpro Volume Utility v2.scpt |
repeat with myDeviceid in words of myTPLinkDevices | Deskpro Volume Utility v2.scpt |
set myDeviceid to myDeviceid -- of myTPLinkDevices | Deskpro Volume Utility v2.scpt |
do shell script "/usr/local/bin/kasa --host " & myDeviceid & " " & state | Deskpro Volume Utility v2.scpt |
end set_tplink | Deskpro Volume Utility v2.scpt |
on removeMarkupFromText(theText) | Deskpro Volume Utility v2.scpt |
set tagDetected to false | Deskpro Volume Utility v2.scpt |
set theCleanText to "" | Deskpro Volume Utility v2.scpt |
repeat with a from 1 to length of theText | Deskpro Volume Utility v2.scpt |
set theCurrentCharacter to character a of theText | Deskpro Volume Utility v2.scpt |
if theCurrentCharacter is "<" then | Deskpro Volume Utility v2.scpt |
set tagDetected to true | Deskpro Volume Utility v2.scpt |
else if theCurrentCharacter is ">" then | Deskpro Volume Utility v2.scpt |
else if tagDetected is false then | Deskpro Volume Utility v2.scpt |
set theCleanText to theCleanText & theCurrentCharacter as string | Deskpro Volume Utility v2.scpt |
return theCleanText | Deskpro Volume Utility v2.scpt |
end removeMarkupFromText | Deskpro Volume Utility v2.scpt |
property asanapath : "/Users/dbyler/.rbenv/shims/asana" | Create Asana task.applescript |
property workspace : "Calorie" | Create Asana task.applescript |
on log_item(myTask) | Create Asana task.applescript |
set myTask to my replace_chars(myTask, "\"", "\\\"") | Create Asana task.applescript |
do shell script asanapath & " \"" & workspace & " " & myTask & "\"" | Create Asana task.applescript |
on handle_string(myTask) --LaunchBar direct input | Create Asana task.applescript |
my log_item(myTask) | Create Asana task.applescript |
on alfred_script(q) --Alfred direct input | Create Asana task.applescript |
log_item(myTask) | Create Asana task.applescript |
on run --direct run | Create Asana task.applescript |
set mystring to text returned of (display dialog "New Asana task in " & workspace & ": " default answer "") | Create Asana task.applescript |
my log_item(mystring) | Create Asana task.applescript |
continue quit -- required for the script to actually quit | QuitHandler.applescript |
tell application "My Clock" | Script 18-19.applescript |
tell_time() | Script 18-19.applescript |
property documentTemplate : "Blank" | OmniGraffle Sitemap Generator.applescript |
property getPageText : false | OmniGraffle Sitemap Generator.applescript |
property defaultPageNamesList : {"index.html, index.php, default.html, index.htm, default.htm default.asp, default.aspx, index.jsp, default.jsp"} | OmniGraffle Sitemap Generator.applescript |
set defaultPageNames to {} | OmniGraffle Sitemap Generator.applescript |
set sitemapFile to choose file with prompt "Please select a sitemap.xml file. I don't test for file type, so make sure it's a text XML file." | OmniGraffle Sitemap Generator.applescript |
set {text returned:textReturned, button returned:buttonReturned} to display dialog "Are there any page names you want to omit from the sitemap? Enter a comma-separated list of any page names that should be suppressed." with title "Omit Pages Named" default answer defaultPageNamesList buttons {"Cancel", "Include All", "... | OmniGraffle Sitemap Generator.applescript |
if buttonReturned is not in {"None", "Cancel"} then | OmniGraffle Sitemap Generator.applescript |
set defaultPageNames to text items of textReturned | OmniGraffle Sitemap Generator.applescript |
set sitemapXML to open for access sitemapFile | OmniGraffle Sitemap Generator.applescript |
set uriList to {} | OmniGraffle Sitemap Generator.applescript |
set isDone to false | OmniGraffle Sitemap Generator.applescript |
repeat until isDone -- end of sitemapXML | OmniGraffle Sitemap Generator.applescript |
read sitemapXML before "<" | OmniGraffle Sitemap Generator.applescript |
set theTag to read sitemapXML before ">" | OmniGraffle Sitemap Generator.applescript |
if theTag is "loc" then | OmniGraffle Sitemap Generator.applescript |
set theURI to read sitemapXML before "<" | OmniGraffle Sitemap Generator.applescript |
copy theURI to the end of uriList | OmniGraffle Sitemap Generator.applescript |
set isDone to true | OmniGraffle Sitemap Generator.applescript |
close access sitemapXML | OmniGraffle Sitemap Generator.applescript |
makeNewSitemap() | OmniGraffle Sitemap Generator.applescript |
repeat with rawURI in uriList | OmniGraffle Sitemap Generator.applescript |
if (offset of "://" in rawURI) > 0 then | OmniGraffle Sitemap Generator.applescript |
set currentURI to text ((offset of "://" in rawURI) + 3) through (length of rawURI) of rawURI | OmniGraffle Sitemap Generator.applescript |
set uriProtocol to text 1 through ((offset of "://" in rawURI) + 2) of rawURI | OmniGraffle Sitemap Generator.applescript |
else if (offset of ":" in rawURI) > 0 then | OmniGraffle Sitemap Generator.applescript |
set currentURI to text ((offset of ":" in rawURI) + 1) through (length of rawURI) of rawURI | OmniGraffle Sitemap Generator.applescript |
set uriProtocol to text 1 through ((offset of ":" in rawURI) + 1) of rawURI | OmniGraffle Sitemap Generator.applescript |
set currentURI to rawURI | OmniGraffle Sitemap Generator.applescript |
set uriProtocol to "" | OmniGraffle Sitemap Generator.applescript |
if last character of currentURI is "/" then | OmniGraffle Sitemap Generator.applescript |
set currentURI to text 1 thru ((length of currentURI) - 1) of currentURI | OmniGraffle Sitemap Generator.applescript |
set currentItems to text items of currentURI | OmniGraffle Sitemap Generator.applescript |
repeat with i from 1 to count of items in currentItems | OmniGraffle Sitemap Generator.applescript |
set isDefaultPage to item i of currentItems is in defaultPageNames | OmniGraffle Sitemap Generator.applescript |
if isDefaultPage is false then | OmniGraffle Sitemap Generator.applescript |
set cItem to uriProtocol & (items 1 through i of currentItems as string) | OmniGraffle Sitemap Generator.applescript |
if cItem is in nodeList then | OmniGraffle Sitemap Generator.applescript |
copy contents of cItem to the end of nodeList | OmniGraffle Sitemap Generator.applescript |
set childNode to makeShape(cItem) | OmniGraffle Sitemap Generator.applescript |
if i is greater than 1 then | OmniGraffle Sitemap Generator.applescript |
set parentText to uriProtocol & (items 1 through (i - 1) of currentItems as string) | OmniGraffle Sitemap Generator.applescript |
set parentNode to findShape(parentText) | OmniGraffle Sitemap Generator.applescript |
drawConnectingLine(parentNode, childNode) | OmniGraffle Sitemap Generator.applescript |
set text item delimiters to savedDelimiters | OmniGraffle Sitemap Generator.applescript |
cleanupSitemap() | OmniGraffle Sitemap Generator.applescript |
on makeShape(aURL) | OmniGraffle Sitemap Generator.applescript |
set sText to last text item of aURL | OmniGraffle Sitemap Generator.applescript |
set sNotes to "" | OmniGraffle Sitemap Generator.applescript |
if getPageText is true then | OmniGraffle Sitemap Generator.applescript |
do shell script "curl -L --max-time 1 \"" & aURL & "\" | textutil -convert txt -timeout 1 -stdin -stdout" | OmniGraffle Sitemap Generator.applescript |
set sNotes to result | OmniGraffle Sitemap Generator.applescript |
return make new shape with properties {text:sText, url:aURL, notes:sNotes, fill:solid fill, text placement:center, draws shadow:true, side padding:5, shadow color:{0, 0, 0}, stroke color:{0, 0, 0}, thickness:1.0, autosizing:full, vertical padding:5, fill color:{65535, 65535, 65535}, shadow fuzziness:8.0, draws stroke:t... | OmniGraffle Sitemap Generator.applescript |
end makeShape | OmniGraffle Sitemap Generator.applescript |
on findShape(aURL) | OmniGraffle Sitemap Generator.applescript |
set matchingShapes to shapes of canvas of front window whose url is aURL | OmniGraffle Sitemap Generator.applescript |
if (count of matchingShapes) is greater than 0 then | OmniGraffle Sitemap Generator.applescript |
return item 1 of matchingShapes | OmniGraffle Sitemap Generator.applescript |
end findShape | OmniGraffle Sitemap Generator.applescript |
on drawConnectingLine(aSource, aDestination) | OmniGraffle Sitemap Generator.applescript |
tell aSource | OmniGraffle Sitemap Generator.applescript |
set aLine to connect to aDestination | OmniGraffle Sitemap Generator.applescript |
set tail magnet of aLine to 1 | OmniGraffle Sitemap Generator.applescript |
end drawConnectingLine | OmniGraffle Sitemap Generator.applescript |
on makeNewSitemap() | OmniGraffle Sitemap Generator.applescript |
make new document with properties {template:documentTemplate} | OmniGraffle Sitemap Generator.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.