text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
if not {newwebsiteurl begins with basewebsiteurl} then
|
github-to-devonthink.scpt
|
log "Skipped URL as reference to other repository " & newwebsiteurl
|
github-to-devonthink.scpt
|
if newwebsiteurl contains "#" then
|
github-to-devonthink.scpt
|
log "Skipped URL as it's a relative jump " & newwebsiteurl
|
github-to-devonthink.scpt
|
if not {newwebsiteurl begins with "http:" or newwebsiteurl begins with "https:"} then
|
github-to-devonthink.scpt
|
log "Page URL does not start with http! " & newwebsiteurl
|
github-to-devonthink.scpt
|
if newwebsiteurl contains "README.md" then
|
github-to-devonthink.scpt
|
log "Skipped README.md at " & newwebsiteurl
|
github-to-devonthink.scpt
|
if newwebsiteurl contains "?raw=true" then
|
github-to-devonthink.scpt
|
log "Skipped binary file at " & newwebsiteurl
|
github-to-devonthink.scpt
|
if downloadedurls contains newwebsiteurl then
|
github-to-devonthink.scpt
|
log "URL already downloaded, so it's not done again " & newwebsiteurl
|
github-to-devonthink.scpt
|
set downloadedurls to downloadedurls & newwebsiteurl
|
github-to-devonthink.scpt
|
log "Tell DT to scrap " & newwebsiteurl
|
github-to-devonthink.scpt
|
log " Download tenative " & i
|
github-to-devonthink.scpt
|
set contentobject to create PDF document from newwebsiteurl name newwebsiteurl
|
github-to-devonthink.scpt
|
log " DT is back!"
|
github-to-devonthink.scpt
|
if contentobject is not missing value then exit repeat
|
github-to-devonthink.scpt
|
if contentobject is missing value then
|
github-to-devonthink.scpt
|
log " DT create PDF document returns 'missing value'"
|
github-to-devonthink.scpt
|
log " from: " & newwebsiteurl & ", name: " & newwebsiteurl
|
github-to-devonthink.scpt
|
log " return: " & contentobject
|
github-to-devonthink.scpt
|
say "Warning! A page could not been downloaded!"
|
github-to-devonthink.scpt
|
set end of allnewnotes to contentobject
|
github-to-devonthink.scpt
|
set websitesource to download markup from newwebsiteurl
|
github-to-devonthink.scpt
|
set subpageurls to get links of websitesource base URL newwebsiteurl
|
github-to-devonthink.scpt
|
repeat with subpageurl in subpageurls
|
github-to-devonthink.scpt
|
handle_page(subpageurl)
|
github-to-devonthink.scpt
|
end handle_page
|
github-to-devonthink.scpt
|
set outputFileName to choose file with prompt "Select address book group name export:"
|
Import group names.applescript
|
set grps to {}
|
Import group names.applescript
|
if text item 2 of theLine does not contain "SmartGroup" then
|
Import group names.applescript
|
set grps to grps & (text item 1 of theLine as list)
|
Import group names.applescript
|
repeat with grp_name in grps
|
Import group names.applescript
|
if name of every group does not contain grp_name then
|
Import group names.applescript
|
set theNewGroup to make new group with properties {name:grp_name}
|
Import group names.applescript
|
name of every group
|
Import group names.applescript
|
show progress indicator "Counting characters" steps -1
|
Count Characters.applescript
|
set this_characters to my countCharacters(this_selection)
|
Count Characters.applescript
|
display alert "DEVONthink" message (this_characters as string) & " characters."
|
Count Characters.applescript
|
on countCharacters(these_childs)
|
Count Characters.applescript
|
set this_count to this_count + (character count of this_child)
|
Count Characters.applescript
|
set this_count to this_count + (my countCharacters(children of this_child))
|
Count Characters.applescript
|
end countCharacters
|
Count Characters.applescript
|
log bonjourDiscovery("afpovertcp", 0.5)
|
bonjourDiscovery.applescript
|
log bonjourDiscovery("ssh", 0.5)
|
bonjourDiscovery.applescript
|
on bonjourDiscovery(aServiceType, aScanTime)
|
bonjourDiscovery.applescript
|
script BonjourDiscover
|
bonjourDiscovery.applescript
|
property discoveryResults : {}
|
bonjourDiscovery.applescript
|
property discoveredNames : {}
|
bonjourDiscovery.applescript
|
set discoveryResults to {}
|
bonjourDiscovery.applescript
|
set discoveredNames to {}
|
bonjourDiscovery.applescript
|
on discover()
|
bonjourDiscovery.applescript
|
set discoveryResults to runDiscoveryScript()
|
bonjourDiscovery.applescript
|
set discoveredNames to sortList(discoveredHostnames())
|
bonjourDiscovery.applescript
|
return discoveredNames
|
bonjourDiscovery.applescript
|
end discover
|
bonjourDiscovery.applescript
|
on runDiscoveryScript()
|
bonjourDiscovery.applescript
|
set end of shellScript to "/usr/bin/dns-sd -B _" & serviceType & "._tcp local &"
|
bonjourDiscovery.applescript
|
set end of shellScript to "/bin/sleep " & (scanTime as text)
|
bonjourDiscovery.applescript
|
set end of shellScript to "/bin/kill -HUP $mDNSpid"
|
bonjourDiscovery.applescript
|
set discoverResult to do shell script shellScript
|
bonjourDiscovery.applescript
|
set discoverResults to paragraphs 5 thru -1 of discoverResult
|
bonjourDiscovery.applescript
|
return discoverResults
|
bonjourDiscovery.applescript
|
end runDiscoveryScript
|
bonjourDiscovery.applescript
|
on discoveredHostnames()
|
bonjourDiscovery.applescript
|
set hostNames to {}
|
bonjourDiscovery.applescript
|
set text item delimiters to ("_" & serviceType & "._tcp.")
|
bonjourDiscovery.applescript
|
repeat with i from 1 to count of discoveryResults
|
bonjourDiscovery.applescript
|
set hostName to trim(text item 2 of (item i of discoveryResults))
|
bonjourDiscovery.applescript
|
if hostName is not in hostNames then set end of hostNames to hostName
|
bonjourDiscovery.applescript
|
return hostNames
|
bonjourDiscovery.applescript
|
end discoveredHostnames
|
bonjourDiscovery.applescript
|
set sortedText to do shell script "/bin/echo " & quoted form of tempText & " | /usr/bin/sort"
|
bonjourDiscovery.applescript
|
tell BonjourDiscover
|
bonjourDiscovery.applescript
|
set discoverResult to discover()
|
bonjourDiscovery.applescript
|
return discoverResult
|
bonjourDiscovery.applescript
|
end discoverBonjourServicesOfType
|
bonjourDiscovery.applescript
|
if finderSelection ≠ {} then
|
fHash.applescript
|
open finderSelection
|
fHash.applescript
|
set _new_session to last item of sessions
|
open-iterm-from-chrome.applescript
|
tell _new_session
|
open-iterm-from-chrome.applescript
|
set command to "cd src/" & repo_path
|
open-iterm-from-chrome.applescript
|
write text command
|
open-iterm-from-chrome.applescript
|
property ScriptName : "fmObjectDeployer"
|
fmObjectDeployer.applescript
|
set question to display dialog ("Find Safari tab:") default answer ""
|
Find Safari Tabs.applescript
|
set searchpat to text returned of question
|
Find Safari Tabs.applescript
|
display dialog "No matches"
|
Find Safari Tabs.applescript
|
set calendar_open to false
|
open_calendar.scpt
|
if view of this_window is calendar view then
|
open_calendar.scpt
|
set calendar_open to true
|
open_calendar.scpt
|
if calendar_open is false then
|
open_calendar.scpt
|
set view of the first main window to calendar view
|
open_calendar.scpt
|
move folder myFolderPath to (path to desktop folder)
|
005_05_files_and_folders-move_a_folder.applescript
|
set current time to doc1time - 10
|
Synced Rev 10.applescript
|
set myFolder to (choose folder)
|
images_to_word_with_headings.scpt
|
tell application "Finder" to set myFiles to files of myFolder as alias list
|
images_to_word_with_headings.scpt
|
repeat with aFile in myFiles
|
images_to_word_with_headings.scpt
|
set theFile to my basename(POSIX path of aFile)
|
images_to_word_with_headings.scpt
|
set theFileHeader to my remove_extension(theFile)
|
images_to_word_with_headings.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.