text
stringlengths 0
15.7k
| source
stringlengths 6
112
|
---|---|
set btn to (first button whose subrole is "AXFullScreenButton")
|
maximize copy.applescript
|
set p to position of btn
|
maximize copy.applescript
|
set xval to item 1 of p
|
maximize copy.applescript
|
set yval to item 2 of p
|
maximize copy.applescript
|
set cmd to "/usr/local/bin/cliclick \"kd:alt,shift\" \"c:" & xval & "," & yval & "\""
|
maximize copy.applescript
|
log cmd
|
maximize copy.applescript
|
set infile_directory to "/Users/doug/Desktop/inputs/"
|
batchProcess.scpt
|
set outfile_directory to "/Users/doug/Desktop/outputs/"
|
batchProcess.scpt
|
set infile_list to files of folder infile_directory
|
batchProcess.scpt
|
repeat with infile in infile_list
|
batchProcess.scpt
|
set infile_name to name of infile
|
batchProcess.scpt
|
set infile to POSIX file (infile_directory & infile_name)
|
batchProcess.scpt
|
set outfile to POSIX file (outfile_directory & infile_name)
|
batchProcess.scpt
|
run_ocr(infile, outfile)
|
batchProcess.scpt
|
on run_ocr(infile, outfile)
|
batchProcess.scpt
|
set appFile to POSIX file "/Applications/FineReader.app"
|
batchProcess.scpt
|
using terms from application "FineReader"
|
batchProcess.scpt
|
set langList to {English, Latin}
|
batchProcess.scpt
|
set saveType to single file
|
batchProcess.scpt
|
set toFile to outfile
|
batchProcess.scpt
|
set retainLayoutWordLayout to as editable copy
|
batchProcess.scpt
|
set keepPageNumberHeadersAndFootersBoolean to yes
|
batchProcess.scpt
|
set keepLineBreaksAndHyphenationBoolean to yes
|
batchProcess.scpt
|
set keepPageBreaksBoolean to yes
|
batchProcess.scpt
|
set increasePaperSizeToFitContentBoolean to yes
|
batchProcess.scpt
|
set keepImageBoolean to yes
|
batchProcess.scpt
|
set imageOptionsImageQualityEnum to high quality
|
batchProcess.scpt
|
set keepTextAndBackgroundColorsBoolean to yes
|
batchProcess.scpt
|
set highlightUncertainSymbolsBoolean to yes
|
batchProcess.scpt
|
set keepPageNumbersBoolean to yes
|
batchProcess.scpt
|
WaitWhileBusy()
|
batchProcess.scpt
|
set hasdoc to has document
|
batchProcess.scpt
|
if hasdoc then
|
batchProcess.scpt
|
close document
|
batchProcess.scpt
|
set auto_read to auto read new pages false
|
batchProcess.scpt
|
open infile using appFile
|
batchProcess.scpt
|
export to html toFile ¬
|
batchProcess.scpt
|
ocr languages enum langList ¬
|
batchProcess.scpt
|
saving type saveType ¬
|
batchProcess.scpt
|
keep line breaks and hyphenation keepLineBreaksAndHyphenationBoolean ¬
|
batchProcess.scpt
|
keep page numbers headers and footers keepPageNumberHeadersAndFootersBoolean ¬
|
batchProcess.scpt
|
keep pictures keepImageBoolean ¬
|
batchProcess.scpt
|
image quality imageOptionsImageQualityEnum ¬
|
batchProcess.scpt
|
keep text and background colors keepTextAndBackgroundColorsBoolean
|
batchProcess.scpt
|
auto read new pages auto_read
|
batchProcess.scpt
|
end run_ocr
|
batchProcess.scpt
|
on WaitWhileBusy()
|
batchProcess.scpt
|
repeat while IsMainApplicationBusy()
|
batchProcess.scpt
|
end WaitWhileBusy
|
batchProcess.scpt
|
on IsMainApplicationBusy()
|
batchProcess.scpt
|
set resultBoolean to is busy
|
batchProcess.scpt
|
return resultBoolean
|
batchProcess.scpt
|
end IsMainApplicationBusy
|
batchProcess.scpt
|
set the_array to {}
|
tpsmate.scpt
|
set end of the_array to ""
|
tpsmate.scpt
|
set this_item to (item i of these_items) as text
|
tpsmate.scpt
|
tell application "TPSMate"
|
tpsmate.scpt
|
set item i of the_array to (upload POSIX path of this_item)
|
tpsmate.scpt
|
set pic_list to joinList(the_array, return)
|
tpsmate.scpt
|
notify pic_list
|
tpsmate.scpt
|
set theDesktopPic to desktop picture
|
test copy 2.scpt
|
set theName to displayed name of theDesktopPic
|
test copy 2.scpt
|
reveal theDesktopPic
|
test copy 2.scpt
|
global theTitle
|
eurlexlookup.scpt
|
set thePub to get item 1 of theSelection
|
eurlexlookup.scpt
|
if the errorNumber is equal to -1728 then
|
eurlexlookup.scpt
|
display dialog "Please select a case first"
|
eurlexlookup.scpt
|
set theTitleRaw to value of field "Title"
|
eurlexlookup.scpt
|
set theTitle to (do shell script "sed 's= \\(([^)]*)\\)==g'<<<" & quoted form of theTitleRaw & " | sed 's/[\\.{}\\]//g'" & " | sed 's/and Others//g'") --remove (shorttitle),{}'s and \'s from title, and trailing white space, "and Others"
|
eurlexlookup.scpt
|
if cite key is not "" then
|
eurlexlookup.scpt
|
set theCiteKey to cite key
|
eurlexlookup.scpt
|
set theCiteKeyYear to do shell script "/usr/local/bin/awk -F: '{sub( /[a-z]+/,\"\",$3); print $3}' <<<" & quoted form of theCiteKey --pull year from citekey
|
eurlexlookup.scpt
|
set theCiteKeyYear to ":" --should then match any ECLI
|
eurlexlookup.scpt
|
if value of field "Pages" contains "EU:" then -- Get full ECLI from Pages field if avaialble
|
eurlexlookup.scpt
|
set theCiteKeyYear to value of field "pages"
|
eurlexlookup.scpt
|
if value of field "ecli" contains "EU:" then --Get full ECLI from ecli field if available
|
eurlexlookup.scpt
|
set theCiteKeyYear to value of field "ecli"
|
eurlexlookup.scpt
|
if theCiteKeyYear contains "EU" then
|
eurlexlookup.scpt
|
set theECLI to "ECLI:" & theCiteKeyYear
|
eurlexlookup.scpt
|
set theQueryp1 to "PREFIX cdm: <http://publications.europa.eu/ontology/cdm#>
|
eurlexlookup.scpt
|
SELECT DISTINCT ?work ?expression ?ecli ?celex ?alttitle ?agname ?title
|
eurlexlookup.scpt
|
WHERE {{
?work a ?class.
?expression cdm:expression_belongs_to_work ?work.
?expression cdm:expression_title ?title.
?expression cdm:expression_uses_language <http://publications.europa.eu/resource/authority/language/ENG>.
?work cdm:case-law_ecli "
set theQueryp2 to "^^<http://www.w3.org/2001/XMLSchema#string>.
?work cdm:resource_legal_id_celex ?celex.
OPTIONAL{?expression cdm:expression_case-law_parties|cdm:expression_title_alternative ?alttitle}}
|
eurlexlookup.scpt
|
UNION{?work a ?class.
?expression cdm:expression_belongs_to_work ?work.
?expression cdm:expression_title ?title.
?expression cdm:expression_uses_language <http://publications.europa.eu/resource/authority/language/ENG>.
?work cdm:case-law_ecli "
set theQueryp3 to "^^<http://www.w3.org/2001/XMLSchema#string>.
?work cdm:resource_legal_id_celex ?celex.
?work cdm:case-law_delivered_by_advocate-general ?ag.
?ag cdm:agent_name ?agname.
OPTIONAL{?expression cdm:expression_case-law_parties|cdm:expression_title_alternative ?alttitle}
|
eurlexlookup.scpt
|
FILTER(?class in (<http://publications.europa.eu/ontology/cdm#case-law>,<http://publications.europa.eu/ontology/cdm#judgement>,<http://publications.europa.eu/ontology/cdm#opinion_advocate-general>))}
|
eurlexlookup.scpt
|
LIMIT 15"
|
eurlexlookup.scpt
|
set theQuery to theQueryp1 & quoted form of theECLI & theQueryp2 & quoted form of theECLI & theQueryp3
|
eurlexlookup.scpt
|
SELECT ?work ?expression ?ecli ?celex ?alttitle ?agname ?title
|
eurlexlookup.scpt
|
WHERE {{
?work a ?class.
?expression cdm:expression_belongs_to_work ?work.
?expression cdm:expression_title ?title.
?expression cdm:expression_uses_language <http://publications.europa.eu/resource/authority/language/ENG>.
?work cdm:case-law_ecli ?ecli.
?work cdm:resource_legal_id_celex ?celex.
OPTIONAL{?expression cdm:expression_case-law_parties|cdm:expression_title_alternative ?alttitle}}
|
eurlexlookup.scpt
|
UNION{?work a ?class.
?expression cdm:expression_belongs_to_work ?work.
?expression cdm:expression_title ?title.
?expression cdm:expression_uses_language <http://publications.europa.eu/resource/authority/language/ENG>.
?work cdm:case-law_ecli ?ecli.
?work cdm:resource_legal_id_celex ?celex.
?work cdm:case-law_delivered_by_advocate-general ?ag.
?ag cdm:agent_name ?agname.
OPTIONAL{?expression cdm:expression_case-law_parties|cdm:expression_title_alternative ?alttitle}
|
eurlexlookup.scpt
|
FILTER(?class in (<http://publications.europa.eu/ontology/cdm#judgement>))
|
eurlexlookup.scpt
|
FILTER ((CONTAINS (?alttitle, "
|
eurlexlookup.scpt
|
set theQueryp2 to ") || CONTAINS(?title,"
|
eurlexlookup.scpt
|
set theQueryp3 to "))&& CONTAINS (?ecli,"
|
eurlexlookup.scpt
|
set theQueryp4 to "))}
|
eurlexlookup.scpt
|
set theQuery to theQueryp1 & quoted form of theTitle & theQueryp2 & quoted form of theTitle & theQueryp3 & quoted form of theCiteKeyYear & theQueryp4
|
eurlexlookup.scpt
|
set theResponse to do shell script "query=" & quoted form of theQuery & "; curl -H \"Accept:text/csv\" http://publications.europa.eu/webapi/rdf/sparql --data-urlencode \"query=$query\" | sed -E 's/ECLI://g'"
|
eurlexlookup.scpt
|
if theResponse is "" then
|
eurlexlookup.scpt
|
set NumberofResults to do shell script "awk -F, 'BEGIN{RS=\"\\r\"} NR>1 {rows++} END{print rows} '<<<" & quoted form of theResponse
|
eurlexlookup.scpt
|
if NumberofResults is equal to 0 then
|
eurlexlookup.scpt
|
display dialog "There are no results"
|
eurlexlookup.scpt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.