dsebastien / obsidian-dataview-serializer

Obsidian plugin that gives you the power of Dataview, but generates Markdown, making it compatible with Obsidian Publish, and making the links appear on the Graph
MIT License
29 stars 2 forks source link

The "Scan and serialize all Dataview queries" command is broken #7

Closed tijmenvdk closed 1 month ago

tijmenvdk commented 1 month ago

Currently, only the folders that are explicitly listed in the settings file are scanned and updated, but I would like/need the option to redo all dataviews in the vault on demand.

dsebastien commented 1 month ago

Hello,

I did not test it, but I assume you could add / as a folder to scan to include everything. Then, you should be able to invoke the 'Scan and serialize all Dataview queries' command to scan everything except the excluded folders.

dsebastien commented 1 month ago

I just tested this and it works fine. I'll close this as there is a solution to achieve what you want.

tijmenvdk commented 1 month ago

Thanks for looking into this. I have tested this further. What I did:

  1. create an index page that lists a specific frontmatter attribute from a number of files, and close that (in Obsidian)
  2. change the frontmatter attibute in one of the listed pages
  3. ctrl+P and "scan and serialize all dataview queries"
  4. watch the listed page in Notepadd++ for changes

What I observed:

So, this works:

image

It works like this, the only annoyance is that I have to turn the plugin off and on to get things to work.

dsebastien commented 1 month ago

I just noticed a bug in the command that might explain the behavior you noticed. The command is indeed broken, and doesn't process anything. The command itself filters out files that should be processed, and asks for processing files that are ignored. Then, the function that is supposed to process the files ignores those because they are of course in the ignore list. Thus nothing happens.

https://github.com/dsebastien/obsidian-dataview-serializer/blob/master/apps/plugin/src/app/plugin.ts#L100

It's an easy fix though, I'll take care of it soon