charliecm / obsidian-upcoming

Show upcoming daily notes in their own panes.
MIT License
15 stars 0 forks source link

Apply Template to newly-created notes #1

Closed brimwats closed 2 years ago

brimwats commented 2 years ago

id like to use upcoming to open a weeks worth of daily notes & apply the daily note template to them, iterating by a day, but currently it just seems to create blank files

charliecm commented 2 years ago

Are you using the Daily Notes plugin with the “Template file location” set to a template file? This plugin uses that setting when creating new daily notes.

brimwats commented 2 years ago

ah, no I had to turn that off because it interferes with the new periodic note settings! Could you draw from the periodic note settings area? It's more or less exacltly the same, and I know other plugins do so!

charliecm commented 2 years ago

I've just tested it with the Periodic Notes plugin and it's working with the template setting (I'm using the obsidian-daily-notes-interface). Can you let me know what settings you're using for Periodic Notes, and what version of Obsidian you're using?

brimwats commented 2 years ago

Yes!

Format: /YYYY/MM[.] MMMM YYYY/YYYY-MM-DD

Template: 000 - Landing Page. Inbox. KO. Meta/_Templates/Basic Templates/Daily Note Template.md

Folder 000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily.

Here's my debug info:

SYSTEM INFO:
    Obsidian version: v0.15.2
    Installer version: v0.14.2
    Operating system: Windows 10 Education 10.0.22000
    Login status: logged in
    Catalyst license: insider
    Insider build toggle: on
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: Minimal
    Snippets enabled: 19
    Safe mode: off
    Plugins installed: 96
    Plugins enabled: 79
        1: Style Settings
        2: Folder Note Core
        3: Templater
        4: Collapse All
        5: Customizable Page Header and Title Bar
        6: Reset Font Size
        7: Advanced URI
        8: Bartender
        9: Better Command Palette
        10: Breadcrumbs
        11: Code Editor Shortcuts
        12: Contextual Typography
        13: Core Search Assistant
        14: Customizable Sidebar
        15: Dataview
        16: Hider
        17: Grandfather
        18: Format Hotkeys
        19: Homepage
        20: Hotkey Helper
        21: Zoom
        22: Word Sprint
        23: Webhook Plugin
        24: Recent Files
        25: QuickAdd
        26: Quick Explorer
        27: Plugin Changelogs
        28: Pane Relief
        29: Outliner
        30: Obsidian Tabs
        31: Sentence Navigator
        32: File Info Panel
        33: Smarter Markdown Hotkeys
        34: Cycle through Panes
        35: Toggle Readable Line Length
        36: File Explorer Note Count
        37: Key Promoter
        38: MySnippets
        39: MetaEdit
        40: Local images
        41: Natural Language Dates
        42: Tag Wrangler
        43: File path to URI
        44: Link Archive
        45: Tweet to Markdown
        46: Settings Search
        47: Footnote Shortcut
        48: Obsidian Charts
        49: Dynamic Table of Contents
        50: Hover Editor
        51: AidenLx's Folder Note
        52: Zotero Integration
        53: Waypoint
        54: Banners
        55: Custom Frames
        56: AidenLx's Folder Note - folderv component
        57: Open with
        58: Obsidian42 - BRAT
        59: List Modified
        60: Paste image rename
        61: Snippet Downloader
        62: Longform
        63: Minimal Theme Settings
        64: Omnisearch
        65: Text Generator
        66: Limelight
        67: Obsidian Enhancing Export
        68: Map View
        69: Supercharged Links
        70: Note Auto Creator
        71: Various Complements
        72: DB Folder
        73: Advanced Tables
        74: Periodic Notes
        75: File Explorer Keyboard Navigation
        76: Notion-Like Tables
        77: Dynamic Highlights
        78: Excalidraw
        79: Another Quick Switcher

RECOMMENDATIONS:
    Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
    Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
charliecm commented 2 years ago

Thanks for the log. I've replicated your settings, but still can't reproduce the issue. Can you open the Developer Console (Cmd + Alt + I), run the plugin, and let me know if you see anything there? That'd help me narrow down any potential error reported directly from the plugin.

brimwats commented 2 years ago

I do! I didn't see it before: image

t {deleted: false, vault: t, path: '000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily/2022/06. June 2022/2022-06-18.md', name: '2022-06-18.md', basename: '2022-06-18', …}
basename: "2022-06-18"
deleted: false
extension: "md"
name: "2022-06-18.md"
parent: t {deleted: false, vault: t, path: '000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily/2022/06. June 2022', name: '06. June 2022', children: Array(20), …}
path: "000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily/2022/06. June 2022/2022-06-18.md"
saving: false
stat: {ctime: 1655578302354, mtime: 1655594080972, size: 5433}
vault: t {_: {…}, fileMap: {…}, config: {…}, configTs: 1655594048335, configDir: '.obsidian', …}
[[Prototype]]: e
plugin:obsidian-list-modfied:745 
t {deleted: false, vault: t, path: '000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily/2022/06. June 2022/2022-06-18.md', name: '2022-06-18.md', basename: '2022-06-18', …}
basename: "2022-06-18"
deleted: false
extension: "md"
name: "2022-06-18.md"
parent: t {deleted: false, vault: t, path: '000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily/2022/06. June 2022', name: '06. June 2022', children: Array(20), …}
path: "000 - Landing Page. Inbox. KO. Meta/Storage/Periodic Notes/Daily/2022/06. June 2022/2022-06-18.md"
saving: false
stat: {ctime: 1655578302354, mtime: 1655594080972, size: 5433}
vault: t {_: {…}, fileMap: {…}, config: {…}, configTs: 1655594048335, configDir: '.obsidian', …}
[[Prototype]]: e
brimwats commented 2 years ago

Ah wait no, that's from List Modified hmm

brimwats commented 2 years ago

This error also pops up near when I run Upcoming too:

plugin:omnisearch:6 MiniSearch: document with ID 2022-06-19.md has changed before removal: term "md" was not present in field "basename". Removing a document after it has changed can corrupt the index!
charliecm commented 2 years ago

It could be another plugin interfering. Can you try only enabling Periodic Notes and Upcoming and see if that works?

I see you have a lot of plugins enabled. You can go to your .obsidian folder and make a backup of community-plugins.json before editing it to include only those two plugins:

[
  "obsidian-upcoming",
  "periodic-notes"
]
brimwats commented 2 years ago

I just made a new vault. Templater and BRAT (for periodic notes beta) are also required.

Upcoming notes are still blank. Here is the vault:

Obsidian Sandbox.zip

charliecm commented 2 years ago

Thanks for sharing the sandbox. I believe there is incompatibility with Periodic Notes v1, which is currently in beta. As this plugin is using an API provided by the same creator, I'll need to see if they're planning to fix the issue on their end.

brimwats commented 2 years ago

I think this can be closed? or perhaps delete the one I just made if related!