Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for spaces on daily note filename #34

Open
carlosflorencio opened this issue Jul 15, 2021 · 1 comment
Open

Support for spaces on daily note filename #34

carlosflorencio opened this issue Jul 15, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@carlosflorencio
Copy link

Was about to open a PR but only noticed after cloning the repo that all the code is inside the bundle file. What's the best way to contibute then?

The issue I'm having is the workflow producing the wrong Obsidian URI when the Daily note file has a space on the filename.
Calling od, with the daily note format YYYY-MM-DD dddd, the space needs to be encoded in the URI as well.

The fix is simple:
image

Line 256:

p = encodeURIComponent(v) + "&file=" + date_format + ".md";
uri = "obsidian://open?vault=" + p;

to

p = encodeURIComponent(v) + "&file=" + encodeURIComponent(date_format) + ".md";
uri = "obsidian://open?vault=" + p;

Regards

@hauselin
Copy link
Owner

Thanks for catching that! Yea, it's not easy to contribute to Alfred workflows. Here's the easiest way to contribute, I think.

Edit the relevant lines of code in info.plist. I think the lines are 1093, 1103, 1428, and 1438. Then test the new workflow. First convert the new info.plist to a zip file (info.plist.zip). Then rename it to info.alfredworkflow. Double-click it and Alfred should ask whether to install the workflow. If it works, contribute and submit a PR!

Alternatively, you can modify those four lines directly in the Alfred workflow (but the line numbers will be different than in the .plist file). Then, export the workflow to Obsidan.alfredworkflow. Rename it to Obsidian.zip and unzip it and you'll get the updatedinfo.plist. I'd recommend the method above instead of this one though.

@hauselin hauselin added the bug Something isn't working label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants