Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

obsidian-snippets

Table of Contents

Dataviewjs Snippets

Across Vault Word Count

https://github.com/torantine/obsidian-snippets/blob/main/dataviewjs.acrossVaultWordCount-v0.0.11.md

To function properly, this snippet requires MetaEdit.

A key feature of this snippet is the use of metadata fields, in this case inline dataview fields, as variables inside of dataviewjs. Through the use of MetaEdit and elements, an inline value can be used as a variable that stores its state with the page. Additionally, the dataview table can be exported to inline fields to store the data on the page.

Features:

  • Search by tag or modified date
  • Output: number of pages, modified date, page links, words, total words, characters, total characters, sentences, total sentences

Known Bugs:

  • Upon changing search type to tags, all pages cannot be chosen unless another option is chosen first.

Across Vault Word Count

Changelog

  • v 0.0.2 the search term text in target files is no longer counted
  • v 0.0.3 fixes non-space-delimited words not being counted. Thanks goes to boniall in the Obsidian discord for pointing out the issue.
  • v 0.0.4 added 。!? as defining ends of sentences and ‘ ’ “ ” as characters able to exist after sentence end
  • v 0.0.5 an empty tagToSearchFor now returns all files
  • v 0.0.6 added in modified date column and the ability to export to inline fields
  • v 0.0.11 added in dropdown menus, search by modified date, export sums to inline fields, dependency check for MetaEdit plugin

Templater Snippets

Suggest Files In Folder

https://github.com/torantine/obsidian-snippets/blob/main/templater.suggestFilesInFolder

Use this snippet in a templater js template to pop up a suggester with a list of files from a speficified folder. Change the placeholder text "FOLDER/SUBFOLDER/" to the folder path you want to suggest files from. The inFolderSuggester const will contain a string with the file chosen by the user.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published