mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-12-24 18:24:22 +01:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9ca0a2fd1 | ||
|
|
cb87148ec3 | ||
|
|
9596361a6b | ||
|
|
d4a3a91e04 | ||
|
|
dbd1d87adb | ||
|
|
db3642ee05 | ||
|
|
6b74e49b0f | ||
|
|
5253cccfa7 | ||
|
|
a2e6a06a35 | ||
|
|
9c79496504 | ||
|
|
eafe77718f | ||
|
|
6d2bf21f0d | ||
|
|
eac9021c75 | ||
|
|
e6688b157e | ||
|
|
ad2cefa329 | ||
|
|
373315423e | ||
|
|
025cae6ebf | ||
|
|
0baebe5a3c | ||
|
|
3fedd0af30 |
@@ -6,6 +6,8 @@ import nomadnet
|
||||
import threading
|
||||
import RNS.vendor.umsgpack as msgpack
|
||||
|
||||
from LXMF import pn_announce_data_is_valid
|
||||
|
||||
class PNAnnounceHandler:
|
||||
def __init__(self, owner):
|
||||
self.aspect_filter = "lxmf.propagation"
|
||||
@@ -13,10 +15,10 @@ class PNAnnounceHandler:
|
||||
|
||||
def received_announce(self, destination_hash, announced_identity, app_data):
|
||||
try:
|
||||
if type(app_data) == bytes:
|
||||
if pn_announce_data_is_valid(app_data):
|
||||
data = msgpack.unpackb(app_data)
|
||||
|
||||
if data[0] == True:
|
||||
if data[2] == True:
|
||||
RNS.log("Received active propagation node announce from "+RNS.prettyhexrep(destination_hash))
|
||||
|
||||
associated_peer = RNS.Destination.hash_from_name_and_identity("lxmf.delivery", announced_identity)
|
||||
@@ -193,7 +195,8 @@ class Directory:
|
||||
found_node = True
|
||||
break
|
||||
|
||||
if not found_node:
|
||||
# TODO: Remove debug and rethink this (needs way to set PN when node is saved)
|
||||
if True or not found_node:
|
||||
if self.app.compact_stream:
|
||||
try:
|
||||
remove_announces = []
|
||||
|
||||
@@ -122,13 +122,16 @@ class NomadNetworkApp:
|
||||
self.page_refresh_interval = 0
|
||||
self.file_refresh_interval = 0
|
||||
|
||||
self.static_peers = []
|
||||
self.peer_announce_at_start = True
|
||||
self.try_propagation_on_fail = True
|
||||
self.disable_propagation = False
|
||||
self.disable_propagation = True
|
||||
self.notify_on_new_message = True
|
||||
|
||||
self.lxmf_max_propagation_size = None
|
||||
self.lxmf_max_sync_size = None
|
||||
self.lxmf_max_incoming_size = None
|
||||
self.node_propagation_cost = LXMF.LXMRouter.PROPAGATION_COST
|
||||
|
||||
self.periodic_lxmf_sync = True
|
||||
self.lxmf_sync_interval = 360*60
|
||||
@@ -242,8 +245,11 @@ class NomadNetworkApp:
|
||||
self.peer_settings["served_file_requests"] = 0
|
||||
|
||||
except Exception as e:
|
||||
RNS.log("Could not load local peer settings from "+self.peersettingspath, RNS.LOG_ERROR)
|
||||
RNS.log("The contained exception was: %s" % (str(e)), RNS.LOG_ERROR)
|
||||
RNS.logdest = RNS.LOG_STDOUT
|
||||
RNS.log(f"Could not load local peer settings from {self.peersettingspath}", RNS.LOG_ERROR)
|
||||
RNS.log(f"The contained exception was: {e}", RNS.LOG_ERROR)
|
||||
RNS.log(f"This likely means that the peer settings file has become corrupt.", RNS.LOG_ERROR)
|
||||
RNS.log(f"You can try deleting the file at {self.peersettingspath} and restarting nomadnet.", RNS.LOG_ERROR)
|
||||
nomadnet.panic()
|
||||
else:
|
||||
try:
|
||||
@@ -302,8 +308,8 @@ class NomadNetworkApp:
|
||||
|
||||
self.message_router = LXMF.LXMRouter(
|
||||
identity = self.identity, storagepath = self.storagepath, autopeer = True,
|
||||
propagation_limit = self.lxmf_max_propagation_size, delivery_limit = self.lxmf_max_incoming_size,
|
||||
max_peers = self.max_peers, static_peers = static_peers,
|
||||
propagation_limit = self.lxmf_max_propagation_size, sync_limit = self.lxmf_max_sync_size, delivery_limit = self.lxmf_max_incoming_size,
|
||||
max_peers = self.max_peers, static_peers = static_peers, propagation_cost=self.node_propagation_cost
|
||||
)
|
||||
|
||||
self.message_router.register_delivery_callback(self.lxmf_delivery)
|
||||
@@ -555,9 +561,9 @@ class NomadNetworkApp:
|
||||
return self.message_router.get_outbound_propagation_node()
|
||||
|
||||
def save_peer_settings(self):
|
||||
file = open(self.peersettingspath, "wb")
|
||||
file.write(msgpack.packb(self.peer_settings))
|
||||
file.close()
|
||||
tmp_path = f"{self.peersettingspath}.tmp"
|
||||
with open(tmp_path, "wb") as file: file.write(msgpack.packb(self.peer_settings))
|
||||
os.replace(tmp_path, self.peersettingspath)
|
||||
|
||||
def lxmf_delivery(self, message):
|
||||
time_string = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(message.timestamp))
|
||||
@@ -802,7 +808,7 @@ class NomadNetworkApp:
|
||||
if not "intro_time" in self.config["textui"]:
|
||||
self.config["textui"]["intro_time"] = 1
|
||||
else:
|
||||
self.config["textui"]["intro_time"] = self.config["textui"].as_int("intro_time")
|
||||
self.config["textui"]["intro_time"] = self.config["textui"].as_float("intro_time")
|
||||
|
||||
if not "intro_text" in self.config["textui"]:
|
||||
self.config["textui"]["intro_text"] = "Nomad Network"
|
||||
@@ -876,7 +882,7 @@ class NomadNetworkApp:
|
||||
self.node_name = self.config["node"]["node_name"]
|
||||
|
||||
if not "disable_propagation" in self.config["node"]:
|
||||
self.disable_propagation = False
|
||||
self.disable_propagation = True
|
||||
else:
|
||||
self.disable_propagation = self.config["node"].as_bool("disable_propagation")
|
||||
|
||||
@@ -888,6 +894,14 @@ class NomadNetworkApp:
|
||||
value = 1
|
||||
self.lxmf_max_propagation_size = value
|
||||
|
||||
if not "max_sync_size" in self.config["node"]:
|
||||
self.lxmf_max_sync_size = 256*40
|
||||
else:
|
||||
value = self.config["node"].as_float("max_sync_size")
|
||||
if value < self.lxmf_max_propagation_size:
|
||||
value = self.lxmf_max_propagation_size
|
||||
self.lxmf_max_sync_size = value
|
||||
|
||||
if not "announce_at_start" in self.config["node"]:
|
||||
self.node_announce_at_start = False
|
||||
else:
|
||||
@@ -901,6 +915,13 @@ class NomadNetworkApp:
|
||||
if value < 1:
|
||||
value = 1
|
||||
self.node_announce_interval = value
|
||||
|
||||
if not "propagation_cost" in self.config["node"]:
|
||||
self.node_propagation_cost = 16
|
||||
else:
|
||||
value = self.config["node"].as_int("propagation_cost")
|
||||
if value < 13: value = 13
|
||||
self.node_propagation_cost = value
|
||||
|
||||
if "pages_path" in self.config["node"]:
|
||||
self.pagespath = self.config["node"]["pages_path"]
|
||||
@@ -1162,14 +1183,55 @@ announce_at_start = Yes
|
||||
|
||||
# When Nomad Network is hosting a page-serving
|
||||
# node, it can also act as an LXMF propagation
|
||||
# node. If there is already a large amount of
|
||||
# node. This is a convenient feature that lets
|
||||
# you easily set up and run a propagation node
|
||||
# on the network, but it is not as fully
|
||||
# featured as using the lxmd program to host a
|
||||
# propagation node. For complete control and
|
||||
# flexibility, use lxmd to run a PN. For a
|
||||
# small local system or network, the built-in
|
||||
# PN functionality will suffice for most cases.
|
||||
#
|
||||
# If there is already a large amount of
|
||||
# propagation nodes on the network, or you
|
||||
# simply want to run a pageserving-only node,
|
||||
# you can disable running a propagation node.
|
||||
# you should disable running a propagation node.
|
||||
# Due to lots of propagation nodes being
|
||||
# available, this is currently the default.
|
||||
|
||||
disable_propagation = Yes
|
||||
|
||||
# For clients and other propagation nodes
|
||||
# delivering messages via this node, you can
|
||||
# configure the minimum required propagation
|
||||
# stamp costs. All messages delivered to the
|
||||
# propagation node network must have a valid
|
||||
# propagation stamp, or they will be rejected.
|
||||
# Clients automatically detect the stamp cost
|
||||
# for the node they are delivering to, and
|
||||
# compute a corresponding stamp before trying
|
||||
# to deliver the message to the propagation
|
||||
# node.
|
||||
#
|
||||
# Propagation stamps are easier to verify in
|
||||
# large batches, and therefore also somewhat
|
||||
# easier to compute for the senders. As such,
|
||||
# a reasonable propagation stamp cost should
|
||||
# be a bit higher than the normal peer-to-peer
|
||||
# stamp costs.
|
||||
#
|
||||
# Propagation stamps does not incur any extra
|
||||
# load for propagation nodes processing them,
|
||||
# since they are only required to verify that
|
||||
# they are correct, and only the generation
|
||||
# is computationally costly. Setting a sensible
|
||||
# propagation stamp cost (and periodically
|
||||
# checking the average network consensus) helps
|
||||
# keep spam and misuse out of the propagation
|
||||
# node network.
|
||||
|
||||
propagation_cost = 16
|
||||
|
||||
# The maximum amount of storage to use for
|
||||
# the LXMF Propagation Node message store,
|
||||
# specified in megabytes. When this limit
|
||||
@@ -1179,19 +1241,26 @@ disable_propagation = Yes
|
||||
# new and small. Large and old messages will
|
||||
# be removed first. This setting is optional
|
||||
# and defaults to 2 gigabytes.
|
||||
|
||||
# message_storage_limit = 2000
|
||||
|
||||
# The maximum accepted transfer size per in-
|
||||
# coming propagation transfer, in kilobytes.
|
||||
# This also sets the upper limit for the size
|
||||
# of single messages accepted onto this node.
|
||||
# coming propagation message, in kilobytes.
|
||||
# This sets the upper limit for the size of
|
||||
# single messages accepted onto this node.
|
||||
|
||||
max_transfer_size = 256
|
||||
|
||||
# The maximum accepted transfer size per in-
|
||||
# coming propagation node sync.
|
||||
#
|
||||
# If a node wants to propagate a larger number
|
||||
# of messages to this node, than what can fit
|
||||
# within this limit, it will prioritise sending
|
||||
# the smallest, newest messages first, and try
|
||||
# the smallest messages first, and try again
|
||||
# with any remaining messages at a later point.
|
||||
max_transfer_size = 256
|
||||
|
||||
max_sync_size = 10240
|
||||
|
||||
# You can tell the LXMF message router to
|
||||
# prioritise storage for one or more
|
||||
@@ -1200,29 +1269,34 @@ max_transfer_size = 256
|
||||
# keeping messages for destinations specified
|
||||
# with this option. This setting is optional,
|
||||
# and generally you do not need to use it.
|
||||
|
||||
# prioritise_destinations = 41d20c727598a3fbbdf9106133a3a0ed, d924b81822ca24e68e2effea99bcb8cf
|
||||
|
||||
# You can configure the maximum number of other
|
||||
# propagation nodes that this node will peer
|
||||
# with automatically. The default is 50.
|
||||
# max_peers = 25
|
||||
# with automatically. The default is 20.
|
||||
|
||||
# max_peers = 20
|
||||
|
||||
# You can configure a list of static propagation
|
||||
# node peers, that this node will always be
|
||||
# peered with, by specifying a list of
|
||||
# destination hashes.
|
||||
|
||||
# static_peers = e17f833c4ddf8890dd3a79a6fea8161d, 5a2d0029b6e5ec87020abaea0d746da4
|
||||
|
||||
# You can specify the interval in minutes for
|
||||
# rescanning the hosted pages path. By default,
|
||||
# this option is disabled, and the pages path
|
||||
# will only be scanned on startup.
|
||||
|
||||
# page_refresh_interval = 0
|
||||
|
||||
# You can specify the interval in minutes for
|
||||
# rescanning the hosted files path. By default,
|
||||
# this option is disabled, and the files path
|
||||
# will only be scanned on startup.
|
||||
|
||||
# file_refresh_interval = 0
|
||||
|
||||
[printing]
|
||||
@@ -1231,6 +1305,7 @@ max_transfer_size = 256
|
||||
# various kinds of information and messages.
|
||||
|
||||
# Printing messages is disabled by default
|
||||
|
||||
print_messages = No
|
||||
|
||||
# You can configure a custom template for
|
||||
@@ -1238,24 +1313,29 @@ print_messages = No
|
||||
# option, set a path to the template and
|
||||
# restart Nomad Network, a default template
|
||||
# will be created that you can edit.
|
||||
|
||||
# message_template = ~/.nomadnetwork/print_template_msg.txt
|
||||
|
||||
# You can configure Nomad Network to only
|
||||
# print messages from trusted destinations.
|
||||
|
||||
# print_from = trusted
|
||||
|
||||
# Or specify the source LXMF addresses that
|
||||
# will automatically have messages printed
|
||||
# on arrival.
|
||||
|
||||
# print_from = 76fe5751a56067d1e84eef3e88eab85b, 0e70b5848eb57c13154154feaeeb89b7
|
||||
|
||||
# Or allow printing from anywhere, if you
|
||||
# are feeling brave and adventurous.
|
||||
|
||||
# print_from = everywhere
|
||||
|
||||
# You can configure the printing command.
|
||||
# This will use the default CUPS printer on
|
||||
# your system.
|
||||
|
||||
print_command = lp
|
||||
|
||||
# You can specify what printer to use
|
||||
|
||||
@@ -8,8 +8,10 @@ from .Node import Node
|
||||
from .ui import *
|
||||
|
||||
|
||||
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||
py_modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
pyc_modules = glob.glob(os.path.dirname(__file__)+"/*.pyc")
|
||||
modules = py_modules+pyc_modules
|
||||
__all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))]))
|
||||
|
||||
def panic():
|
||||
os._exit(255)
|
||||
@@ -1 +1 @@
|
||||
__version__ = "0.8.0"
|
||||
__version__ = "0.9.2"
|
||||
|
||||
@@ -3,8 +3,10 @@ import glob
|
||||
import RNS
|
||||
import nomadnet
|
||||
|
||||
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||
py_modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
pyc_modules = glob.glob(os.path.dirname(__file__)+"/*.pyc")
|
||||
modules = py_modules+pyc_modules
|
||||
__all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))]))
|
||||
|
||||
|
||||
UI_NONE = 0x00
|
||||
|
||||
@@ -697,7 +697,7 @@ class Browser:
|
||||
|
||||
def confirmed(sender):
|
||||
try:
|
||||
self.retrieve_url(e_url.get_edit_text())
|
||||
self.retrieve_url(e_url.get_edit_text().strip())
|
||||
except Exception as e:
|
||||
self.browser_footer = urwid.Text("Could not open link: "+str(e))
|
||||
self.frame.contents["footer"] = (self.browser_footer, self.frame.options())
|
||||
@@ -799,7 +799,7 @@ class Browser:
|
||||
|
||||
self.page_background_color = None
|
||||
bgpos = self.markup.find("#!bg=")
|
||||
if bgpos:
|
||||
if bgpos >= 0:
|
||||
endpos = self.markup.find("\n", bgpos)
|
||||
if endpos-(bgpos+5) == 3:
|
||||
bg = self.markup[bgpos+5:endpos]
|
||||
@@ -807,7 +807,7 @@ class Browser:
|
||||
|
||||
self.page_foreground_color = None
|
||||
fgpos = self.markup.find("#!fg=")
|
||||
if fgpos:
|
||||
if fgpos >= 0:
|
||||
endpos = self.markup.find("\n", fgpos)
|
||||
if endpos-(fgpos+5) == 3:
|
||||
fg = self.markup[fgpos+5:endpos]
|
||||
@@ -866,7 +866,7 @@ class Browser:
|
||||
|
||||
self.page_background_color = None
|
||||
bgpos = self.markup.find("#!bg=")
|
||||
if bgpos:
|
||||
if bgpos >= 0:
|
||||
endpos = self.markup.find("\n", bgpos)
|
||||
if endpos-(bgpos+5) == 3:
|
||||
bg = self.markup[bgpos+5:endpos]
|
||||
@@ -874,7 +874,7 @@ class Browser:
|
||||
|
||||
self.page_foreground_color = None
|
||||
fgpos = self.markup.find("#!fg=")
|
||||
if fgpos:
|
||||
if fgpos >= 0:
|
||||
endpos = self.markup.find("\n", fgpos)
|
||||
if endpos-(fgpos+5) == 3:
|
||||
fg = self.markup[fgpos+5:endpos]
|
||||
@@ -1018,7 +1018,7 @@ class Browser:
|
||||
|
||||
self.page_background_color = None
|
||||
bgpos = self.markup.find("#!bg=")
|
||||
if bgpos:
|
||||
if bgpos >= 0:
|
||||
endpos = self.markup.find("\n", bgpos)
|
||||
if endpos-(bgpos+5) == 3:
|
||||
bg = self.markup[bgpos+5:endpos]
|
||||
@@ -1026,7 +1026,7 @@ class Browser:
|
||||
|
||||
self.page_foreground_color = None
|
||||
fgpos = self.markup.find("#!fg=")
|
||||
if fgpos:
|
||||
if fgpos >= 0:
|
||||
endpos = self.markup.find("\n", fgpos)
|
||||
if endpos-(fgpos+5) == 3:
|
||||
fg = self.markup[fgpos+5:endpos]
|
||||
|
||||
@@ -331,7 +331,7 @@ class ConversationsDisplay():
|
||||
existing_conversations = nomadnet.Conversation.conversation_list(self.app)
|
||||
|
||||
display_name = e_name.get_edit_text()
|
||||
source_hash_text = e_id.get_edit_text()
|
||||
source_hash_text = e_id.get_edit_text().strip()
|
||||
source_hash = bytes.fromhex(source_hash_text)
|
||||
trust_level = DirectoryEntry.UNTRUSTED
|
||||
if r_unknown.state == True:
|
||||
@@ -412,7 +412,7 @@ class ConversationsDisplay():
|
||||
try:
|
||||
local_delivery_signal = "local_delivery_occurred"
|
||||
duplicate_signal = "duplicate_lxm"
|
||||
lxm_uri = e_uri.get_edit_text()
|
||||
lxm_uri = e_uri.get_edit_text().strip()
|
||||
|
||||
ingest_result = self.app.message_router.ingest_lxm_uri(
|
||||
lxm_uri,
|
||||
|
||||
@@ -487,20 +487,14 @@ def make_output(state, line, url_delegate, pre_escape=False):
|
||||
state["bg_color"] = state["default_bg"]
|
||||
state["align"] = state["default_align"]
|
||||
elif c == "c":
|
||||
if state["align"] != "center":
|
||||
state["align"] = "center"
|
||||
else:
|
||||
state["align"] = state["default_align"]
|
||||
if state["align"] != "center": state["align"] = "center"
|
||||
# else: state["align"] = state["default_align"]
|
||||
elif c == "l":
|
||||
if state["align"] != "left":
|
||||
state["align"] = "left"
|
||||
else:
|
||||
state["align"] = state["default_align"]
|
||||
if state["align"] != "left": state["align"] = "left"
|
||||
# else: state["align"] = state["default_align"]
|
||||
elif c == "r":
|
||||
if state["align"] != "right":
|
||||
state["align"] = "right"
|
||||
else:
|
||||
state["align"] = state["default_align"]
|
||||
if state["align"] != "right": state["align"] = "right"
|
||||
# else: state["align"] = state["default_align"]
|
||||
elif c == "a":
|
||||
state["align"] = state["default_align"]
|
||||
|
||||
@@ -649,7 +643,7 @@ def make_output(state, line, url_delegate, pre_escape=False):
|
||||
orig_spec = speclist[4]
|
||||
|
||||
if url_delegate != None:
|
||||
linkspec = LinkSpec(link_url, orig_spec)
|
||||
linkspec = LinkSpec(link_url, orig_spec, cm=cm)
|
||||
if link_fields != "":
|
||||
lf = link_fields.split("|")
|
||||
if len(lf) > 0:
|
||||
@@ -696,11 +690,11 @@ def make_output(state, line, url_delegate, pre_escape=False):
|
||||
|
||||
|
||||
class LinkSpec(urwid.AttrSpec):
|
||||
def __init__(self, link_target, orig_spec):
|
||||
def __init__(self, link_target, orig_spec, cm=256):
|
||||
self.link_target = link_target
|
||||
self.link_fields = None
|
||||
|
||||
super().__init__(orig_spec.foreground, orig_spec.background)
|
||||
super().__init__(orig_spec.foreground, orig_spec.background, colors=cm)
|
||||
|
||||
|
||||
class LinkableText(urwid.Text):
|
||||
|
||||
@@ -1843,15 +1843,24 @@ class LXMFPeerEntry(urwid.WidgetWrap):
|
||||
style = "list_unresponsive"
|
||||
focus_style = "list_focus_unresponsive"
|
||||
|
||||
if peer.propagation_transfer_limit:
|
||||
txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
|
||||
else:
|
||||
txfer_limit = "No"
|
||||
if peer.propagation_transfer_limit: txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
|
||||
else: txfer_limit = "No"
|
||||
|
||||
if peer.propagation_sync_limit: sync_limit = RNS.prettysize(peer.propagation_sync_limit*1000)
|
||||
else: sync_limit = "Unknown"
|
||||
|
||||
if peer.propagation_stamp_cost: sct = peer.propagation_stamp_cost
|
||||
else: sct = "Unknown"
|
||||
|
||||
if peer.propagation_stamp_cost_flexibility: scf = f" (flex {peer.propagation_stamp_cost_flexibility})"
|
||||
else: scf = ""
|
||||
|
||||
ar = round(peer.acceptance_rate*100, 2)
|
||||
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
|
||||
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {txfer_limit} sync limit\n"
|
||||
peer_info_str += f" {RNS.prettyspeed(peer.sync_transfer_rate)} STR, "
|
||||
peer_info_str += f"{RNS.prettyspeed(peer.link_establishment_rate)} LER, {ar}% AR\n"
|
||||
peer_info_str += f"\n {sync_limit} sync limit, {txfer_limit} msg limit"
|
||||
peer_info_str += f"\n {RNS.prettyspeed(peer.sync_transfer_rate)} STR, {RNS.prettyspeed(peer.link_establishment_rate)} LER"
|
||||
peer_info_str += f"\n Propagation cost {sct}{scf}"
|
||||
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {ar}% AR"
|
||||
widget = ListEntry(peer_info_str)
|
||||
self.display_widget = urwid.AttrMap(widget, style, focus_style)
|
||||
self.display_widget.destination_hash = destination_hash
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import os
|
||||
import glob
|
||||
|
||||
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||
py_modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
pyc_modules = glob.glob(os.path.dirname(__file__)+"/*.pyc")
|
||||
modules = py_modules+pyc_modules
|
||||
__all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))]))
|
||||
|
||||
6
nomadnet/vendor/__init__.py
vendored
6
nomadnet/vendor/__init__.py
vendored
@@ -1,5 +1,7 @@
|
||||
import os
|
||||
import glob
|
||||
|
||||
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||
py_modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||
pyc_modules = glob.glob(os.path.dirname(__file__)+"/*.pyc")
|
||||
modules = py_modules+pyc_modules
|
||||
__all__ = list(set([os.path.basename(f).replace(".pyc", "").replace(".py", "") for f in modules if not (f.endswith("__init__.py") or f.endswith("__init__.pyc"))]))
|
||||
|
||||
2
setup.py
2
setup.py
@@ -30,6 +30,6 @@ setuptools.setup(
|
||||
entry_points= {
|
||||
'console_scripts': ['nomadnet=nomadnet.nomadnet:main']
|
||||
},
|
||||
install_requires=["rns>=1.0.0", "lxmf>=0.8.0", "urwid>=2.6.16", "qrcode"],
|
||||
install_requires=["rns>=1.0.4", "lxmf>=0.9.3", "urwid>=2.6.16", "qrcode"],
|
||||
python_requires=">=3.7",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user