farling42 / obsidian-import-json

Plug-in for Obsidian.md which will create Notes from JSON files
MIT License
85 stars 5 forks source link

[Feature Enhancement] Ability to set property types during import #49

Open zenminimalist opened 1 year ago

zenminimalist commented 1 year ago

With Obsidian 1.4 around the corner (some that are already using it - not me, though), is there any way to import CSVs and have the property type set during import? I'm not sure how that property type works in the backend of things or how that might be exposed for plugins.

E.g. when importing a date or even a time column it should recognize it as such, when importing words that should be set as aliases or checkmark property type etc.

I'd be happy to test any pre-builds as I've already been testing your plugin the last few months with >800 rows of data and it works so beautifully :)

farling42 commented 1 year ago

At the moment, it looks like there's no way for an plugin to define the type of a property.

zenminimalist commented 1 year ago

Thanks, that's a shame. As a workaround: How would you approach this to change them in bulk?

farling42 commented 1 year ago

I don't have access to Obsidian 1.4 yet. The only UI I've seen is a popup menu that appears on each property within each Note.

zenminimalist commented 1 year ago

Yeah, that almost sounds like it's more a UI feature that is "put over" the YAML b/c if you change it back to code view you see the "old" view, which doesn't have those additional properties.

Guess we'll have to wait if Obsidian makes that feature available to other plugins. I'll definitely keep my eye on that :)

farling42 commented 1 year ago

Yeah, it's not a good thing if the types are stored somewhere other than inside the actual note.