Template Filename

approved

by Callum Alpass

Create notes with templatable filenames, using date/time formats, random strings, and custom base numbering systems.

9 stars1,133 downloadsUpdated 11mo agoMIT
View on GitHub

Template Filename

An Obsidian plugin for creating notes with templatable filenames using date/time formats, random strings, and custom base numbering systems.

Features

  • Create notes with templated filenames
  • Live preview of the generated filename
  • Configurable default template and content
  • Extensive date and time formatting options
  • Random string generation and unique identifiers
  • Unix timestamp in various bases
  • Seconds since midnight in various bases
  • Counter variables for sequential naming
  • Text formatting utilities
  • System information variables

Usage

  1. Open the command palette (Ctrl/Cmd+P)
  2. Search for "Create note with template filename"
  3. Enter your filename template
  4. Enter note content (optional)
  5. Click "Create"

Alternatively, click the "file plus" icon in the left ribbon.

Template Syntax

Date & Time

PlaceholderDescription
YYYY4-digit year (e.g., 2025)
YY2-digit year (e.g., 25)
MM2-digit month (01-12)
MMonth without leading zero (1-12)
MMMMFull month name (January, February...)
MMMShort month name (Jan, Feb...)
DD2-digit day (01-31)
DDay without leading zero (1-31)
DDDDay of year (001-366)
ddddFull weekday name (Monday, Tuesday...)
dddShort weekday name (Mon, Tue...)
WWWeek number of year (01-53)
QQuarter of year (1-4)
HH2-digit hour, 24-hour format (00-23)
HHour without leading zero (0-23)
mm2-digit minute (00-59)
mMinute without leading zero (0-59)
ss2-digit second (00-59)
sSecond without leading zero (0-59)
SSS3-digit millisecond (000-999)

Unique Identifiers & Timestamps

PlaceholderDescription
{random:N}Random string of N characters
{uuid}Generate a UUID/GUID
{shortid}Generate a shorter unique ID (8 chars)
{unixtime:B}Unix timestamp in base B (2-36)
{daytime:B}Seconds since midnight in base B (2-36)
{hash:text}Create a hash of provided text

Counter Variables

PlaceholderDescription
{counter}Global auto-incrementing counter
{counter:name}Named counter (separate sequence)
{counter:reset}Reset all counters

System Variables

PlaceholderDescription
{hostname}Computer/device name
{username}Current user's name

Text Formatting

PlaceholderDescription
{lowercase:text}Convert text to lowercase
{uppercase:text}Convert text to uppercase
{slugify:text}Convert text to URL-friendly slug

Examples

  • YYYY-MM-DD_note → 2025-04-24_note.md
  • YYYY-MM-DD_HH-mm-ss → 2025-04-24_15-30-45.md
  • MMM-D-YYYY_meeting-notes → Apr-24-2025_meeting-notes.md
  • Q-YYYY-{random:6} → 2-2025-a7bF9c.md
  • note_{random:6} → note_a7bF9c.md
  • note_{shortid} → note_2a9d8f7b.md
  • {uuid} → 123e4567-e89b-12d3-a456-426614174000.md
  • note_{unixtime:36} → note_1c9rbbk.md (Unix time in base 36)
  • log_{daytime:16} → log_12ab3.md (Seconds since midnight in base 16)
  • entry-{counter} → entry-1.md, entry-2.md, etc.
  • {slugify:Meeting Notes 2025} → meeting-notes-2025.md

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.