Compare commits

...

9 Commits
0.4.4 ... 0.4.5

Author SHA1 Message Date
Mark Qvist
24d850107d Updated LXMF dependency 2024-01-17 23:15:00 +01:00
Mark Qvist
9943cad15f Updated readme 2024-01-17 23:08:52 +01:00
Mark Qvist
dcd5f7df95 Updated readme 2024-01-15 20:26:10 +01:00
Mark Qvist
d840ca32ae Resolve merge 2024-01-15 19:42:48 +01:00
markqvist
37063932bb Merge pull request #46 from penguinolog/patch-1
Allow newer versions of urwid
2024-01-15 19:40:58 +01:00
Mark Qvist
0ed4e09b82 Updated nomadnet to use Urwid 2.4.2 2024-01-15 19:40:01 +01:00
Mark Qvist
910e527cc7 Terminate log tail when view is inactive 2024-01-15 19:30:26 +01:00
Alexey Stepanov
4eef326d6b Allow newer versions of urwid
Last urwid versions are backward-compatible with 2.1.2 (but may produce "DeprecationWarning" on legacy logic)
2024-01-15 10:39:35 +01:00
Mark Qvist
691f4df098 Updated versions 2024-01-14 01:08:10 +01:00
7 changed files with 45 additions and 15 deletions

View File

@@ -22,9 +22,6 @@ If you'd rather want to use an LXMF client with a graphical user interface, you
- An easy to use and bandwidth efficient markup language for writing pages - An easy to use and bandwidth efficient markup language for writing pages
- Page caching in browser - Page caching in browser
## Current Status
The current version of the program should be considered a beta release. The program works well, but there will most probably be bugs and possibly sub-optimal performance in some scenarios. On the other hand, this is the ideal time to have an influence on the direction of the development of Nomad Network. To do so, join the discussion, report bugs and request features here on the GitHub project.
## How do I get started? ## How do I get started?
The easiest way to install Nomad Network is via pip: The easiest way to install Nomad Network is via pip:
@@ -121,6 +118,22 @@ $ docker run -d \
$ docker run -i ghcr.io/markqvist/nomadnet:master --daemon --console $ docker run -i ghcr.io/markqvist/nomadnet:master --daemon --console
``` ```
## Tools & Extensions
Nomad Network is a very flexible and extensible platform, and a variety of community-provided tools, utilities and node-side extensions exist:
- [NomadForum](https://codeberg.org/AutumnSpark1226/nomadForum) ([GitHub mirror](https://github.com/AutumnSpark1226/nomadForum))
- [NomadForecast](https://github.com/faragher/NomadForecast)
- [micron-blog](https://github.com/randogoth/micron-blog)
- [md2mu](https://github.com/randogoth/md2mu)
- [Any2MicronConverter](https://github.com/SebastianObi/Any2MicronConverter)
- [Some nomadnet page examples](https://github.com/SebastianObi/NomadNet-Pages)
- [More nomadnet page examples](https://github.com/epenguins/NomadNet_pages)
- [LXMF-Bot](https://github.com/randogoth/lxmf-bot)
- [LXMF Messageboard](https://github.com/chengtripp/lxmf_messageboard)
- [LXMEvent](https://github.com/faragher/LXMEvent)
- [LXMF Tools](https://github.com/SebastianObi/LXMF-Tools)
## Help & Discussion ## Help & Discussion
For help requests, discussion, sharing ideas or anything else related to Nomad Network, please have a look at the [Nomad Network discussions pages](https://github.com/markqvist/Reticulum/discussions/categories/nomad-network). For help requests, discussion, sharing ideas or anything else related to Nomad Network, please have a look at the [Nomad Network discussions pages](https://github.com/markqvist/Reticulum/discussions/categories/nomad-network).

View File

@@ -1 +1 @@
__version__ = "0.4.4" __version__ = "0.4.5"

View File

@@ -163,9 +163,8 @@ class GuideDisplay():
entry.display_topic(entry.display_topic, entry.topic_name) entry.display_topic(entry.display_topic, entry.topic_name)
def set_content_widgets(self, new_content): def set_content_widgets(self, new_content):
options = self.columns.options(width_type="weight", width_amount=1-GuideDisplay.list_width) options = self.columns.options(width_type="weight", width_amount=1-GuideDisplay.list_width, box_widget=True)
pile = urwid.Pile(new_content) pile = urwid.Pile(new_content)
#content = urwid.LineBox(urwid.Filler(pile, "top"))
content = urwid.LineBox(urwid.AttrMap(ScrollBar(Scrollable(pile), thumb_char="\u2503", trough_char=" "), "scrollbar")) content = urwid.LineBox(urwid.AttrMap(ScrollBar(Scrollable(pile), thumb_char="\u2503", trough_char=" "), "scrollbar"))
self.columns.contents[1] = (content, options) self.columns.contents[1] = (content, options)
@@ -398,7 +397,7 @@ You're currently located in the guide section of the program. I'm sorry I had to
To get the most out of Nomad Network, you will need a terminal that supports UTF-8 and at least 256 colors, ideally true-color. If your terminal supports true-color, you can go to the `![ Config ]`! menu item, launch the editor and change the configuration. To get the most out of Nomad Network, you will need a terminal that supports UTF-8 and at least 256 colors, ideally true-color. If your terminal supports true-color, you can go to the `![ Config ]`! menu item, launch the editor and change the configuration.
It is recommended to use a terminal size of at least 122x32. Nomad Network will work with smaller terminal sizes, but the interface might feel a bit cramped. It is recommended to use a terminal size of at least 135x32. Nomad Network will work with smaller terminal sizes, but the interface might feel a bit cramped.
If you don't already have a Nerd Font installed (see https://www.nerdfonts.com/), I also highly recommend to do so, since it will greatly expand the amount of glyphs, icons and graphics that Nomad Network can use. Once you have your terminal set up with a Nerd Font, go to the `![ Config ]`! menu item and enable Nerd Fonts in the configuration instead of normal unicode glyphs. If you don't already have a Nerd Font installed (see https://www.nerdfonts.com/), I also highly recommend to do so, since it will greatly expand the amount of glyphs, icons and graphics that Nomad Network can use. Once you have your terminal set up with a Nerd Font, go to the `![ Config ]`! menu item and enable Nerd Fonts in the configuration instead of normal unicode glyphs.
@@ -1156,7 +1155,7 @@ To display literal content, for example source-code, or blocks of text that shou
`= `=
''' '''
TOPIC_MARKUP += TOPIC_MARKUP.replace("`=", "\\`=") + "[ micron source for document goes here, we don't want infinite recursion now, do we? ]\n\\`=" TOPIC_MARKUP += TOPIC_MARKUP.replace("`=", "\\`=") + "[ micron source for document goes here, we don't want infinite recursion now, do we? ]\n\\`="
TOPIC_MARKUP += "\n`=\n\n>Closing Remarks\n\nIf you made it all the way here, you should be well equipped to write documents, pages and applications using micron and Nomad Network. Thank you for staying with me.\n\n`c\U0001F332\n" TOPIC_MARKUP += "\n`=\n\n>Closing Remarks\n\nIf you made it all the way here, you should be well equipped to write documents, pages and applications using micron and Nomad Network. Thank you for staying with me.\n"
TOPICS = { TOPICS = {

View File

@@ -12,10 +12,21 @@ class LogDisplay():
def __init__(self, app): def __init__(self, app):
import urwid import urwid
self.app = app self.app = app
self.log_term = LogTerminal(self.app) self.log_term = None
self.shortcuts_display = LogDisplayShortcuts(self.app) self.shortcuts_display = LogDisplayShortcuts(self.app)
self.widget = urwid.LineBox(self.log_term) self.widget = None
def show(self):
if self.log_term == None:
self.log_term = LogTerminal(self.app)
self.widget = urwid.LineBox(self.log_term)
def kill(self):
if self.log_term != None:
self.log_term.terminate()
self.log_term = None
self.widget = None
def shortcuts(self): def shortcuts(self):
return self.shortcuts_display return self.shortcuts_display
@@ -26,10 +37,14 @@ class LogTerminal(urwid.WidgetWrap):
self.log_term = urwid.Terminal( self.log_term = urwid.Terminal(
("tail", "-fn50", self.app.logfilepath), ("tail", "-fn50", self.app.logfilepath),
encoding='utf-8', encoding='utf-8',
escape_sequence="up" escape_sequence="up",
main_loop=self.app.ui.loop,
) )
urwid.WidgetWrap.__init__(self, self.log_term) urwid.WidgetWrap.__init__(self, self.log_term)
def terminate(self):
self.log_term.terminate()
def keypress(self, size, key): def keypress(self, size, key):
if key == "up": if key == "up":

View File

@@ -116,6 +116,7 @@ class MainDisplay():
def show_log(self, user_data): def show_log(self, user_data):
self.sub_displays.active_display = self.sub_displays.log_display self.sub_displays.active_display = self.sub_displays.log_display
self.sub_displays.log_display.show()
self.update_active_sub_display() self.update_active_sub_display()
def show_guide(self, user_data): def show_guide(self, user_data):
@@ -125,6 +126,8 @@ class MainDisplay():
def update_active_sub_display(self): def update_active_sub_display(self):
self.frame.contents["body"] = (self.sub_displays.active().widget, None) self.frame.contents["body"] = (self.sub_displays.active().widget, None)
self.update_active_shortcuts() self.update_active_shortcuts()
if self.sub_displays.active_display != self.sub_displays.log_display:
self.sub_displays.log_display.kill()
def update_active_shortcuts(self): def update_active_shortcuts(self):
self.frame.contents["footer"] = (self.sub_displays.active().shortcuts().widget, None) self.frame.contents["footer"] = (self.sub_displays.active().shortcuts().widget, None)

View File

@@ -268,10 +268,10 @@ class Scrollable(urwid.WidgetDecoration):
def _get_original_widget_size(self, size): def _get_original_widget_size(self, size):
ow = self._original_widget ow = self._original_widget
sizing = ow.sizing() sizing = ow.sizing()
if FIXED in sizing: if FLOW in sizing:
return ()
elif FLOW in sizing:
return (size[0],) return (size[0],)
elif FIXED in sizing:
return ()
def get_scrollpos(self, size=None, focus=False): def get_scrollpos(self, size=None, focus=False):
"""Current scrolling position """Current scrolling position

View File

@@ -30,6 +30,6 @@ setuptools.setup(
entry_points= { entry_points= {
'console_scripts': ['nomadnet=nomadnet.nomadnet:main'] 'console_scripts': ['nomadnet=nomadnet.nomadnet:main']
}, },
install_requires=["rns>=0.6.4", "lxmf>=0.3.8", "urwid==2.1.2", "qrcode"], install_requires=["rns>=0.7.0", "lxmf>=0.3.9", "urwid>=2.4.2", "qrcode"],
python_requires=">=3.6", python_requires=">=3.6",
) )