Jump to content

Macro/Automatic way to generate multiple notes each day?


Recommended Posts

Posted

Within the Windows desktop application, I'm looking for an easy way to hit a command/button to create multiple notes that then are inserted into multiple notebooks.  Does anyone have any suggestions on how this might be accomplished?

More specifically, I would like to create 4 notes at the beginning of each day so that it has the current date and that have a title formatted as listed below and placed each in their corresponding notebooks:

  1. Title = "YYYY-MM-DD - Work - Journal"   /  Notebook = "Work - Journal"
  2. Title = "YYYY-MM-DD - Work - To Do"   /  Notebook = "Work - TO DO"
  3. Title = "YYYY-MM-DD - Personal - Journal"   /  Notebook = "Personal - Journal"
  4. Title = "YYYY-MM-DD - Personal - To Do"   /  Notebook = "Personal - TO DO"

The body would initially be set to be blank.  Thanks

 

 

  • Level 5*
Posted

A simple PowerShell + ENScript solution:

# You may need to modify this according to the location of ENScript.exe
$ENscript = "C:\Program Files (x86)\Evernote\Evernote\ENScript.exe"

# Create an empty file for input into ENScript command
$out_file = "blank.txt"
$pre_file = ""
$pre_file | out-File $out_file -encoding ASCII

# Get the System date and format it to the Evernote expected format
$CurDate = Get-Date -Format "yyyy-MM-dd"

# Create notes...
$Notebook = "Work - Journal"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
# DEBUG: write notebook and title to console
#Write-Host "NoteTitle = " $NoteTitle " Notebook = " $Notebook
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

$Notebook = "Work - TO DO"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

$Notebook = "Personal - TO DO"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

$Notebook = "Personal - Notebook"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

#TODO: delete blank.txt if desired
#EXTRACREDIT: Make an array of notebook names so you can use a loop to create
#             each note title and the associated note

Not particularly elegant. I am not an expert PowerShell programmer.

  • Level 5*
Posted
16 minutes ago, jefito said:

A simple PowerShell + ENScript solution:

Looks great, Jeff. I wish I still had a Windows machine to test it.

Any ideas on how to schedule execution of this script on a daily basis?

For those, like me, unfamiliar with PowerShell, this provides a good intro and summary:
PowerShell Commands Cheat Sheet 

Posted
8 hours ago, jefito said:

A simple PowerShell + ENScript solution:


# You may need to modify this according to the location of ENScript.exe
$ENscript = "C:\Program Files (x86)\Evernote\Evernote\ENScript.exe"

# Create an empty file for input into ENScript command
$out_file = "blank.txt"
$pre_file = ""
$pre_file | out-File $out_file -encoding ASCII

# Get the System date and format it to the Evernote expected format
$CurDate = Get-Date -Format "yyyy-MM-dd"

# Create notes...
$Notebook = "Work - Journal"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
# DEBUG: write notebook and title to console
#Write-Host "NoteTitle = " $NoteTitle " Notebook = " $Notebook
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

$Notebook = "Work - TO DO"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

$Notebook = "Personal - TO DO"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

$Notebook = "Personal - Notebook"
$NoteTitle = '"' + $CurDate + " - " + $Notebook + '"'
& $ENscript createNote /i $NoteTitle /n $Notebook /s blank.txt

#TODO: delete blank.txt if desired
#EXTRACREDIT: Make an array of notebook names so you can use a loop to create
#             each note title and the associated note

Not particularly elegant. I am not an expert PowerShell programmer.

jefito,

Many thanks...this works perfectly and will speed up my morning routine tremendously. 

 

 

  • Level 5*
Posted
5 hours ago, mismille said:

jefito,

Many thanks...this works perfectly and will speed up my morning routine tremendously. 

You're welcome. You could probably use Windows Task Scheduler to automate the whole thing.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...