chrisgrieser / shimmering-obsidian

Alfred Workflow with dozens of features for controlling your Obsidian vault.
https://alfred.app/workflows/chrisgrieser/shimmering-obsidian/
MIT License
830 stars 41 forks source link

[Bug]: open daily note after appending doesn't append text #79

Closed derekvan closed 2 years ago

derekvan commented 2 years ago

Bug Description

if I type "od testing the text" then CMD-Enter, in order to "Open daily note afterwards", what gets added to the daily note is:

- 09:16 2022-05-18

But if I don't do "CMD-Enter" and instead just press enter, then switch to Obsidian manually, what's added is the proper text:

- 09:16 testing the text

Relevant Screenshot

No response

To Reproduce

No response

Debugging Log

[09:17:38.558] Logging Started...
[09:17:40.254] Shimmering Obsidian[Script Filter] Queuing argument '(null)'
[09:17:43.565] Shimmering Obsidian[Keyword] Processing complete
[09:17:43.567] Shimmering Obsidian[Keyword] Passing output 'testing the text' to Arg and Vars
[09:17:43.574] Shimmering Obsidian[Arg and Vars] Processing complete
[09:17:43.591] Shimmering Obsidian[Arg and Vars] Passing output '2022-05-18' to Arg and Vars
[09:17:43.592] Shimmering Obsidian[Arg and Vars] Processing complete
[09:17:43.592] Shimmering Obsidian[Arg and Vars] Passing output '2022-05-18' to Write Text File
[09:17:43.592] Shimmering Obsidian[Write Text File] Processing complete
[09:17:43.593] Shimmering Obsidian[Write Text File] Passing output '/Users/derekvan/Library/Mobile Documents/iCloud~md~obsidian/Documents/obsidian/dated/daily/2022-05-18.md' to Conditional
[09:17:43.593] Shimmering Obsidian[Conditional] Processing complete
[09:17:43.594] Shimmering Obsidian[Conditional] Passing output '/Users/derekvan/Library/Mobile Documents/iCloud~md~obsidian/Documents/obsidian/dated/daily/2022-05-18.md' to Open URL
[09:17:43.594] Shimmering Obsidian[Open URL] Processing complete
[09:17:43.595] Shimmering Obsidian[Open URL] Passing output 'obsidian:///Users/derekvan/Library/Mobile%20Documents/iCloud~md~obsidian/Documents/obsidian/dated/daily/2022-05-18.md' to Call External Trigger
[09:17:43.596] Shimmering Obsidian[External] Processing complete
[09:17:43.597] Shimmering Obsidian[External] Passing output 'obsidian:///Users/derekvan/Library/Mobile%20Documents/iCloud~md~obsidian/Documents/obsidian/dated/daily/2022-05-18.md' to Conditional
[09:17:43.597] Shimmering Obsidian[Conditional] Processing complete
[09:17:43.598] Shimmering Obsidian[Conditional] Passing output 'obsidian:///Users/derekvan/Library/Mobile%20Documents/iCloud~md~obsidian/Documents/obsidian/dated/daily/2022-05-18.md' to Run Script

Workflow Configuration

Screen Shot 2022-05-18 at 9 19 16 AM

Version & System Information

-------------------------------
Metadata JSONs: 3/3
-------------------------------
INSTALLED VERSION
macOS: 12.3.1
Alfred: 4.6.5

Obsidian: 0.14.12
This Workflow: 2.22.7
Advanced URI Plugin: 1.21.1
Metadata Extractor: 1.0.1
-------------------------------
LATEST VERSION
Obsidian: 0.14.6 (Insider: 0.14.12)
This Workflow: 2.22.7
Advanced URI Plugin: 1.21.1
Metadata Extractor: 1.0.1
-------------------------------

Make sure you have done the following

derekvan commented 2 years ago

I figured out the fix for this error, but I don't know how to do a pull request for it on GitHub because it involves reworking the GUI elements of the workflow. Basically, the "args and vars" need to be separated as shown here. And the bottom one needs to have the "content" "{query}" variable set up.

Screen Shot 2022-06-20 at 9 11 37 AM
chrisgrieser commented 2 years ago

thanks! Sorry for the late response to this, especially since I do not use daily notes myself, I find it hard to maintain this feature. Incorporated in the latest release.

derekvan commented 2 years ago

I think the fix introduced a bug unfortunately. When I try to append something to the daily note via "od" it appends it to a note called "{yyyy-mm-dd}" (literally--it doesn't populate the variables). I rolled back to 2.42.2 and instituted my fix above.