Code Monkey home page Code Monkey logo

obsidian-metadata-handler's Introduction

Obsidian Metadata Handler

⚠️ This script has been deprecated. It's not guaranteed to work. ⚠️

A small Python script to update system metadata and then put it into the YAML frontmatter.

Note: This is unoffical and is not associated with the developers of Obsidian.

So far, this script is able to fill in the created and modified dates. Filenames are coming soon.

Use cases

  • You want to move some files around, but are scared of losing the metadata?
  • You want to make sure your grandchildren can read the metadata?
  • You want to use the metadata in a Dataview script?

This is for you!

Running from source

It's recommended to do modified date first, as the modified date will be overrided when updating the YAML frontmatter.

This assumes you have Python and pip installed as a prerequisite.

Modified dates

pip install -r requirements.txt
python obsidian-metadata-handler/modified.py -p "full_path_to_your_vault"

Creation dates

pip install -r requirements.txt
python obsidian-metadata-handler/created.py -p "full_path_to_your_vault"

Native builds

These are being worked on, stay tuned!

See also

obsidian-metadata-handler's People

Contributors

tomodachi94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

obsidian-metadata-handler's Issues

Native Binaries

Native binaries would help with streamlining usage of the program.

I was thinking Nuitka could be used.

Deprecating the project

I've made the decision to deprecate the project, mainly due to a lack of time on my part. If someone wants to take over maintenance, please reach out on the forum thread.

Check on adding `created_date` fails when checking for `modified_date`

User lifesign on the Forums reported an error.

Traceback

$ python3 obsidian-metadata-handler/created.py -p "./test-vault"
test-vault/A file.md
Traceback (most recent call last):
  File "/Users/gaofeng/Code/opensource/obsidian-metadata-handler/obsidian-metadata-handler/created.py", line 30, in <module>
    if file["modified_date"] == True:
  File "/usr/local/lib/python3.9/site-packages/frontmatter/__init__.py", line 275, in __getitem__
    return self.metadata[name]
KeyError: 'modified_date'

(cc @lifesign, I think you are the same person…)

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.