The Nerdy Details

icon picker
Script Descriptions

A huge benefit of Obsidian is that I can use python scripts to do cleanup on my files and organization scheme, because Obsidian is just a big folder of markdown files, which can be grouped in folders. This would not have been worth much to me in the pre-AI era because I don’t really know Python, but the kind of cleanup scripts I needed were so simple that it mostly took literally 1 to 3 minutes to ask GPT for a python script, paste the script into Visual Studio Code, and run it. While I usually have mixed success and lots of tweaking in my AI-enabled python scripting, these just mostly worked.
I asked GPT to summarize the function of each script it created, and I have an Obsidian note that holds all these descriptions.

Script Descriptions

propertyTemplater.py

Inserts a standard template into all notes that includes the created, modified, and tags properties. It also scans the body of the note for any tags (#tagname), removes them from the body, and places them in the tags: property within the YAML frontmatter.

gpt2obsidian.py

Saves the selected text (or copied content) from the clipboard directly into your Obsidian vault as a new note. It generates a filename based on the current date, "ChatGPT," and a summary of the note content.

cbTagger.py

Tags notes in Obsidian based on certain conditions. It searches for specific keywords or content in your notes (e.g., contains "Read on Omnivore" for cbOmnivore) and then applies tags accordingly.

replaceTemplaterPlaceholders.py

Searches through your Obsidian notes to find Templater placeholders like <% tp.file.creation_date("YYYY-MM-DD HH:mm") %> and replaces them with the actual creation and modification dates of the files. This allows you to automatically update placeholders across all your notes after applying a template.


crosschecker.py

This script compares multiple versions of a document or file to determine the most accurate or correct version. It analyzes different versions of the same content, cross-referencing them to identify discrepancies, and selects the version that aligns best with predefined criteria or consistency checks.

selectBestVersion.py

This script automates the process of selecting the best version of a file from multiple candidates. It evaluates each version based on specified criteria, such as date of creation, content accuracy, or other metadata, and then outputs the most appropriate version for use.

recreatefolders.py

This script is designed to rebuild or recreate a folder structure based on a predefined template or structure. It scans the specified directory for the current folder organization and reconstructs it, ensuring that the folder hierarchy matches a given standard or template.

folderstructure.py

This script sets up a folder structure according to specific organizational needs. It creates directories and subdirectories in a specified location, helping to maintain an organized file system. The structure is typically defined in the script and can be customized to fit different project or content management requirements.

tagYamlClean.py

This script cleans up the tags: property in the YAML frontmatter of Obsidian notes. It ensures that all tags are properly formatted, removes any duplicates, and corrects any inconsistencies in the tags list. The goal is to maintain a clean and organized tagging system within the notes.

yamlClean.py

This script focuses on cleaning and organizing the YAML frontmatter in Obsidian notes. It standardizes the formatting of the YAML section, corrects common errors, and ensures that all properties (e.g., title, tags, date) are consistently applied across all notes.

tagCleaner.py

This script identifies and cleans up tags within Obsidian notes, both in the YAML frontmatter and the body of the notes. It removes duplicates, consolidates similar tags, and ensures that tags are used consistently throughout the notes. This helps in maintaining a tidy and effective tagging system in Obsidian.

gptwithoutcodeblocks.py

This script extracts text from a transcript file by removing code blocks. It scans a given file for sections enclosed in triple backticks (```), indicating code blocks, and replaces those sections with a placeholder (<snip>). The cleaned text, excluding the code blocks, is then saved to a new file.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.