piqoni / matcha

Daily Digest Reader
MIT License
454 stars 23 forks source link

Use Platform Specific Directory Paths #5

Closed pcause closed 1 year ago

pcause commented 1 year ago

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.

piqoni commented 1 year ago

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. https://github.com/piqoni/matcha/commit/3dccb08b4ec1afe48ecd0d43a380dc124b10d796

Leaving this open so I can make it platform specific.

agnoldo commented 1 year ago

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!

piqoni commented 1 year ago

@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. 🙏

agnoldo commented 1 year ago

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

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

piqoni commented 1 year ago

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 :)

pcause commented 1 year ago

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.

as things stand today

piqoni commented 1 year ago

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.

piqoni commented 1 year ago

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

agnoldo commented 1 year ago

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!

piqoni commented 1 year ago

@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.