PowerShell Script: Note Token Generator

Description

The purpose of this script is to create special “note token” files which are generally used to make small notes. My nickname for these are Pico Notes, for personal reasons.

Reserved characters for filenames:

  • It’s an image so you can put it where you can reference it easily.
  • A square image is also easy to see as a thumbnail.

Value/Utility/Hypothesis/Design/Theory

  • Simple to use, no extra programs aside from the small simple script below.
  • Note Tokens supposedly carry more mental weight than standard notes.
  • Exist on the same “plane” of your work area.
  • Don’t have to open the file to read it, may save time.
  • Gets you thinking about notes in a different way. Similar to rewiring your brain and looking at things at a different perspective. Because taking notes is a basic step, it could help you think about other basic things differently.
  • Notes are purely stored in the filename and the other contents of the file should be left empty.
  • The extension, “.ntok”, is mostly cosmetic other than to identify note token files.
  • Organize and track tasks.
  • Can spread the concepts to file folders, url files, and images. Concept is more manageable when it’s just Meta information and not the actual data.

Background Info

I usually just copy a of a shortcut that executes the code into the folder that I want to make Note Tokens in. I’m thinking there could be a more efficient way to execute this code via a keyboard shortcut. The word “generator” is used because it implies that this is used to create multiple things instead of one thing like a general verb word like “make” though using the verb form, “generate” more of a standard naming procedure. (nomenclature/jargon)

To-do List

Link to post on making executing scripts with a shortcut file. Link to post about going into detail about Note Tokens. Create separate post about Note Tokens, post should only be about Note Tokens or include thoughts about note taking. (Internal Note: Vocab: cmdlet)

# version 1.02
# version date: 22.04.23

<#
== references ==
get-date reference
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.2

== date formats ==
(get-date -format "yy.MM.dd")
example: 22.04.23
(get-date -format "HH.mm")
example: 23.59
- this is 24 hour format.

== parent folder name ==
$parentFolder = Split-Path -Path (Get-Location) -Leaf

#>
$priorityPrefix = "zz" ## Generally use "zz" or "aa"
$name = -join($priorityPrefix, "--d",(get-date -format "yy.MM.dd"),"-t24-",(get-date -format "HH.mm") )
# zz--d22.04.16-t24-09.06.ntok

New-Item -Path .\$name.ntok
# no new token made if same name exists.

# read-only to reduce overhead.
Set-ItemProperty -Path .\$name.ntok -Name IsReadOnly -Value $true

<#
== notes ==
ntok - abbreviation of note token.
#>

<#
== change log ==
- 22.04.25 - 1.04 - new-item reference link, read only setting. comment out to disable.
- 22.04.23 - 1.02 - cleanup, documentation of code bits.
- 22.04.15 - 1.00 - initial
1.01 date stamp
1.02 timestamp
#>