sneakyfoxes5k downloadsLint filenames for invalid or troublesome characters.
Lint filenames for invalid or troublesome characters, such as pipes, colons, and brackets.
Useful for Obsidian users who create notes via external means or sync their notes across various platforms.
Handles characters that cause issues for Obsidian itself along with characters that are invalid in Android filenames.
This plugin adds two commands.
Safe filename linter: Lint the current filenameSafe filename linter: Lint all filesnames in the vaultThese commands rename files by replacing invalid or troublesome characters with characters of your choice. The renaming action uses the Obsidian renaming calls and will follow your vault settings for updating internal links (Prompted or Automatic). Be prepared to be patient if you have a large vault with many required renames.
Not yet available.
We are grateful to the developers of Obsidian for the Obisidan Sample Plugin for the basis of this plugin, and to Obsidian Filename Emoji Remover Plugin, whose code we read and experimented with before diving into writing our own plugin.
Safe Filename Linter in the directory.obsidian/plugins directory and run:
git clone https://github.com/sneaky-foxes/obsidian-safe-filename-lintermain.js and manifest.json in the directory in obsidian-safe-filename-linterplugins dirplugins dir, install the Hot Reload plugin (optional; strongly suggested)plugins dir, git clone the projectnpm installnpm run devWhen developing, ensure you are running npm run dev to keep the project building changes.
We welcome issues and pull requests for any characters that cause issues for Obsidian or any platform it runs on. We also welcome any additional replacement characters. This plugin has no desire to handle linting characters beyond functional filename use cases.
See CONTRIBUTING for details on how to submit code.
No automated tests are currently setup.
eslint .srcnpx prettier src --writeFor updates to the Obsidian API run npm update in the command line under your repo folder.
npm version [major|minor|patch]git tag -d [tag]main branch: git checkout main && git pull origin maingit tag -a [version number without v] -m "[version number without v]". Example: git tag -a 1.1.0 -m "1.1.0"git push --tagsNB Because we are using Github's rebase merge strategy, we need to work around the fact that Github is not fast-forwarding commits and is instead creating new commits for the rebase. When we allowed the tag to be in the pull release, the tag would be on a headless commit. This approach ensures that the tags are on main.
See for more release details: https://github.com/obsidianmd/obsidian-sample-plugin/releases