Reorganised package

This commit is contained in:
Gnarwhal 2024-09-10 15:05:08 +00:00
parent 12dbe87134
commit 1ee3ea73e6
Signed by: Gnarwhal
GPG key ID: 0989A73D8C421174
16 changed files with 41 additions and 17 deletions

@ -1 +1 @@
Subproject commit 29164805fbb4670befd826e4a44892f00f84688f Subproject commit d922b30b5a736b873a2502cef752eefec2079e44

View file

@ -57,7 +57,7 @@ def main():
version=f"%(prog)s version {version}", version=f"%(prog)s version {version}",
) )
INTERNAL_PLUGIN_LOCATION = "sshare.plugins.default" INTERNAL_PLUGIN_LOCATION = "sshare.plugins"
# Load command line early and set it as the active logger # Load command line early and set it as the active logger
# so that it can be used to report errors while loading and # so that it can be used to report errors while loading and
# configuring other loggers # configuring other loggers

View file

@ -0,0 +1,15 @@
# This file is part of SSHare.
#
# SSHare is free software: you can redistribute it and/or modify it under the terms of
# the GNU General Public License as published by the Free Software Foundation,
# either version 3 of the License, or (at your option) any later version.
#
# SSHare is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# SSHare. If not, see <https://www.gnu.org/licenses/>.
from .plugin import *

View file

@ -15,8 +15,8 @@
import importlib import importlib
import importlib.util import importlib.util
from sshare.plugins.config import Flag from sshare.plugin.config import Flag
from sshare.plugins.config import NoDefault from sshare.plugin.config import NoDefault
class PluginManager: class PluginManager:
def __init__(self, types, logger, config, flags, arg_parser): def __init__(self, types, logger, config, flags, arg_parser):

View file

@ -12,8 +12,8 @@
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# SSHare. If not, see <https://www.gnu.org/licenses/>. # SSHare. If not, see <https://www.gnu.org/licenses/>.
from sshare.plugins.source import File from sshare.plugin.source import File
from sshare.plugins.source import Raw from sshare.plugin.source import Raw
plugin_type = "name" plugin_type = "name"

View file

@ -14,8 +14,8 @@
import time import time
from sshare.plugins.config import Argument from sshare.plugin.config import Argument
from sshare.plugins.source import File from sshare.plugin.source import File
plugin_type = "name" plugin_type = "name"

View file

@ -12,9 +12,9 @@
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# SSHare. If not, see <https://www.gnu.org/licenses/>. # SSHare. If not, see <https://www.gnu.org/licenses/>.
from sshare.plugins.config import Argument from sshare.plugin.config import Argument
from sshare.plugins.config import NoDefault from sshare.plugin.config import NoDefault
from sshare.plugins.source import File from sshare.plugin.source import File
plugin_type = "source" plugin_type = "source"

View file

@ -15,9 +15,9 @@
import getpass import getpass
import subprocess import subprocess
from sshare.plugins.config import NoDefault from sshare.plugin.config import NoDefault
from sshare.plugins.source import File from sshare.plugin.source import File
from sshare.plugins.source import Raw from sshare.plugin.source import Raw
plugin_type = "upload" plugin_type = "upload"

View file

@ -14,8 +14,8 @@
import sys import sys
from sshare.plugins.config import Flag from sshare.plugin.config import Flag
from sshare.plugins.source import Raw from sshare.plugin.source import Raw
plugin_type = "source" plugin_type = "source"

View file

@ -12,7 +12,7 @@
# You should have received a copy of the GNU General Public License along with # You should have received a copy of the GNU General Public License along with
# SSHare. If not, see <https://www.gnu.org/licenses/>. # SSHare. If not, see <https://www.gnu.org/licenses/>.
from sshare.plugins.config import NoDefault from sshare.plugin.config import NoDefault
plugin_type = "location" plugin_type = "location"

5
test_in.py Executable file
View file

@ -0,0 +1,5 @@
#!/usr/bin/python
import sys
print("=> " + sys.stdin.read())

4
test_out.py Executable file
View file

@ -0,0 +1,4 @@
#!/usr/bin/python
for i in range(0, 5):
print("\033[91mHello World!")