text
stringlengths
0
15.7k
source
stringlengths
6
112
else if processedCount > 1 then
Strip PDF metadata.applescript
display notification "Finished deleting the metadata from " & processedCount & " files. Log file is in your Documents folder." with title "Metadata removed" sound name "beep"
Strip PDF metadata.applescript
display notification "Finished processing your files. None of them were changed. Log file is in your Documents folder." with title "All done!" sound name "beep"
Strip PDF metadata.applescript
on checkPDF(fn)
Strip PDF metadata.applescript
set xmp to (do shell script exiftool & "-q -q -b -xmp " & fn & " | xmllint -pretty 1 - | wc -l") as integer
Strip PDF metadata.applescript
display dialog errNum & ": " & errMsg as string
Strip PDF metadata.applescript
set xmp to 7
Strip PDF metadata.applescript
set exif to (do shell script exiftool & fn)
Strip PDF metadata.applescript
if ((count of paragraphs of exif) = 16 and (xmp = 7)) then
Strip PDF metadata.applescript
return "does not appear to have extra metadata."
Strip PDF metadata.applescript
end checkPDF
Strip PDF metadata.applescript
set weeklyReviewDay to Friday
UpdateReviews.applescript
set monthlyReviewDay to 1
UpdateReviews.applescript
set annualReviewMonth to January
UpdateReviews.applescript
set annualReviewDay to 1
UpdateReviews.applescript
set nextWeeklyReview to current date
UpdateReviews.applescript
set nextMonthlyReview to current date
UpdateReviews.applescript
set nextAnnualReview to current date
UpdateReviews.applescript
set nextWeeklyReview to nextWeekDay(nextWeeklyReview, weeklyReviewDay)
UpdateReviews.applescript
set nextMonthlyReview to nextMonthDay(nextMonthlyReview, monthlyReviewDay)
UpdateReviews.applescript
set nextAnnualReview to nextYearDay(nextAnnualReview, annualReviewMonth, annualReviewDay)
UpdateReviews.applescript
set question to display dialog "The Next Review date of your projects will be adjusted based on each project's Next Review setting.
UpdateReviews.applescript
Next Review for Weekly will be " & date string of nextWeeklyReview & "
UpdateReviews.applescript
Next Review for Monthly will be " & date string of nextMonthlyReview & "
UpdateReviews.applescript
Next Review for Yearly will be: " & date string of nextAnnualReview & "
UpdateReviews.applescript
Projects that have any other Next Review setting will be remain unchanged.
UpdateReviews.applescript
Are you sure you want to do this?" buttons {"Yes", "No"} default button 2
UpdateReviews.applescript
if answer is equal to "No" then
UpdateReviews.applescript
set lastWeeklyReview to lastWeekDay(nextWeeklyReview)
UpdateReviews.applescript
set lastMonthlyReview to lastMonthDay(nextMonthlyReview)
UpdateReviews.applescript
set lastAnnualReview to lastYearDay(nextAnnualReview)
UpdateReviews.applescript
set projectCNT to 0
UpdateReviews.applescript
set theProjects to every flattened project where its status is active or its status is on hold
UpdateReviews.applescript
repeat with projNum from 1 to length of theProjects
UpdateReviews.applescript
set curProject to item projNum of theProjects
UpdateReviews.applescript
set origReviewDate to next review date of curProject
UpdateReviews.applescript
set reviewInterval to review interval of curProject
UpdateReviews.applescript
set reviewUnits to unit of reviewInterval
UpdateReviews.applescript
set reviewSteps to steps of reviewInterval
UpdateReviews.applescript
if (reviewUnits = week and reviewSteps = 1) or (reviewUnits = day and reviewSteps = 7) then
UpdateReviews.applescript
set curProject's last review date to lastWeeklyReview
UpdateReviews.applescript
if curProject's next review date is not equal to origReviewDate then
UpdateReviews.applescript
set projectCNT to projectCNT + 1
UpdateReviews.applescript
else if (reviewUnits = month and reviewSteps = 1) then
UpdateReviews.applescript
set curProject's last review date to lastMonthlyReview
UpdateReviews.applescript
else if (reviewUnits = year and reviewSteps = 1) then
UpdateReviews.applescript
set curProject's last review date to lastAnnualReview
UpdateReviews.applescript
end if -- End reviewUnits
UpdateReviews.applescript
end repeat -- End project loop
UpdateReviews.applescript
end tell -- End tell for front document
UpdateReviews.applescript
end tell -- End tell for OmniFocus
UpdateReviews.applescript
display notification "All done" with title "OFScripts: Update Reviews" subtitle (projectCNT as string) & " projects updated"
UpdateReviews.applescript
on nextWeekDay(curDate, weeklyDay)
UpdateReviews.applescript
if curDate's weekday is not equal to weeklyDay then
UpdateReviews.applescript
repeat until curDate's weekday is weeklyDay
UpdateReviews.applescript
set curDate's day to (curDate's day) + 1
UpdateReviews.applescript
if curDate's weekday is Saturday then set i to 1
UpdateReviews.applescript
return curDate
UpdateReviews.applescript
end nextWeekDay
UpdateReviews.applescript
on nextMonthDay(reviewDate, monthlyDay)
UpdateReviews.applescript
if reviewDate's day > monthlyDay then
UpdateReviews.applescript
set reviewDate's day to 32
UpdateReviews.applescript
set reviewDate's day to monthlyDay
UpdateReviews.applescript
return reviewDate
UpdateReviews.applescript
end nextMonthDay
UpdateReviews.applescript
on nextYearDay(reviewDate, annualMonth, annualDay)
UpdateReviews.applescript
set reviewMonthNum to reviewDate's month as integer
UpdateReviews.applescript
set annualMonthNum to annualMonth as integer
UpdateReviews.applescript
if reviewMonthNum > annualMonthNum then
UpdateReviews.applescript
set reviewDate's year to (reviewDate's year) + 1
UpdateReviews.applescript
set reviewDate's month to annualMonth
UpdateReviews.applescript
set reviewDate's day to annualDay
UpdateReviews.applescript
else if reviewMonthNum = annualMonthNum then
UpdateReviews.applescript
if reviewDate's day > annualDay then
UpdateReviews.applescript
else if reviewMonthNum < annualMonthNum then
UpdateReviews.applescript
set reviewDate to nextMonthDay(reviewDate, annualDay)
UpdateReviews.applescript
end nextYearDay
UpdateReviews.applescript
on lastWeekDay(curDate)
UpdateReviews.applescript
set curDate to curDate - (1 * weeks)
UpdateReviews.applescript
end lastWeekDay
UpdateReviews.applescript
on lastMonthDay(curDate)
UpdateReviews.applescript
if ((curDate's month) * 1) is 1 then
UpdateReviews.applescript
set curDate's year to (curDate's year) - 1
UpdateReviews.applescript
set curDate's month to 12
UpdateReviews.applescript
set curDate's month to (curDate's month) - 1
UpdateReviews.applescript
end lastMonthDay
UpdateReviews.applescript
on lastYearDay(curDate)
UpdateReviews.applescript
end lastYearDay
UpdateReviews.applescript
property beeUser : "YOURNAME"
Beemind Anything 🐝.applescript
property beeAuthToken : "YOURTOKEN"
Beemind Anything 🐝.applescript
property defaultBeeValue : 1
Beemind Anything 🐝.applescript
property t1AlertHours : 30
Beemind Anything 🐝.applescript
property t1AlertLabel : " πŸ”₯"
Beemind Anything 🐝.applescript
property t2AlertHours : 54
Beemind Anything 🐝.applescript
property t2AlertLabel : " β–ͺ️"
Beemind Anything 🐝.applescript
property t3AlertHours : 78
Beemind Anything 🐝.applescript
property t3AlertLabel : " β€’ "
Beemind Anything 🐝.applescript
set displayNames to []
Beemind Anything 🐝.applescript
with timeout of 15 seconds
Beemind Anything 🐝.applescript
set myGoals to fetch_goals()
Beemind Anything 🐝.applescript