Giter VIP home page Giter VIP logo

obsidian-frontmatter-modified-date's Introduction

Important

Modded to log as an array by default without requring append_modified_update flag.

Update modified field on edit

This plugin will automatically update a modified property in your frontmatter/YAML when you edit a note.

This is different from other plugins in that it does not use the filesystem modified time. The frontmatter will only update when you actually work on a file inside Obsidian.


Options

  • Specify whatever YAML field name you prefer.
  • Specify the date format, using MomentJS format.
  • Exclude folders which you don't want to be automatically updated. This is important for anywhere you store your scripts or Templater templates.

Excluding files

You can exclude a folder and all its subfolders in the Settings page.

If you want to exclude a single file, you can add a property called exclude_modified_update and give it a value. Setting it to true or using the Checkbox property type would be the most sensible option.


Append date to history

You can also append the date to a history array by adding a checkbox property called append_modified_update. This is useful if you want to keep track of every time you edit a note.

๐Ÿšฉ Warning

Removing the append_modified_update property from the frontmatter will remove all saved modification dates.

The default frequency of entries is maximum one per day - so if you update a note on the same day it will modify the existing entry for that day, rather than appending a new one.

If you wish to change that frequency, you can edit your data.json file and change the value for appendMaximumFrequency. You can use any MomentJS unit of time, e.g. second, minute, hour, month etc.


"Merging changes" popup

It's possible when using this plugin that you will see a message like this, however it should be a rare occurance rather than the norm:

9kcmzhtlu0l81

This is due to the way Obsidian itself handles the frontmatter update. If you are typing into a note at the same time that Obsidian updates the frontmatter field, it will show that message. There is no "external" process modifying the file, it is Obsidian itself.

My plugin works by waiting for 10 seconds after you stop typing before updating the frontmatter. By doing it this way it reduces the chance of that message popping up. However, if you start typing again the exact instant Obsidian is updating the frontmatter field, you'll see that message. It won't affect anything, it's just annoying. Hopefully they resolve this at some point.

Please note that you do not need to have the file open for the frontmatter to update. The updates go into a queue and the file will update even after you close it.

obsidian-frontmatter-modified-date's People

Contributors

abstraction avatar alangrainger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.