This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
set rssFeed to XML file "Mac mini Internal:Users:steven:Downloads:stevenwbuehler.wordpress.2014-03-25.xml" | |
set rssItems to every XML element of XML element "channel" of XML element "rss" of contents of rssFeed whose name is "item" | |
repeat with thisItem in rssItems | |
set theTitle to the value of XML element "title" of thisItem | |
if theTitle is (missing value) then set theTitle to the value of XML element "pubDate" of thisItem | |
set thepubDate to the value of XML element "pubDate" of thisItem | |
set theContent to the value of XML element "content:encoded" of thisItem | |
tell application id "com.evernote.evernote" | |
create note notebook "Public Blog" with html theContent title theTitle created date (do shell script "date -j -f '%a, %d %b %Y %H:%M:%S %z' " & quote & thepubDate & quote & " '+%A, %B %d, %Y at %r'") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application id "com.evernote.evernote" | |
(* Compile a list of subject dates from the notebooks *) | |
set theNotebooks to every notebook | |
set yesterday to (current date) - (time of (current date)) - 1 * days | |
set today to (current date) - (time of (current date)) | |
set theHTMLBody to {} -- we'll convert this back to a single string at the end | |
repeat with thisNotebook in theNotebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<b>Subject: </b>The Subject<br/> | |
<b>From: </b>The Sender<br/> | |
<b>To: </b>Me<br/> | |
<b>Date Sent: </b>11/18/2013 10:22:56 AM<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application id "com.evernote.evernote" | |
set today to (current date) - (time of (current date)) -- set to today at midnight | |
set theNotes to every note in notebook "Work-Related" whose creation date ≥ today | |
repeat with thisNote in theNotes | |
set theContent to the HTML content of thisNote | |
set theOffset to the offset of "<b>Date Sent:</b> " in theContent | |
set theContent to text theOffset thru end of theContent | |
set theDate to text ((offset of "</b>" in theContent) + 5) thru ((offset of "<br/>" in theContent) - 1) of theContent | |
set the creation date of thisNote to date theDate | |
-- Evernote won't sync unless we do some other change, like tagging. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub FixReceiptDates() | |
Dim notebookxml As String | |
Dim outXML As String | |
Dim notebookname As Variant | |
Dim appON As OneNote.Application | |
Dim notes As MSXML2.DOMDocument60 | |
Dim page As MSXML2.DOMDocument60 | |
Set appON = New OneNote.Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GetSectionByName(ByVal strNotebookName As String, ByVal strSectionName As String) | |
Dim strNameofNotebook As String | |
Dim outXML As String | |
Dim appON As OneNote.Application | |
Dim docXML As MSXML2.DOMDocument60 | |
Set appON = New OneNote.Application | |
appON.GetHierarchy GetNotebookByName(strNotebookName), hsSections, outXML, xs2013 | |
Set docXML = New MSXML2.DOMDocument60 | |
docXML.LoadXML (outXML) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function GetNotebookByName(strnotebook As String) | |
Dim strNameofNotebook As String | |
Dim outXML As String | |
Dim appON As OneNote.Application | |
Dim docXML As MSXML2.DOMDocument60 | |
Set appON = New OneNote.Application | |
appON.GetHierarchy "", hsNotebooks, outXML, xs2013 | |
Set docXML = New MSXML2.DOMDocument60 | |
docXML.LoadXML (outXML) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function ConvertToGMT(LocalTime As Date, GMT_Adjust As Double, Optional Observes As Boolean = True, _ | |
Optional Country As String = "US") | |
' LocalTime is datetime in local | |
' GTM_Adjust is the normal number of hours you add to or subtract from GMT to get local standard time | |
' Function turns hours into minutes in DateAdd operations to accommodate half-hour GMT adjustments | |
' Country is jurisdiction; use ISO codes or common country name | |
Dim StartDST As Date | |
Dim EndDST As Date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Reminders" | |
set newReminder to make new reminder in list "Reminders" | |
set the name of newReminder to "Pick up mail at Post Office." | |
set the due date of newReminder to date (date string of (current date) & " at 5:00 PM") | |
set the remind me date of newReminder to date (date string of (current date) & " at 5:00 PM") | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub savetohtml(myItem As Outlook.MailItem) | |
On Error Resume Next | |
Dim objAtt As Outlook.Attachment | |
Dim fso As FileSystemObject | |
strPath = "\\psf\Home\Library\Containers\com.bitnami.mampstack\Data\app-5_4_9\apache2\htdocs\email\" | |
Set fso = CreateObject("Scripting.FileSystemObject") | |
Open (strPath & "Index.csv") For Append As #1 | |
cleansubject = myItem.Subject | |
stritemID = myItem.EntryID | |
myItem.SaveAs Path:=(strPath & stritemID & ".html"), Type:=olHTML |
OlderNewer