piqoni/matcha

Use Platform Specific Directory Paths

pcause opened this issue ยท 10 comments

for windows the way to specify a markdown path is not the thypical windows format, "c:\somedir\another" but "/c/somedir/another". Might make a note in the readme.

Thanks, nice find! Yes in GO the path package by default uses forwards separator: https://pkg.go.dev/path#pkg-overview

I'll see what I can do to use platform specific paths. For now I updated README to warn windows users.
3dccb08

Leaving this open so I can make it platform specific.

Hi @piqoni , thanks for the great work! It will pair very well with Obsidian since unfortunately RSS Reader (plugin) has not been updated lately there.

I'm also very interested in platform specific paths, since I use the same vault synced among three different devices with different Operating Systems!

@agnoldo Thank you for the nice words! I'll take a look at it throughout this week (need to revive my unused windows laptop to test the windows path)

curious, don't you need to "just" generate the MDs to one of the devices and then it would be synced throughout? So wondering how this issue is affecting you exactly, maybe to come up with a temporary workaround ๐Ÿค”

Haven't used the Obsidian RSS, but was thinking if we promote this project in that community maybe more developers will help out with issues like these. ๐Ÿ™

Hi @piqoni , thanks for the attention! Here is my idea of workflow (which I'm implementing right now):

  • I already have a Daily Note with sections for Tasks, Notes created today (automatically computed by Dataview), Random note (also through Dataview) and Short notes (similar to post-its)

  • I will create a new section called News and use Templater to import the daily file generated by Matcha

  • Since I'll run Matcha in every computer at boot, I'll always have a Today file to be imported. If my daily note was already created, Obsidian will not recreate it, so I'm good with that

Many thanks!

And one final tip: I just noticed that you released a new version (0.3.5) right now. Then I thought: is there a feed about new releases of Matcha (or any other repo) so I can be informed in my Daily Note? The answer is YES:

https://github.com/piqoni/matcha/releases.atom

Since I'll run Matcha in every computer at boot, I'll always have a Today file to be imported. If my daily note was already created, Obsidian will not recreate it, so I'm good with that

This makes sense if you turn off your computer everyday. (I dont)

Otherwise you could just put it in a cron to run it every X hours. Dont know if that fits with your flow but thats what I do, this is also to have an updated feed even in the evening :)

I can't figure out how to get the md directory to work. I use /d/foo/xx and it runs, no error and no file created. I use /foo/xx to see if it works on the c drive. nope. but after running, if i use -t i get no output because, I assume, I've run already and not updates.

  • where do you store the update time for the feeds so I can delete
  • where would the file be stored given a path of /x

as things stand today

IMO, you have the simple option to add completely new feed just to test it out, then remove it again.

If you want to fiddle with the database file it is platform specific where all applications save their data in respective OS. There the directory is called 'brew' (initial name for Matcha).
Windows would be AppData, mac would be /Library/Application Support, linux would be XDG_CONFIG_HOME.

In windows full path would probably be C:\Users<username>\AppData

Otherwise you could just put it in a cron to run it every X hours. Dont know if that fits with your flow but thats what I do, this is also to have an updated feed even in the evening :)

It definitely makes sense, @piqoni . In my macOS, I'll schedule matcha. The problem is with my Windows laptop, which is not mine (it's from my employer). It's completely locked, I can't even install tools (thanks for building matcha as standalone executable!!!). I can't schedule jobs either, so sad...

Thanks!

@pcause @agnoldo I hope (I assumed the issue, but not sure) with the new release https://github.com/piqoni/matcha/releases/tag/v0.4.1 it should work for Windows paths. I could not test on a windows machine so it would be nice if someone can confirm that windows path works as it should. Otherwise please let me know of the exact error you get.