putdotio / putio-sync

Command-line program to sync a folder between put.io and your computer.
https://put.io
MIT License
54 stars 9 forks source link

Feature: User configurable download location #47

Closed kamyar closed 1 year ago

kamyar commented 3 years ago

Hey, first thank you for the amazing tool. I recently bought an HDD to sync my put.io library locally for faster access/less download. I was looking into options to continuously sync them on windows and very happy to see you guys have an "official"(?) way to do it. The problem is my $HOME(C:/) is on an M.2 SSD which is not big enough. So I was looking on how I can make it use D:/putio-sync (or any other static path) instead. Noticed the executable in static/bin which I think has some kind of "Find the home dir append putio-sync, just that" kind of static logic(although could not pinpoint the exact line), was wondering if there are any plans to support this functionality or maybe you guys know of a way to fool it into using D:/ . (e.g. Changing the $HOME for the executables maybe? could not find how I can do it in windows though)

I can also lend a hand especially on the typescript side for adding this feature. :)

Again thank you for such a user-focused approach to you product, love it!

Cok tesekkurler ve iyi calismalar.

BatuAksoy commented 3 years ago

Hey @kamyar, putio-sync-desktop spawns a server on startup(https://github.com/putdotio/putio-sync) which has a configuration support. So I believe this feature should be implemented to that repository. I will transfer this issue later to that repo. The exact line you mentioned is here, possible implementation should modify this line and config reader.

Your use case sounds legit, you're more than welcome to send a pr, otherwise I'll be happy to do it. But first I wonder what @muraty thinks about it.

kamyar commented 3 years ago

Hey Batu, thanks a lot for the quick reply. I eventually got what I wanted to do by doing something similar to https://superuser.com/a/1250304/479279 .

But would be great to have this feature natively also. :) btw I tried to find the config documentation/examples for putio-sync(I noticed it opens a http server with some endpoints /trigger etc) but could not fin it, do you know where I can access something like "config file parameters and http server endpoint docs"?

I saw from history that project used to have some kind of react UI, I think it is removed some time a go, was wondering why it was removed also.(Was curious about https://github.com/putdotio/putio-sync/issues/30 also)

Thanks for moving it to a more relevant place also. My Go skills are nonexistant but I will try to give it a shot.

BatuAksoy commented 3 years ago

putio-sync is built from scratch by @cenkalti this year. So I don't know if the issue you mentioned(https://github.com/putdotio/putio-sync/issues/30) is considered because it is too old.

We thought that react UI would be overkill and contradict with the simplicity of user interaction for the rebuilt version. Also (at least until now) using Menu and Tray icon seems adequate to implement current features on client. Previous version had different features compared to current one so it would not be appropriate to use it. (If I'm not mistaken)

Endpoints for current server can be seen at here, and config at here. There is not beautiful docs yet unfortunately :( I also want to note that http server uses our public api which is documented here.

Hopefully, these are satisfactory answers to your questions. If you require any further information, I will be glad to answer.

kamyar commented 3 years ago

Thanks for the detailed answer Batu, much appreciated. :) I started hacking together something small in python also using your python module. Noticed my need in general might be too niche for putio-sync or putio-sync-desktop projects, if it gets mature enough would get in touch definitely to get some feedback from you guys if you have time. :)

Again, thanks for your time and very quick responses. Wish you an amazing new year ahead.