Skip to content

Support for adding user defined plugins repo#231

Merged
rking32 merged 5 commits into
UsergeTeam:alphafrom
naveennamani:alpha
Feb 14, 2021
Merged

Support for adding user defined plugins repo#231
rking32 merged 5 commits into
UsergeTeam:alphafrom
naveennamani:alpha

Conversation

@naveennamani
Copy link
Copy Markdown
Contributor

Any user can now add his/her own plugins repository using USER_PLUGINS_REPO env variable.
Use the USER_PLUGINS_REPO structure similar to the userge/userge-plugins repo.

The loaded plugins will be available in userge/plugins/user folder and available as "user" category in the help.

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder
Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO
@rking32
Copy link
Copy Markdown
Member

rking32 commented Jan 8, 2021

hi @naveennamani, you can just simply fork our plugins repo and add your extra plugins there. why we need an another repo ?

@naveennamani
Copy link
Copy Markdown
Contributor Author

naveennamani commented Jan 9, 2021

  • Quick plugin development and testing
    Users can create plugins in their own repo and test them or share them to others for testing without going through the pull requests waiting in unofficial plugins repo

  • There is no way to load temp plugins when you restart. If you use all temp plugins in one user repo, they can always be loaded

  • User customisation - I personally don't use many of the unofficial plugins and if I wanted to remove them and retain only those what I use, I cannot delete them in the unofficial repo, instead I can fork and make changes and use my own repo instead

  • User privacy: if we can implement support for cloning private git repos a user can create a private repo of plugins that only they wants to use without disturbing any other repos

@rking32
Copy link
Copy Markdown
Member

rking32 commented Jan 9, 2021

yes. but still you can edit this line. very simple. why so much hard work ?

gitClone --depth=1 https://github.com/UsergeTeam/Userge-Plugins.git

this PR would be better if we can set custom plugins repo by just adding var like your concept.

gitClone --depth=1 $CUSTOM_PLUGINS_REPO

@naveennamani
Copy link
Copy Markdown
Contributor Author

I just wanted to keep Userge, Userge-Plugins and user-plugins seperate.

If I fork and modify Userge, then I need to always look for changes to userge and update my repo as well.
The same applies for Userge-plugins also. If I want to use userge-plugins along with my own plugins, then this approach can be used.
If I want to use either Userge-plugins or only user-plugins, then we can keep a single variable for CUSTOM_PLUGINS_REPO as mentioned by you.

@Krishna-Singhal
Copy link
Copy Markdown
Collaborator

Krishna-Singhal commented Jan 9, 2021

I just wanted to keep Userge, Userge-Plugins and user-plugins seperate.

If I fork and modify Userge, then I need to always look for changes to userge and update my repo as well.
The same applies for Userge-plugins also. If I want to use userge-plugins along with my own plugins, then this approach can be used.
If I want to use either Userge-plugins or only user-plugins, then we can keep a single variable for CUSTOM_PLUGINS_REPO as mentioned by you.

You can make a telegram channel and add all of your plugins to there if you don't wanna do hard work,

Just add var PLUGINS_CHANNEL_ID and all plugins in that channel. (very simple)

load all via .loadall (too simple)

@Krishna-Singhal
Copy link
Copy Markdown
Collaborator

Krishna-Singhal commented Jan 9, 2021

  • Quick plugin development and testing
    Users can create plugins in their own repo and test them or share them to others for testing without going through the pull requests waiting in unofficial plugins repo
  • There is no way to load temp plugins when you restart. If you use all temp plugins in one user repo, they can always be loaded
  • User customisation - I personally don't use many of the unofficial plugins and if I wanted to remove them and retain only those what I use, I cannot delete them in the unofficial repo, instead I can fork and make changes and use my own repo instead
  • User privacy: if we can implement support for cloning private git repos a user can create a private repo of plugins that only they wants to use without disturbing any other repos

There is a way to load all temp plugins bruh.

@naveennamani
Copy link
Copy Markdown
Contributor Author

I just wanted to keep Userge, Userge-Plugins and user-plugins seperate.
If I fork and modify Userge, then I need to always look for changes to userge and update my repo as well.
The same applies for Userge-plugins also. If I want to use userge-plugins along with my own plugins, then this approach can be used.
If I want to use either Userge-plugins or only user-plugins, then we can keep a single variable for CUSTOM_PLUGINS_REPO as mentioned by you.

You can make a telegram channel and add all of your plugins to there if you don't wanna do hard work,

Just add var PLUGINS_CHANNEL_ID and all plugins in that channel. (very simple)

load all via .loadall (too simple)

I even tried that using PLUGINS_CHAT_ID, it is suitable to use when the plugin script is finalized, but version controlling the plugins is quite manual.
Assume you've 10 plugins and you updated 3 of them. So, you need to find, delete and upload 3 files or you delete all files from the channel and upload all new versions.
But if you've a repository and you made changes to the files there, they'll be automatically updated on restart or through a command which leads to no manual upload of plugin scripts.

@rking32
Copy link
Copy Markdown
Member

rking32 commented Jan 11, 2021

@naveennamani yes, i got your idea. its useful in some cases.

@rking32
Copy link
Copy Markdown
Member

rking32 commented Feb 14, 2021

@naveennamani thanks for your idea. i optimized some codes and gonna merge. peace :)

@rking32 rking32 merged commit 0839bd4 into UsergeTeam:alpha Feb 14, 2021
pull Bot pushed a commit to JustANothing/Userge that referenced this pull request Mar 7, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to JustANothing/Userge that referenced this pull request Mar 7, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to roshanconnor123/Userge that referenced this pull request Apr 8, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to SecretSanta007/Userge that referenced this pull request Apr 8, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to Colossalhavoc/Userge that referenced this pull request Apr 8, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to phinicdennish/Userge that referenced this pull request Apr 8, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to JustANothing/Userge that referenced this pull request Apr 8, 2021
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
pull Bot pushed a commit to rzlamrr/Userge that referenced this pull request Jun 28, 2022
* Added _checkUserPlugins method

Using USER_PLUGINS_REPO env variable one can add a plugins repository and the plugins will be loaded into plugins/user folder

* Update help.py

Added "user" category for displaying plugins loaded using USER_PLUGINS_REPO

* optimize suggestion

Co-authored-by: rking32 <sljohnwick@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants