Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: compatibility with data view #10

Open
brimwats opened this issue May 16, 2022 · 3 comments
Open

FR: compatibility with data view #10

brimwats opened this issue May 16, 2022 · 3 comments

Comments

@brimwats
Copy link

brimwats commented May 16, 2022

imo the notation used in this plugin should be compatible with dataview, meaning that for example in the motorcycle example name:: hondawith 2 colons should be accepted. I haven't tested this out fully, just an initial thought!

@tomaszkiewicz
Copy link
Owner

The problem with that notation is it's Dataview internal mechanism that is not available in Obsidian API, do you need to include the code of dataview to be able to read that or depend on dataview for the whole plugin to work, this is the 1st point.

The 2nd and main point is actually even harder: Dataview notation is nice when you read things, however updating it, especially when we deal with lists of items is hard or even impossible - how to determine where to add new field if you have fields scattered across the document?

I'd really like to add integration with Dataview, made some attempts so far, but every time I faced some design challenges that make this integration "not nice" :(

Do far it was easier to replicate some common usage scenarios (like reading tags or reading related pages) instead of integrating dataview directly...

@yshalsager
Copy link

@tomaszkiewicz You can make use of metaedit plugin since it's provide an easy way to get/update metadata including dataview notation.
I am using it for doing quick automation tasks with quickadd plugin, its api is nice to work with:

const metaedit = app.plugins.plugins.metaedit.api;
const currentFile = app.workspace.getActiveFile();
const properties = await metaedit.getPropertiesInFile(currentFile);
const tags = await metaedit.getPropertyValue("tags", currentFile);
await metaedit.update("status", "Done", currentFile);

@arminta7
Copy link

This feature is essential for me. I don't use front matter at all, but heavily use inline fields. +1 from me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants