pluGET icon indicating copy to clipboard operation
pluGET copied to clipboard

Add support for multiple servers

Open Sowgro opened this issue 1 year ago • 2 comments

This adds support for multiple servers with a switch server command

server [servername]

As well as a new config file config.yaml, similar to what was proposed in #58

Servers:
  Srv1:
    Connection: local
    ServerRootPath: C:/Users/USER/Desktop/server
    PluginFolderPath: C:/Users/USER/Desktop/server/plugins
    SeperateDownloadPath: false
    
  Srv2:
    Connection: sftp
    ServerRootPath: /
    PluginFolderPath: /plugins
    SeperateDownloadPath: /plugins/updated

    Server: mc.example.com
    Username: joe
    Password: pass
    Port: 22

  Srv3:
    Connection: ftp
    ServerRootPath: /
    PluginFolderPath: /plugins
    SeperateDownloadPath: false

    Server: mc.example.com
    Username: joe
    Password: pass
    Port: 21

  AnotherServerName:
    Connection: local
    ServerRootPath: /srv/mc
    PluginFolderPath: /srv/mc/plugins
    SeperateDownloadPath: /srv/mc/plugins/downloaded

  # more can be added

Sowgro avatar Sep 25 '23 03:09 Sowgro

Hey @Sowgro,

thank you so much for your PR. :) This is a really good functionality and I think the config just looks so much better imho. 😃 I reviewed your PR and added comments. It is really good with just one bug with the "port" which needs to be changed and some smaller code cleanup. Thanks again for your hard work and sorry for the late response. Have a good day! 👋

Neocky avatar Feb 20 '24 16:02 Neocky

I am glad you got a chance to look at this. I will look through your comments later this week. This was the first time I ever wrote code in python, so my apologies for any weird formatting.

Sowgro avatar Feb 21 '24 17:02 Sowgro