chrisgrieser / shimmering-obsidian

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

[Bug]: Unable to append to daily note #65

Closed caalberts closed 2 years ago

caalberts commented 2 years ago

Bug Description

I tried to use od to append to daily note, but it could not append to the note. In the debug log, I see a line "You can't save the file ...".

Initially I thought it was a file permission problem for the directory, however, the oo command to append to scratchpad works fine. Since they both write to file, there should not be any issue with permissions.

Relevant Screenshot

No response

To Reproduce

No response

Debugging Log

[11:06:19.493] Shimmering Obsidian[[Arg and Vars](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.722B3955-9F7C-4F5D-B384-DD708495B4C2%3E06632743-0C08-41BC-B058-146CDF2C11F8)] Passing output '2022-03-08' to [Write Text File](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.722B3955-9F7C-4F5D-B384-DD708495B4C2%3ED28DF759-C300-4F54-A228-97AC41E07C27)
[11:06:19.494] ERROR: Shimmering Obsidian[[Write Text File](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.722B3955-9F7C-4F5D-B384-DD708495B4C2%3ED28DF759-C300-4F54-A228-97AC41E07C27)] You can’t save the file “2022-03-08.md” because the volume “Macintosh HD” is read only.

Workflow Configuration

Screenshot 2022-03-08 at 11 23 44 AM

Version & System Information

-------------------------------
Metadata JSONs: 3/3
-------------------------------
INSTALLED VERSION
macOS: 12.2
Obsidian: 0.13.30
Alfred: 4.6.3
Workflow: 2.21.7
Advanced URI Plugin: 1.20.0
Metadata Extractor: 1.0.0
-------------------------------
LATEST VERSION
Obsidian: 0.13.30
Obsidian (Insider): 0.13.30
Workflow: 2.21.7
Advanced URI Plugin: 1.20.0
Metadata Extractor: 1.0.0
-------------------------------

Make sure you have done the following

caalberts commented 2 years ago

@chrisgrieser I looked into this further and I was able to fix it by replacing the "Append to File" action in od with an external script similar to append-to-scratchpad.js.

I suspect it was broken in my setup because my Obsidian vault is located in iCloud drive, thus affecting the permission.

I can make a PR to update it, let me know how I should go about it. I have not contributed to an Alfred workflow before.

chrisgrieser commented 2 years ago

sorry for the late reply – the error occurs because you have not set a path to your daily notes folder in your workflow configuration

157160160-b295755c-dd25-4890-a689-af4632f85b50

.