mgmeyers / obsidian-embedded-note-titles

GNU General Public License v3.0
58 stars 5 forks source link

Convert format of journal file names #12

Closed dcoales closed 2 years ago

dcoales commented 3 years ago

Hi,

I cloned your repo so that I could add the following lines at line 211 in HeadingsManager.ts to convert journal file names to a more readable format for the title. I stick with this format for the files for compatibility with LogSeq.

  // Check if the title is a date and if so convert it
    if (moment(title,"YYYY_MM_DD",true).isValid()){
      title = moment(title,"YYYY_MM_DD").format("ddd, Do MMMM YYYY");
    }

Obviously the file format and title format should be settings but I'm not sure how to do that at the moment. Do you think this is something you would want to include in your plugin. If you don't have time to do it yourself I'm happy to do some research and add the settings options if you would then consider accepting a pull request.

Anyway, thanks for the plugin in any event.

Cheers, David

DryIce1 commented 2 years ago

Nice @dcoales, that would be a fantastic feature to add - I would prefer not to have the "dddd, Do MMMM YYYY" within the page if it can be added at the top with this plugin!

But could you make sure it is "dddd" ie "Monday" and not "Mon". Thanks!

dcoales commented 2 years ago

I've added some settings so you can specify the display format you would like.

mgmeyers commented 2 years ago

This is now possible in the latest version. This requires obsidian 0.13.8, which is currently an insider's release.

mgmeyers commented 2 years ago

Obsidian 0.13.14 has been released to the public, and this feature is now publicly available.