From 956064b7259538a2b5359a7b4b5815158b3984d6 Mon Sep 17 00:00:00 2001
From: iOS Allow you to remap the metadata fields of newly created media db entries.
- The different options are:
- Choose how metadata fields are mapped to property names. The options are:
Don't forget to save your changes using the save button for each individual category.
-
For more syntax, refer to format reference.
Your current syntax looks like this: "+this.plugin.dateFormatter.getPreview()+"")).addText(t=>{t.setPlaceholder(j.customDateFormat).setValue(this.plugin.settings.customDateFormat===j.customDateFormat?"":this.plugin.settings.customDateFormat).onChange(i=>{let n=i||j.customDateFormat;this.plugin.settings.customDateFormat=n,document.getElementById("media-db-dateformat-preview").textContent=this.plugin.dateFormatter.getPreview(n),this.plugin.saveSettings()})}),new C.Setting(e).setName("Open note in new tab").setDesc("Open the newly created note in a new tab.").addToggle(t=>{t.setValue(this.plugin.settings.openNoteInNewTab).onChange(i=>{this.plugin.settings.openNoteInNewTab=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Use default front matter").setDesc("Whether to use the default front matter. If disabled, the front matter from the template will be used. Same as mapping everything to remove.").addToggle(t=>{t.setValue(this.plugin.settings.useDefaultFrontMatter).onChange(i=>{this.plugin.settings.useDefaultFrontMatter=i,this.plugin.saveSettings(),this.display()})}),new C.Setting(e).setName("Enable Templater integration").setDesc("Enable integration with the templater plugin, this also needs templater to be installed. Warning: Templater allows you to execute arbitrary JavaScript code and system commands.").addToggle(t=>{t.setValue(this.plugin.settings.enableTemplaterIntegration).onChange(i=>{this.plugin.settings.enableTemplaterIntegration=i,this.plugin.saveSettings()})}),e.createEl("h3",{text:"New File Location"}),new C.Setting(e).setName("Movie Folder").setDesc("Where newly imported movies should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.movieFolder).setValue(this.plugin.settings.movieFolder).onChange(i=>{this.plugin.settings.movieFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Series Folder").setDesc("Where newly imported series should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.seriesFolder).setValue(this.plugin.settings.seriesFolder).onChange(i=>{this.plugin.settings.seriesFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Manga Folder").setDesc("Where newly imported manga should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.mangaFolder).setValue(this.plugin.settings.mangaFolder).onChange(i=>{this.plugin.settings.mangaFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Game Folder").setDesc("Where newly imported games should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.gameFolder).setValue(this.plugin.settings.gameFolder).onChange(i=>{this.plugin.settings.gameFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Wiki Folder").setDesc("Where newly imported wiki articles should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.wikiFolder).setValue(this.plugin.settings.wikiFolder).onChange(i=>{this.plugin.settings.wikiFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Music Folder").setDesc("Where newly imported music should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.musicReleaseFolder).setValue(this.plugin.settings.musicReleaseFolder).onChange(i=>{this.plugin.settings.musicReleaseFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Board Game Folder").setDesc("Where newly imported board games should be places.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.boardgameFolder).setValue(this.plugin.settings.boardgameFolder).onChange(i=>{this.plugin.settings.boardgameFolder=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Book Folder").setDesc("Where newly imported books should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.bookFolder).setValue(this.plugin.settings.bookFolder).onChange(i=>{this.plugin.settings.bookFolder=i,this.plugin.saveSettings()})}),e.createEl("h3",{text:"Template Settings"}),new C.Setting(e).setName("Movie template").setDesc("Template file to be used when creating a new note for a movie.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: movieTemplate.md").setValue(this.plugin.settings.movieTemplate).onChange(i=>{this.plugin.settings.movieTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Series template").setDesc("Template file to be used when creating a new note for a series.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: seriesTemplate.md").setValue(this.plugin.settings.seriesTemplate).onChange(i=>{this.plugin.settings.seriesTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Manga template").setDesc("Template file to be used when creating a new note for a manga.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: mangaTemplate.md").setValue(this.plugin.settings.mangaTemplate).onChange(i=>{this.plugin.settings.mangaTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Game template").setDesc("Template file to be used when creating a new note for a game.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: gameTemplate.md").setValue(this.plugin.settings.gameTemplate).onChange(i=>{this.plugin.settings.gameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Wiki template").setDesc("Template file to be used when creating a new note for a wiki entry.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: wikiTemplate.md").setValue(this.plugin.settings.wikiTemplate).onChange(i=>{this.plugin.settings.wikiTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Music Release template").setDesc("Template file to be used when creating a new note for a music release.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: musicReleaseTemplate.md").setValue(this.plugin.settings.musicReleaseTemplate).onChange(i=>{this.plugin.settings.musicReleaseTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Board Game template").setDesc("Template file to be used when creating a new note for a boardgame.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: boardgameTemplate.md").setValue(this.plugin.settings.boardgameTemplate).onChange(i=>{this.plugin.settings.boardgameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Book template").setDesc("Template file to be used when creating a new note for a book.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: bookTemplate.md").setValue(this.plugin.settings.bookTemplate).onChange(i=>{this.plugin.settings.bookTemplate=i,this.plugin.saveSettings()})}),e.createEl("h3",{text:"File Name Settings"}),new C.Setting(e).setName("Movie file name template").setDesc("Template for the file name used when creating a new note for a movie.").addText(t=>{t.setPlaceholder(`Example: ${j.movieFileNameTemplate}`).setValue(this.plugin.settings.movieFileNameTemplate).onChange(i=>{this.plugin.settings.movieFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Series file name template").setDesc("Template for the file name used when creating a new note for a series.").addText(t=>{t.setPlaceholder(`Example: ${j.seriesFileNameTemplate}`).setValue(this.plugin.settings.seriesFileNameTemplate).onChange(i=>{this.plugin.settings.seriesFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Manga file name template").setDesc("Template for the file name used when creating a new note for a manga.").addText(t=>{t.setPlaceholder(`Example: ${j.mangaFileNameTemplate}`).setValue(this.plugin.settings.mangaFileNameTemplate).onChange(i=>{this.plugin.settings.mangaFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Game file name template").setDesc("Template for the file name used when creating a new note for a game.").addText(t=>{t.setPlaceholder(`Example: ${j.gameFileNameTemplate}`).setValue(this.plugin.settings.gameFileNameTemplate).onChange(i=>{this.plugin.settings.gameFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Wiki file name template").setDesc("Template for the file name used when creating a new note for a wiki entry.").addText(t=>{t.setPlaceholder(`Example: ${j.wikiFileNameTemplate}`).setValue(this.plugin.settings.wikiFileNameTemplate).onChange(i=>{this.plugin.settings.wikiFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Music Release file name template").setDesc("Template for the file name used when creating a new note for a music release.").addText(t=>{t.setPlaceholder(`Example: ${j.musicReleaseFileNameTemplate}`).setValue(this.plugin.settings.musicReleaseFileNameTemplate).onChange(i=>{this.plugin.settings.musicReleaseFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Board Game file name template").setDesc("Template for the file name used when creating a new note for a boardgame.").addText(t=>{t.setPlaceholder(`Example: ${j.boardgameFileNameTemplate}`).setValue(this.plugin.settings.boardgameFileNameTemplate).onChange(i=>{this.plugin.settings.boardgameFileNameTemplate=i,this.plugin.saveSettings()})}),new C.Setting(e).setName("Book file name template").setDesc("Template for the file name used when creating a new note for a book.").addText(t=>{t.setPlaceholder(`Example: ${j.bookFileNameTemplate}`).setValue(this.plugin.settings.bookFileNameTemplate).onChange(i=>{this.plugin.settings.bookFileNameTemplate=i,this.plugin.saveSettings()})}),this.plugin.settings.useDefaultFrontMatter){e.createEl("h3",{text:"Property Mappings"});let t=e.createEl("div");t.innerHTML=`
-
For more syntax, refer to format reference.
Your current syntax looks like this: "+this.plugin.dateFormatter.getPreview()+"")).addText(t=>{t.setPlaceholder(j.customDateFormat).setValue(this.plugin.settings.customDateFormat===j.customDateFormat?"":this.plugin.settings.customDateFormat).onChange(i=>{let n=i||j.customDateFormat;this.plugin.settings.customDateFormat=n,document.getElementById("media-db-dateformat-preview").textContent=this.plugin.dateFormatter.getPreview(n),this.plugin.saveSettings()})}),new E.Setting(e).setName("Open note in new tab").setDesc("Open the newly created note in a new tab.").addToggle(t=>{t.setValue(this.plugin.settings.openNoteInNewTab).onChange(i=>{this.plugin.settings.openNoteInNewTab=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Use default front matter").setDesc("Whether to use the default front matter. If disabled, the front matter from the template will be used. Same as mapping everything to remove.").addToggle(t=>{t.setValue(this.plugin.settings.useDefaultFrontMatter).onChange(i=>{this.plugin.settings.useDefaultFrontMatter=i,this.plugin.saveSettings(),this.display()})}),new E.Setting(e).setName("Enable Templater integration").setDesc("Enable integration with the templater plugin, this also needs templater to be installed. Warning: Templater allows you to execute arbitrary JavaScript code and system commands.").addToggle(t=>{t.setValue(this.plugin.settings.enableTemplaterIntegration).onChange(i=>{this.plugin.settings.enableTemplaterIntegration=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("New file location").setHeading(),new E.Setting(e).setName("Movie folder").setDesc("Where newly imported movies should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.movieFolder).setValue(this.plugin.settings.movieFolder).onChange(i=>{this.plugin.settings.movieFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Series folder").setDesc("Where newly imported series should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.seriesFolder).setValue(this.plugin.settings.seriesFolder).onChange(i=>{this.plugin.settings.seriesFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Manga folder").setDesc("Where newly imported manga should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.mangaFolder).setValue(this.plugin.settings.mangaFolder).onChange(i=>{this.plugin.settings.mangaFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Game folder").setDesc("Where newly imported games should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.gameFolder).setValue(this.plugin.settings.gameFolder).onChange(i=>{this.plugin.settings.gameFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Wiki folder").setDesc("Where newly imported wiki articles should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.wikiFolder).setValue(this.plugin.settings.wikiFolder).onChange(i=>{this.plugin.settings.wikiFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Music folder").setDesc("Where newly imported music should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.musicReleaseFolder).setValue(this.plugin.settings.musicReleaseFolder).onChange(i=>{this.plugin.settings.musicReleaseFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Board game folder").setDesc("Where newly imported board games should be places.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.boardgameFolder).setValue(this.plugin.settings.boardgameFolder).onChange(i=>{this.plugin.settings.boardgameFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Book folder").setDesc("Where newly imported books should be placed.").addSearch(t=>{new Me(this.app,t.inputEl),t.setPlaceholder(j.bookFolder).setValue(this.plugin.settings.bookFolder).onChange(i=>{this.plugin.settings.bookFolder=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Template settings").setHeading(),new E.Setting(e).setName("Movie template").setDesc("Template file to be used when creating a new note for a movie.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: movieTemplate.md").setValue(this.plugin.settings.movieTemplate).onChange(i=>{this.plugin.settings.movieTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Series template").setDesc("Template file to be used when creating a new note for a series.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: seriesTemplate.md").setValue(this.plugin.settings.seriesTemplate).onChange(i=>{this.plugin.settings.seriesTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Manga template").setDesc("Template file to be used when creating a new note for a manga.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: mangaTemplate.md").setValue(this.plugin.settings.mangaTemplate).onChange(i=>{this.plugin.settings.mangaTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Game template").setDesc("Template file to be used when creating a new note for a game.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: gameTemplate.md").setValue(this.plugin.settings.gameTemplate).onChange(i=>{this.plugin.settings.gameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Wiki template").setDesc("Template file to be used when creating a new note for a wiki entry.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: wikiTemplate.md").setValue(this.plugin.settings.wikiTemplate).onChange(i=>{this.plugin.settings.wikiTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Music release template").setDesc("Template file to be used when creating a new note for a music release.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: musicReleaseTemplate.md").setValue(this.plugin.settings.musicReleaseTemplate).onChange(i=>{this.plugin.settings.musicReleaseTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Board game template").setDesc("Template file to be used when creating a new note for a boardgame.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: boardgameTemplate.md").setValue(this.plugin.settings.boardgameTemplate).onChange(i=>{this.plugin.settings.boardgameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Book template").setDesc("Template file to be used when creating a new note for a book.").addSearch(t=>{new ve(this.app,t.inputEl),t.setPlaceholder("Example: bookTemplate.md").setValue(this.plugin.settings.bookTemplate).onChange(i=>{this.plugin.settings.bookTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("File name settings").setHeading(),new E.Setting(e).setName("Movie file name template").setDesc("Template for the file name used when creating a new note for a movie.").addText(t=>{t.setPlaceholder(`Example: ${j.movieFileNameTemplate}`).setValue(this.plugin.settings.movieFileNameTemplate).onChange(i=>{this.plugin.settings.movieFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Series file name template").setDesc("Template for the file name used when creating a new note for a series.").addText(t=>{t.setPlaceholder(`Example: ${j.seriesFileNameTemplate}`).setValue(this.plugin.settings.seriesFileNameTemplate).onChange(i=>{this.plugin.settings.seriesFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Manga file name template").setDesc("Template for the file name used when creating a new note for a manga.").addText(t=>{t.setPlaceholder(`Example: ${j.mangaFileNameTemplate}`).setValue(this.plugin.settings.mangaFileNameTemplate).onChange(i=>{this.plugin.settings.mangaFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Game file name template").setDesc("Template for the file name used when creating a new note for a game.").addText(t=>{t.setPlaceholder(`Example: ${j.gameFileNameTemplate}`).setValue(this.plugin.settings.gameFileNameTemplate).onChange(i=>{this.plugin.settings.gameFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Wiki file name template").setDesc("Template for the file name used when creating a new note for a wiki entry.").addText(t=>{t.setPlaceholder(`Example: ${j.wikiFileNameTemplate}`).setValue(this.plugin.settings.wikiFileNameTemplate).onChange(i=>{this.plugin.settings.wikiFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Music release file name template").setDesc("Template for the file name used when creating a new note for a music release.").addText(t=>{t.setPlaceholder(`Example: ${j.musicReleaseFileNameTemplate}`).setValue(this.plugin.settings.musicReleaseFileNameTemplate).onChange(i=>{this.plugin.settings.musicReleaseFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Board game file name template").setDesc("Template for the file name used when creating a new note for a boardgame.").addText(t=>{t.setPlaceholder(`Example: ${j.boardgameFileNameTemplate}`).setValue(this.plugin.settings.boardgameFileNameTemplate).onChange(i=>{this.plugin.settings.boardgameFileNameTemplate=i,this.plugin.saveSettings()})}),new E.Setting(e).setName("Book file name template").setDesc("Template for the file name used when creating a new note for a book.").addText(t=>{t.setPlaceholder(`Example: ${j.bookFileNameTemplate}`).setValue(this.plugin.settings.bookFileNameTemplate).onChange(i=>{this.plugin.settings.bookFileNameTemplate=i,this.plugin.saveSettings()})}),this.plugin.settings.useDefaultFrontMatter){new E.Setting(e).setName("Property mappings").setHeading();let t=e.createEl("div");t.innerHTML=`
+
+