RafaelGB / obsidian-db-folder

Obsidian Plugin to Allow Notion like database based on folders
MIT License
1.24k stars 61 forks source link

Database templates #270

Closed wcsolski closed 1 year ago

wcsolski commented 2 years ago

Hi Rafael,

Thank you for making this plugin. It's been a complete game changer to my PKM system, and I'm sure to a lot of others' PKM too!!!

I'd like to request a template feature to automate database folders. Since it can be quite repetitive to create columns for specific different folders, this new feature could potentially save a lot of time for many people.

Thank you so much!

Kind regards, Solomon

RafaelGB commented 2 years ago

Hi @wcsolski , currently exist templates for columns and also new rows.

You can use them inside the database configuration. I don't know if you are looking for it or another type of template. Please, if its another, tell me more details about it.

You can select an existing note and it will add all the fields as a column or directly aggregate all the possible ones

Screenshot 2022-08-19 at 07 57 19
wcsolski commented 2 years ago

Hi @RafaelGB

Thanks for your reply. I tested the 'header template', and unfortunately, it didn't work as planned. Few problems:

  1. The order of columns was rearranged when I tried 'Select file as columns template.'
  2. A column that is supposed to be 'inline field' becomes off

    The database template I imagined would be able to duplicate columns of a database file perfectly from one folder to another. And then perfectly preserving the order, inline field setting, and column name. Let me know if that make sense!

Kind regards, Solomon

RafaelGB commented 2 years ago

I got you now.

An option of copy the entire configuration of another db file, isn’t it?

You can copy paste the markdown content and yes, all the configuration will work as well as the original.

That template menu its just with columns and you have to configure the type, inline/yaml flavour and all the stuff

rohanbatraio commented 2 years ago

I got you now.

An option of copy the entire configuration of another db file, isn’t it?

You can copy paste the markdown content and yes, all the configuration will work as well as the original.

That template menu its just with columns and you have to configure the type, inline/yaml flavour and all the stuff

You know i have a suggestion on this one, while i was thinking of what can we do best to have database templates, when this [FR] would be in priority consider my opinion for once.

What i was thinking is as DB FOLDER uses its own yaml as per my understanding, why not we make a master setting which works just like dataview and renders just like DB FOLDER but instead running dataview query it runs DBFOLDER YAML query. In that way we are able to modify the database internal YAML the same way we use DB FOLDER UI for markdown YAML.

to visualize it here is what i am saying,

Making a master database which list all DBFOLDER databases, then we can create fields there and all the DB's YAML would be edited, you can use the same implementation just replace DATAVIEW with your internal query system and setting should be added in the OBSIDIAN COMMAND PALLETE.

What do you think of this approach? Ofcourse @epic-enhancement

@RafaelGB

rohanbatraio commented 2 years ago

In that way people are getting the UI of database in templates aswell.

rohanbatraio commented 2 years ago

Wait I have an idea, why not use TEMPLATER in conjuction to make db folder templates? In that way we don't even have to do all of this, This is the best approach as per my opinion. For resolving this issue, and the above comment is for epic-enhancement in the future.

RafaelGB commented 2 years ago

I think your idea could be one of the exposed services for https://github.com/RafaelGB/obsidian-db-folder/issues/167. Sounds cool!

With templates I was thinking about just a menu to select another existed ddbbs. Keeping settings as simple as possible

rohanbatraio commented 2 years ago

I think your idea could be one of the exposed services for #167. Sounds cool!

With templates I was thinking about just a menu to select another existed ddbbs. Keeping settings as simple as possible

Yeah having an api would be as awesome as this feature, high hopes :+1:

RafaelGB commented 1 year ago

Do you think https://github.com/RafaelGB/obsidian-db-folder/issues/558 could cover this?