mirror of
https://github.com/onionshare/onionshare.git
synced 2025-06-01 12:44:21 -04:00
Make it possible to supply a custom json settings file from somewhere else
This commit is contained in:
parent
c7a800a79f
commit
e8304b861f
8 changed files with 39 additions and 20 deletions
|
@ -66,6 +66,7 @@ def main():
|
|||
parser.add_argument('--stay-open', action='store_true', dest='stay_open', help=strings._("help_stay_open"))
|
||||
parser.add_argument('--debug', action='store_true', dest='debug', help=strings._("help_debug"))
|
||||
parser.add_argument('--filenames', metavar='filenames', nargs='+', help=strings._('help_filename'))
|
||||
parser.add_argument('--config', metavar='config', default=False, help=strings._('help_config'))
|
||||
args = parser.parse_args()
|
||||
|
||||
filenames = args.filenames
|
||||
|
@ -73,6 +74,8 @@ def main():
|
|||
for i in range(len(filenames)):
|
||||
filenames[i] = os.path.abspath(filenames[i])
|
||||
|
||||
config = args.config
|
||||
|
||||
local_only = bool(args.local_only)
|
||||
stay_open = bool(args.stay_open)
|
||||
debug = bool(args.debug)
|
||||
|
@ -103,7 +106,7 @@ def main():
|
|||
app = OnionShare(onion, local_only, stay_open)
|
||||
|
||||
# Launch the gui
|
||||
gui = OnionShareGui(onion, qtapp, app, filenames)
|
||||
gui = OnionShareGui(onion, qtapp, app, filenames, config)
|
||||
|
||||
# Clean up when app quits
|
||||
def shutdown():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue