Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Obsidian Bulk Edit from Template

A minimal Python script to bulk-apply a Markdown template to all notes in an Obsidian folder.

Useful when you want to standardize a set of notes (Hub pages, MOCs, indexes) with a consistent structure while preserving each note's individual title.

How it works

  1. Read a template file you designed in Obsidian.
  2. Loop through every .md file in the target folder.
  3. Replace every {{Title}} placeholder with the note's filename (without extension).
  4. Overwrite the note with the result.

Requirements

  • Python 3.6 or later
  • No third-party dependencies

Usage

Run the script from the root of your Obsidian vault:

python bulk_edit_from_template.py

By default it reads Template/Hub.md and updates all notes in 7_Hubs/Enterprise. Override either path with flags:

python bulk_edit_from_template.py --template "Templates/MyTemplate.md" --target "Hubs"

Dry run (preview before writing)

python bulk_edit_from_template.py --dry-run

Prints which files would be updated without touching anything on disk.

Template format

Your template can contain any Markdown content. Use {{Title}} where you want the note's filename inserted:

# {{Title}}

## Overview

## Resources

## Links

Arguments

Argument Default Description
--template Template/Hub.md Path to the template file
--target 7_Hubs/Enterprise Folder containing notes to update
--dry-run off Preview changes without writing

Warning

This script overwrites every note in the target folder. Back up your vault before running, or use --dry-run first to review what will change.

License

MIT License. See LICENSE.

About

Minimal Python script to bulk-apply .md template to all notes in an folder

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages