benjypng / logseq-localassets-plugin

MIT License
33 stars 7 forks source link

Feature request: relative path #19

Open taohonker opened 11 months ago

taohonker commented 11 months ago

Good plugin!

I synced my graph using OneDrive on Mac and Win11. When I embed a file also in OneDrive but outside the assets folder, I wish this plugin to compute the relative path to view the file on both OS. Is it possible?

benjypng commented 11 months ago

Unfortunately this is not possible as a user may store the file in a completely different location in the different OSs.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Tao Honker @.> Sent: Wednesday, July 19, 2023 12:37:32 AM To: hkgnp/logseq-localassets-plugin @.> Cc: Subscribed @.***> Subject: [hkgnp/logseq-localassets-plugin] Feature request: relative path (Issue #19)

Good plugin!

I synced my graph using OneDrive on Mac and Win11. When I embed a file also in OneDrive but outside the assets folder, I wish this plugin to compute the relative path to view the file on both OS. Is it possible?

— Reply to this email directly, view it on GitHubhttps://github.com/hkgnp/logseq-localassets-plugin/issues/19, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALNXKGJAHL3T72YYGWGTOETXQ23UZANCNFSM6AAAAAA2OVERKA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

taohonker commented 11 months ago

Is it possible to use environment variables to achieve this? Can something like ![xxx.pdf](file://$OneDrive/path-to-file) point to a file in different operating systems?

benjypng commented 11 months ago

It's definitely possible, i.e. allow user to define their path to Logseq in their various OS's in the plugin settings, etc. Just requires time to code.


From: Tao Honker @.> Sent: Thursday, July 20, 2023 7:01 PM To: hkgnp/logseq-localassets-plugin @.> Cc: Benjamin Png @.>; Comment @.> Subject: Re: [hkgnp/logseq-localassets-plugin] Feature request: relative path (Issue #19)

Is it possible to use environment variables to achieve this? Can something like xxx.pdf point to a file in different operating systems?

— Reply to this email directly, view it on GitHubhttps://github.com/hkgnp/logseq-localassets-plugin/issues/19#issuecomment-1643716871, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALNXKGPYLIJYDVTEV4UOGEDXREFWZANCNFSM6AAAAAA2OVERKA. You are receiving this because you commented.Message ID: @.***>

taohonker commented 11 months ago

Good to hear it. I look forward to your code, and thanks in advance.

DanTremonti commented 3 months ago

Hi, I am storing the embed file relative to the logseq folder in the same location across various machines. It would really help if relative path usage is supported, as this would allow me to embed the files in all of the machines with different OSs.