Merge branch 'master' of ssh://gitlab.com:/beardog/onionr
This commit is contained in:
commit
292cae9822
@ -2,7 +2,7 @@
|
||||
|
||||
The following steps work broadly speaking for Windows, Mac, and Linux.
|
||||
|
||||
1. Verify python3.6+ is installed: if its not see https://www.python.org/downloads/
|
||||
1. Verify python3.7+ is installed: if its not see https://www.python.org/downloads/
|
||||
|
||||
2. Verify Tor is installed (does not need to be running, binary can be put into system path or Onionr directory)
|
||||
|
||||
|
@ -49,7 +49,7 @@ from utils import createdirs
|
||||
createdirs.create_dirs()
|
||||
|
||||
from onionrcommands import parser
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
|
||||
setup.setup_config()
|
||||
setup.setup_default_plugins()
|
||||
|
@ -20,7 +20,9 @@
|
||||
'''
|
||||
import sys, os, time
|
||||
import config, logger
|
||||
import onionrexceptions, onionrpeers, onionrevents as events, onionrplugins as plugins, onionrblockapi as block
|
||||
import onionrexceptions, onionrpeers, onionrblockapi as block
|
||||
from onionrplugins import onionrevents as events
|
||||
import onionrplugins as plugins
|
||||
from . import onlinepeers, uploadqueue
|
||||
from communicatorutils import servicecreator, onionrcommunicatortimers
|
||||
from communicatorutils import downloadblocks, lookupblocks, lookupadders
|
||||
|
@ -18,7 +18,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import logger
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
from onionrutils import localcommand
|
||||
from coredb import daemonqueue
|
||||
import filepaths
|
||||
|
@ -19,7 +19,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import sqlite3, os
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
from onionrutils import localcommand, epoch
|
||||
from .. import dbfiles
|
||||
import dbcreator
|
||||
|
@ -18,7 +18,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import sqlite3
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
from onionrutils import stringvalidators
|
||||
from . import listkeys
|
||||
from utils import gettransports
|
||||
|
@ -18,7 +18,7 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import sqlite3
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
from onionrutils import stringvalidators
|
||||
from .. import dbfiles
|
||||
def remove_address(address):
|
||||
|
@ -2,7 +2,7 @@ from typing import Union
|
||||
import json
|
||||
from onionrutils import bytesconverter, epoch
|
||||
import storagecounter, filepaths, onionrstorage
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
from etc import powchoice, onionrvalues
|
||||
import config, onionrcrypto as crypto, subprocesspow, onionrexceptions
|
||||
from onionrusers import onionrusers
|
||||
|
@ -4,6 +4,8 @@ This module contains handlers/functions for Onionr cli interface commands.
|
||||
|
||||
## Files
|
||||
|
||||
parser/: Registers and handles Onionr CLI commands
|
||||
|
||||
__init__.py: stores the command references (aside from plugins) and help info.
|
||||
|
||||
banblocks.py: command handler for manually removing blocks from one's node
|
||||
|
@ -24,7 +24,7 @@ from threading import Thread
|
||||
import toomanyobjs
|
||||
|
||||
import config, apiservers, logger, communicator
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
from netcontroller import NetController
|
||||
from onionrutils import localcommand
|
||||
import filepaths
|
||||
|
@ -21,12 +21,12 @@ import sys
|
||||
from etc import onionrvalues
|
||||
import logger, onionrexceptions
|
||||
import onionrplugins
|
||||
import onionrpluginapi
|
||||
from onionrplugins import onionrpluginapi
|
||||
from . import arguments, recommend
|
||||
|
||||
plugin_command = lambda cmd: 'on_%s_cmd' % (cmd,)
|
||||
|
||||
def register_plugin_commands(cmd):
|
||||
def register_plugin_commands(cmd)->bool:
|
||||
plugin_cmd = plugin_command(cmd)
|
||||
for pl in onionrplugins.get_enabled_plugins():
|
||||
pl = onionrplugins.get_plugin(pl)
|
||||
|
@ -29,7 +29,8 @@ from .. import softreset # command to delete onionr blocks
|
||||
from .. import restartonionr # command to restart Onionr
|
||||
import onionrexceptions
|
||||
from onionrutils import importnewblocks # func to import new blocks
|
||||
import onionrevents as events
|
||||
from onionrplugins import onionrevents as events
|
||||
|
||||
def get_arguments()->dict:
|
||||
"""This is a function because we need to be able to dynamically modify them with plugins"""
|
||||
args = {
|
||||
|
@ -23,7 +23,7 @@ import shutil
|
||||
from onionrutils import localcommand
|
||||
from coredb import dbfiles
|
||||
import filepaths
|
||||
import onionrevents
|
||||
from onionrplugins import onionrevents
|
||||
import logger
|
||||
|
||||
def _ignore_not_found_delete(path):
|
||||
|
@ -18,7 +18,9 @@
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import os, re, importlib
|
||||
import onionrevents as events, config, logger
|
||||
|
||||
from . import onionrevents as events
|
||||
import config, logger
|
||||
from utils import identifyhome
|
||||
|
||||
# set data dir
|
@ -17,10 +17,13 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
|
||||
import config, logger, onionrplugins as plugins, onionrpluginapi as pluginapi
|
||||
from threading import Thread
|
||||
|
||||
import config, logger
|
||||
import onionrplugins as plugins
|
||||
from . import onionrpluginapi as pluginapi
|
||||
|
||||
|
||||
def get_pluginapi(data):
|
||||
return pluginapi.SharedAPI(data)
|
||||
|
@ -1,5 +1,27 @@
|
||||
"""
|
||||
Onionr - Private P2P Communication
|
||||
|
||||
Installs default plugins
|
||||
"""
|
||||
"""
|
||||
This program 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.
|
||||
|
||||
This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os, shutil
|
||||
import onionrplugins as plugins, logger
|
||||
|
||||
import onionrplugins as plugins
|
||||
import logger
|
||||
|
||||
def setup_default_plugins():
|
||||
# Copy default plugins into plugins folder
|
||||
if not os.path.exists(plugins.get_plugins_folder()):
|
||||
|
@ -23,7 +23,7 @@ import onionrblockapi
|
||||
from .. import epoch, bytesconverter
|
||||
from coredb import blockmetadb
|
||||
import logger
|
||||
import onionrevents
|
||||
from onionrplugins import onionrevents
|
||||
import onionrexceptions
|
||||
from onionrusers import onionrusers
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user