From f1739d900a746546752bd3f98517762d6c902e00 Mon Sep 17 00:00:00 2001 From: Hydrus Network Developer Date: Wed, 19 Oct 2016 15:02:56 -0500 Subject: [PATCH] Version 228 --- client.pyw | 13 +- db/to permanently disable wal.txt | 2 +- help/changelog.html | 15 + include/ClientCaches.py | 8 + include/ClientConstants.py | 1 + include/ClientController.py | 10 +- include/ClientDB.py | 10 +- include/ClientData.py | 38 +- include/ClientGUI.py | 36 +- include/ClientGUICanvas.py | 5 + include/ClientGUICommon.py | 64 +- include/ClientGUIManagement.py | 2 - include/ClientGUIParsing.py | 1262 ++++++++++++++++++++++++++++ include/ClientGUIScrolledPanels.py | 756 +---------------- include/ClientImporting.py | 2 +- include/ClientNetworking.py | 11 +- include/ClientRendering.py | 58 +- include/HydrusConstants.py | 16 +- include/HydrusController.py | 51 +- include/HydrusDB.py | 7 +- include/HydrusData.py | 23 + include/HydrusFileHandling.py | 3 +- include/HydrusParsing.py | 153 +++- include/HydrusPaths.py | 19 +- include/ServerController.py | 4 +- server.py | 17 +- test.py | 4 +- 27 files changed, 1710 insertions(+), 880 deletions(-) create mode 100644 include/ClientGUIParsing.py diff --git a/client.pyw b/client.pyw index 4cc0968c..83d2e624 100755 --- a/client.pyw +++ b/client.pyw @@ -29,11 +29,15 @@ try: from include import HydrusLogger import traceback + # + import argparse argparser = argparse.ArgumentParser( description = 'hydrus network client (windowed)' ) argparser.add_argument( '-d', '--db_dir', help = 'set an external db location' ) + argparser.add_argument( '--no_daemons', action='store_true', help = 'run without background daemons' ) + argparser.add_argument( '--no_wal', action='store_true', help = 'run without WAL db journalling' ) result = argparser.parse_args() @@ -46,6 +50,8 @@ try: db_dir = result.db_dir + db_dir = HydrusPaths.ConvertPortablePathToAbsPath( db_dir ) + try: HydrusPaths.MakeSureDirectoryExists( db_dir ) @@ -55,6 +61,11 @@ try: raise Exception( 'Could not ensure db path ' + db_dir + ' exists! Check the location is correct and that you have permission to write to it!' ) + no_daemons = result.no_daemons + no_wal = result.no_wal + + # + log_path = os.path.join( db_dir, 'client.log' ) with HydrusLogger.HydrusLogger( log_path ) as logger: @@ -65,7 +76,7 @@ try: threading.Thread( target = reactor.run, kwargs = { 'installSignalHandlers' : 0 } ).start() - controller = ClientController.Controller( db_dir ) + controller = ClientController.Controller( db_dir, no_daemons, no_wal ) controller.Run() diff --git a/db/to permanently disable wal.txt b/db/to permanently disable wal.txt index 7e184f18..ecbdb198 100644 --- a/db/to permanently disable wal.txt +++ b/db/to permanently disable wal.txt @@ -1,3 +1,3 @@ -If you do not want to use WAL journalling, you can either use the switch '-no-wal' on either the client or server, or you can just put a file in this directory called 'no-wal'. SQLite will try to use TRUNCATE instead. +If you do not want to use WAL journalling, you can either use the switch '--no_wal' on either the client or server, or you can just put a file in this directory called 'no-wal'. SQLite will try to use TRUNCATE instead. This can happen automatically if WAL fails on db creation. \ No newline at end of file diff --git a/help/changelog.html b/help/changelog.html index cac4a702..a1025d78 100755 --- a/help/changelog.html +++ b/help/changelog.html @@ -8,6 +8,21 @@

changelog