diff --git a/docs/Reticulum Manual.epub b/docs/Reticulum Manual.epub index 240b252..b6e5056 100644 Binary files a/docs/Reticulum Manual.epub and b/docs/Reticulum Manual.epub differ diff --git a/docs/Reticulum Manual.pdf b/docs/Reticulum Manual.pdf index 524a37c..f890002 100644 Binary files a/docs/Reticulum Manual.pdf and b/docs/Reticulum Manual.pdf differ diff --git a/docs/manual/_static/pygments.css b/docs/manual/_static/pygments.css index 02b4b12..f71bfbf 100644 --- a/docs/manual/_static/pygments.css +++ b/docs/manual/_static/pygments.css @@ -5,83 +5,83 @@ .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } -.highlight .c { color: #8f5902; font-style: italic } /* Comment */ -.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ -.highlight .g { color: #000000 } /* Generic */ -.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ -.highlight .l { color: #000000 } /* Literal */ -.highlight .n { color: #000000 } /* Name */ -.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ -.highlight .x { color: #000000 } /* Other */ -.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ -.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ -.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #a40000 } /* Generic.Deleted */ -.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ -.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .c { color: #8F5902; font-style: italic } /* Comment */ +.highlight .err { color: #A40000; border: 1px solid #EF2929 } /* Error */ +.highlight .g { color: #000 } /* Generic */ +.highlight .k { color: #204A87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000 } /* Literal */ +.highlight .n { color: #000 } /* Name */ +.highlight .o { color: #CE5C00; font-weight: bold } /* Operator */ +.highlight .x { color: #000 } /* Other */ +.highlight .p { color: #000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8F5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8F5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8F5902; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #8F5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8F5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8F5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A40000 } /* Generic.Deleted */ +.highlight .ge { color: #000; font-style: italic } /* Generic.Emph */ +.highlight .ges { color: #000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #EF2929 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ -.highlight .gp { color: #8f5902 } /* Generic.Prompt */ -.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .go { color: #000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8F5902 } /* Generic.Prompt */ +.highlight .gs { color: #000; font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ -.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ -.highlight .ld { color: #000000 } /* Literal.Date */ -.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ -.highlight .s { color: #4e9a06 } /* Literal.String */ -.highlight .na { color: #c4a000 } /* Name.Attribute */ -.highlight .nb { color: #204a87 } /* Name.Builtin */ -.highlight .nc { color: #000000 } /* Name.Class */ -.highlight .no { color: #000000 } /* Name.Constant */ -.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #ce5c00 } /* Name.Entity */ -.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #000000 } /* Name.Function */ -.highlight .nl { color: #f57900 } /* Name.Label */ -.highlight .nn { color: #000000 } /* Name.Namespace */ -.highlight .nx { color: #000000 } /* Name.Other */ -.highlight .py { color: #000000 } /* Name.Property */ -.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #000000 } /* Name.Variable */ -.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ -.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ -.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ -.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ -.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ -.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ -.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ -.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ -.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ -.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ -.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ -.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ -.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ -.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ -.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ -.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ -.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ -.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ -.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ -.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ -.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #000000 } /* Name.Function.Magic */ -.highlight .vc { color: #000000 } /* Name.Variable.Class */ -.highlight .vg { color: #000000 } /* Name.Variable.Global */ -.highlight .vi { color: #000000 } /* Name.Variable.Instance */ -.highlight .vm { color: #000000 } /* Name.Variable.Magic */ -.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ +.highlight .gt { color: #A40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204A87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204A87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204A87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204A87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204A87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204A87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000 } /* Literal.Date */ +.highlight .m { color: #0000CF; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4E9A06 } /* Literal.String */ +.highlight .na { color: #C4A000 } /* Name.Attribute */ +.highlight .nb { color: #204A87 } /* Name.Builtin */ +.highlight .nc { color: #000 } /* Name.Class */ +.highlight .no { color: #000 } /* Name.Constant */ +.highlight .nd { color: #5C35CC; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #CE5C00 } /* Name.Entity */ +.highlight .ne { color: #C00; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000 } /* Name.Function */ +.highlight .nl { color: #F57900 } /* Name.Label */ +.highlight .nn { color: #000 } /* Name.Namespace */ +.highlight .nx { color: #000 } /* Name.Other */ +.highlight .py { color: #000 } /* Name.Property */ +.highlight .nt { color: #204A87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000 } /* Name.Variable */ +.highlight .ow { color: #204A87; font-weight: bold } /* Operator.Word */ +.highlight .pm { color: #000; font-weight: bold } /* Punctuation.Marker */ +.highlight .w { color: #F8F8F8 } /* Text.Whitespace */ +.highlight .mb { color: #0000CF; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000CF; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000CF; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000CF; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000CF; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #4E9A06 } /* Literal.String.Affix */ +.highlight .sb { color: #4E9A06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4E9A06 } /* Literal.String.Char */ +.highlight .dl { color: #4E9A06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8F5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4E9A06 } /* Literal.String.Double */ +.highlight .se { color: #4E9A06 } /* Literal.String.Escape */ +.highlight .sh { color: #4E9A06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4E9A06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4E9A06 } /* Literal.String.Other */ +.highlight .sr { color: #4E9A06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4E9A06 } /* Literal.String.Single */ +.highlight .ss { color: #4E9A06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465A4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000 } /* Name.Function.Magic */ +.highlight .vc { color: #000 } /* Name.Variable.Class */ +.highlight .vg { color: #000 } /* Name.Variable.Global */ +.highlight .vi { color: #000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000 } /* Name.Variable.Magic */ +.highlight .il { color: #0000CF; font-weight: bold } /* Literal.Number.Integer.Long */ @media not print { body[data-theme="dark"] .highlight pre { line-height: 125%; } body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } @@ -89,85 +89,85 @@ body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-col body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body[data-theme="dark"] .highlight .hll { background-color: #404040 } -body[data-theme="dark"] .highlight { background: #202020; color: #d0d0d0 } -body[data-theme="dark"] .highlight .c { color: #ababab; font-style: italic } /* Comment */ -body[data-theme="dark"] .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -body[data-theme="dark"] .highlight .esc { color: #d0d0d0 } /* Escape */ -body[data-theme="dark"] .highlight .g { color: #d0d0d0 } /* Generic */ -body[data-theme="dark"] .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ -body[data-theme="dark"] .highlight .l { color: #d0d0d0 } /* Literal */ -body[data-theme="dark"] .highlight .n { color: #d0d0d0 } /* Name */ -body[data-theme="dark"] .highlight .o { color: #d0d0d0 } /* Operator */ -body[data-theme="dark"] .highlight .x { color: #d0d0d0 } /* Other */ -body[data-theme="dark"] .highlight .p { color: #d0d0d0 } /* Punctuation */ -body[data-theme="dark"] .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ -body[data-theme="dark"] .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ -body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ -body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ -body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ -body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ -body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ -body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ -body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +body[data-theme="dark"] .highlight { background: #202020; color: #D0D0D0 } +body[data-theme="dark"] .highlight .c { color: #ABABAB; font-style: italic } /* Comment */ +body[data-theme="dark"] .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ +body[data-theme="dark"] .highlight .esc { color: #D0D0D0 } /* Escape */ +body[data-theme="dark"] .highlight .g { color: #D0D0D0 } /* Generic */ +body[data-theme="dark"] .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */ +body[data-theme="dark"] .highlight .l { color: #D0D0D0 } /* Literal */ +body[data-theme="dark"] .highlight .n { color: #D0D0D0 } /* Name */ +body[data-theme="dark"] .highlight .o { color: #D0D0D0 } /* Operator */ +body[data-theme="dark"] .highlight .x { color: #D0D0D0 } /* Other */ +body[data-theme="dark"] .highlight .p { color: #D0D0D0 } /* Punctuation */ +body[data-theme="dark"] .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */ +body[data-theme="dark"] .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */ +body[data-theme="dark"] .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */ +body[data-theme="dark"] .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */ +body[data-theme="dark"] .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */ +body[data-theme="dark"] .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +body[data-theme="dark"] .highlight .gd { color: #FF3A3A } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ +body[data-theme="dark"] .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body[data-theme="dark"] .highlight .gr { color: #FF3A3A } /* Generic.Error */ +body[data-theme="dark"] .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ -body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ -body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ -body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ -body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ -body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ -body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ -body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ -body[data-theme="dark"] .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ -body[data-theme="dark"] .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ -body[data-theme="dark"] .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ -body[data-theme="dark"] .highlight .ld { color: #d0d0d0 } /* Literal.Date */ -body[data-theme="dark"] .highlight .m { color: #51b2fd } /* Literal.Number */ -body[data-theme="dark"] .highlight .s { color: #ed9d13 } /* Literal.String */ -body[data-theme="dark"] .highlight .na { color: #bbbbbb } /* Name.Attribute */ -body[data-theme="dark"] .highlight .nb { color: #2fbccd } /* Name.Builtin */ -body[data-theme="dark"] .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ -body[data-theme="dark"] .highlight .no { color: #40ffff } /* Name.Constant */ -body[data-theme="dark"] .highlight .nd { color: #ffa500 } /* Name.Decorator */ -body[data-theme="dark"] .highlight .ni { color: #d0d0d0 } /* Name.Entity */ -body[data-theme="dark"] .highlight .ne { color: #bbbbbb } /* Name.Exception */ -body[data-theme="dark"] .highlight .nf { color: #71adff } /* Name.Function */ -body[data-theme="dark"] .highlight .nl { color: #d0d0d0 } /* Name.Label */ -body[data-theme="dark"] .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ -body[data-theme="dark"] .highlight .nx { color: #d0d0d0 } /* Name.Other */ -body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */ -body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ -body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */ -body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ -body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ -body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */ -body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ -body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ -body[data-theme="dark"] .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ -body[data-theme="dark"] .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ -body[data-theme="dark"] .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ -body[data-theme="dark"] .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ -body[data-theme="dark"] .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ -body[data-theme="dark"] .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ -body[data-theme="dark"] .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ -body[data-theme="dark"] .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ -body[data-theme="dark"] .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ -body[data-theme="dark"] .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ -body[data-theme="dark"] .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ -body[data-theme="dark"] .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ -body[data-theme="dark"] .highlight .sx { color: #ffa500 } /* Literal.String.Other */ -body[data-theme="dark"] .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ -body[data-theme="dark"] .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ -body[data-theme="dark"] .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ -body[data-theme="dark"] .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ -body[data-theme="dark"] .highlight .fm { color: #71adff } /* Name.Function.Magic */ -body[data-theme="dark"] .highlight .vc { color: #40ffff } /* Name.Variable.Class */ -body[data-theme="dark"] .highlight .vg { color: #40ffff } /* Name.Variable.Global */ -body[data-theme="dark"] .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ -body[data-theme="dark"] .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ -body[data-theme="dark"] .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ +body[data-theme="dark"] .highlight .go { color: #CCC } /* Generic.Output */ +body[data-theme="dark"] .highlight .gp { color: #AAA } /* Generic.Prompt */ +body[data-theme="dark"] .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ +body[data-theme="dark"] .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ +body[data-theme="dark"] .highlight .gt { color: #FF3A3A } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */ +body[data-theme="dark"] .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */ +body[data-theme="dark"] .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */ +body[data-theme="dark"] .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */ +body[data-theme="dark"] .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */ +body[data-theme="dark"] .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */ +body[data-theme="dark"] .highlight .ld { color: #D0D0D0 } /* Literal.Date */ +body[data-theme="dark"] .highlight .m { color: #51B2FD } /* Literal.Number */ +body[data-theme="dark"] .highlight .s { color: #ED9D13 } /* Literal.String */ +body[data-theme="dark"] .highlight .na { color: #BBB } /* Name.Attribute */ +body[data-theme="dark"] .highlight .nb { color: #2FBCCD } /* Name.Builtin */ +body[data-theme="dark"] .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */ +body[data-theme="dark"] .highlight .no { color: #40FFFF } /* Name.Constant */ +body[data-theme="dark"] .highlight .nd { color: #FFA500 } /* Name.Decorator */ +body[data-theme="dark"] .highlight .ni { color: #D0D0D0 } /* Name.Entity */ +body[data-theme="dark"] .highlight .ne { color: #BBB } /* Name.Exception */ +body[data-theme="dark"] .highlight .nf { color: #71ADFF } /* Name.Function */ +body[data-theme="dark"] .highlight .nl { color: #D0D0D0 } /* Name.Label */ +body[data-theme="dark"] .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */ +body[data-theme="dark"] .highlight .nx { color: #D0D0D0 } /* Name.Other */ +body[data-theme="dark"] .highlight .py { color: #D0D0D0 } /* Name.Property */ +body[data-theme="dark"] .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */ +body[data-theme="dark"] .highlight .nv { color: #40FFFF } /* Name.Variable */ +body[data-theme="dark"] .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */ +body[data-theme="dark"] .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */ +body[data-theme="dark"] .highlight .w { color: #666 } /* Text.Whitespace */ +body[data-theme="dark"] .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */ +body[data-theme="dark"] .highlight .mf { color: #51B2FD } /* Literal.Number.Float */ +body[data-theme="dark"] .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */ +body[data-theme="dark"] .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */ +body[data-theme="dark"] .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */ +body[data-theme="dark"] .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */ +body[data-theme="dark"] .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */ +body[data-theme="dark"] .highlight .sc { color: #ED9D13 } /* Literal.String.Char */ +body[data-theme="dark"] .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */ +body[data-theme="dark"] .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */ +body[data-theme="dark"] .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */ +body[data-theme="dark"] .highlight .se { color: #ED9D13 } /* Literal.String.Escape */ +body[data-theme="dark"] .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */ +body[data-theme="dark"] .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */ +body[data-theme="dark"] .highlight .sx { color: #FFA500 } /* Literal.String.Other */ +body[data-theme="dark"] .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */ +body[data-theme="dark"] .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */ +body[data-theme="dark"] .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */ +body[data-theme="dark"] .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */ +body[data-theme="dark"] .highlight .fm { color: #71ADFF } /* Name.Function.Magic */ +body[data-theme="dark"] .highlight .vc { color: #40FFFF } /* Name.Variable.Class */ +body[data-theme="dark"] .highlight .vg { color: #40FFFF } /* Name.Variable.Global */ +body[data-theme="dark"] .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */ +body[data-theme="dark"] .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */ +body[data-theme="dark"] .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */ @media (prefers-color-scheme: dark) { body:not([data-theme="light"]) .highlight pre { line-height: 125%; } body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } @@ -175,84 +175,84 @@ body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; backgro body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } body:not([data-theme="light"]) .highlight .hll { background-color: #404040 } -body:not([data-theme="light"]) .highlight { background: #202020; color: #d0d0d0 } -body:not([data-theme="light"]) .highlight .c { color: #ababab; font-style: italic } /* Comment */ -body:not([data-theme="light"]) .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -body:not([data-theme="light"]) .highlight .esc { color: #d0d0d0 } /* Escape */ -body:not([data-theme="light"]) .highlight .g { color: #d0d0d0 } /* Generic */ -body:not([data-theme="light"]) .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ -body:not([data-theme="light"]) .highlight .l { color: #d0d0d0 } /* Literal */ -body:not([data-theme="light"]) .highlight .n { color: #d0d0d0 } /* Name */ -body:not([data-theme="light"]) .highlight .o { color: #d0d0d0 } /* Operator */ -body:not([data-theme="light"]) .highlight .x { color: #d0d0d0 } /* Other */ -body:not([data-theme="light"]) .highlight .p { color: #d0d0d0 } /* Punctuation */ -body:not([data-theme="light"]) .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ -body:not([data-theme="light"]) .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ -body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ -body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ -body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ -body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ -body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ -body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ -body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +body:not([data-theme="light"]) .highlight { background: #202020; color: #D0D0D0 } +body:not([data-theme="light"]) .highlight .c { color: #ABABAB; font-style: italic } /* Comment */ +body:not([data-theme="light"]) .highlight .err { color: #A61717; background-color: #E3D2D2 } /* Error */ +body:not([data-theme="light"]) .highlight .esc { color: #D0D0D0 } /* Escape */ +body:not([data-theme="light"]) .highlight .g { color: #D0D0D0 } /* Generic */ +body:not([data-theme="light"]) .highlight .k { color: #6EBF26; font-weight: bold } /* Keyword */ +body:not([data-theme="light"]) .highlight .l { color: #D0D0D0 } /* Literal */ +body:not([data-theme="light"]) .highlight .n { color: #D0D0D0 } /* Name */ +body:not([data-theme="light"]) .highlight .o { color: #D0D0D0 } /* Operator */ +body:not([data-theme="light"]) .highlight .x { color: #D0D0D0 } /* Other */ +body:not([data-theme="light"]) .highlight .p { color: #D0D0D0 } /* Punctuation */ +body:not([data-theme="light"]) .highlight .ch { color: #ABABAB; font-style: italic } /* Comment.Hashbang */ +body:not([data-theme="light"]) .highlight .cm { color: #ABABAB; font-style: italic } /* Comment.Multiline */ +body:not([data-theme="light"]) .highlight .cp { color: #FF3A3A; font-weight: bold } /* Comment.Preproc */ +body:not([data-theme="light"]) .highlight .cpf { color: #ABABAB; font-style: italic } /* Comment.PreprocFile */ +body:not([data-theme="light"]) .highlight .c1 { color: #ABABAB; font-style: italic } /* Comment.Single */ +body:not([data-theme="light"]) .highlight .cs { color: #E50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +body:not([data-theme="light"]) .highlight .gd { color: #FF3A3A } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ +body:not([data-theme="light"]) .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body:not([data-theme="light"]) .highlight .gr { color: #FF3A3A } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ -body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ -body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ -body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ -body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ -body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ -body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ -body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ -body:not([data-theme="light"]) .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ -body:not([data-theme="light"]) .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ -body:not([data-theme="light"]) .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ -body:not([data-theme="light"]) .highlight .ld { color: #d0d0d0 } /* Literal.Date */ -body:not([data-theme="light"]) .highlight .m { color: #51b2fd } /* Literal.Number */ -body:not([data-theme="light"]) .highlight .s { color: #ed9d13 } /* Literal.String */ -body:not([data-theme="light"]) .highlight .na { color: #bbbbbb } /* Name.Attribute */ -body:not([data-theme="light"]) .highlight .nb { color: #2fbccd } /* Name.Builtin */ -body:not([data-theme="light"]) .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ -body:not([data-theme="light"]) .highlight .no { color: #40ffff } /* Name.Constant */ -body:not([data-theme="light"]) .highlight .nd { color: #ffa500 } /* Name.Decorator */ -body:not([data-theme="light"]) .highlight .ni { color: #d0d0d0 } /* Name.Entity */ -body:not([data-theme="light"]) .highlight .ne { color: #bbbbbb } /* Name.Exception */ -body:not([data-theme="light"]) .highlight .nf { color: #71adff } /* Name.Function */ -body:not([data-theme="light"]) .highlight .nl { color: #d0d0d0 } /* Name.Label */ -body:not([data-theme="light"]) .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ -body:not([data-theme="light"]) .highlight .nx { color: #d0d0d0 } /* Name.Other */ -body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Property */ -body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ -body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */ -body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ -body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ -body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */ -body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ -body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ -body:not([data-theme="light"]) .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ -body:not([data-theme="light"]) .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ -body:not([data-theme="light"]) .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ -body:not([data-theme="light"]) .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ -body:not([data-theme="light"]) .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ -body:not([data-theme="light"]) .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ -body:not([data-theme="light"]) .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ -body:not([data-theme="light"]) .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ -body:not([data-theme="light"]) .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ -body:not([data-theme="light"]) .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ -body:not([data-theme="light"]) .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ -body:not([data-theme="light"]) .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ -body:not([data-theme="light"]) .highlight .sx { color: #ffa500 } /* Literal.String.Other */ -body:not([data-theme="light"]) .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ -body:not([data-theme="light"]) .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ -body:not([data-theme="light"]) .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ -body:not([data-theme="light"]) .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ -body:not([data-theme="light"]) .highlight .fm { color: #71adff } /* Name.Function.Magic */ -body:not([data-theme="light"]) .highlight .vc { color: #40ffff } /* Name.Variable.Class */ -body:not([data-theme="light"]) .highlight .vg { color: #40ffff } /* Name.Variable.Global */ -body:not([data-theme="light"]) .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ -body:not([data-theme="light"]) .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ -body:not([data-theme="light"]) .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ +body:not([data-theme="light"]) .highlight .go { color: #CCC } /* Generic.Output */ +body:not([data-theme="light"]) .highlight .gp { color: #AAA } /* Generic.Prompt */ +body:not([data-theme="light"]) .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ +body:not([data-theme="light"]) .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ +body:not([data-theme="light"]) .highlight .gt { color: #FF3A3A } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .kc { color: #6EBF26; font-weight: bold } /* Keyword.Constant */ +body:not([data-theme="light"]) .highlight .kd { color: #6EBF26; font-weight: bold } /* Keyword.Declaration */ +body:not([data-theme="light"]) .highlight .kn { color: #6EBF26; font-weight: bold } /* Keyword.Namespace */ +body:not([data-theme="light"]) .highlight .kp { color: #6EBF26 } /* Keyword.Pseudo */ +body:not([data-theme="light"]) .highlight .kr { color: #6EBF26; font-weight: bold } /* Keyword.Reserved */ +body:not([data-theme="light"]) .highlight .kt { color: #6EBF26; font-weight: bold } /* Keyword.Type */ +body:not([data-theme="light"]) .highlight .ld { color: #D0D0D0 } /* Literal.Date */ +body:not([data-theme="light"]) .highlight .m { color: #51B2FD } /* Literal.Number */ +body:not([data-theme="light"]) .highlight .s { color: #ED9D13 } /* Literal.String */ +body:not([data-theme="light"]) .highlight .na { color: #BBB } /* Name.Attribute */ +body:not([data-theme="light"]) .highlight .nb { color: #2FBCCD } /* Name.Builtin */ +body:not([data-theme="light"]) .highlight .nc { color: #71ADFF; text-decoration: underline } /* Name.Class */ +body:not([data-theme="light"]) .highlight .no { color: #40FFFF } /* Name.Constant */ +body:not([data-theme="light"]) .highlight .nd { color: #FFA500 } /* Name.Decorator */ +body:not([data-theme="light"]) .highlight .ni { color: #D0D0D0 } /* Name.Entity */ +body:not([data-theme="light"]) .highlight .ne { color: #BBB } /* Name.Exception */ +body:not([data-theme="light"]) .highlight .nf { color: #71ADFF } /* Name.Function */ +body:not([data-theme="light"]) .highlight .nl { color: #D0D0D0 } /* Name.Label */ +body:not([data-theme="light"]) .highlight .nn { color: #71ADFF; text-decoration: underline } /* Name.Namespace */ +body:not([data-theme="light"]) .highlight .nx { color: #D0D0D0 } /* Name.Other */ +body:not([data-theme="light"]) .highlight .py { color: #D0D0D0 } /* Name.Property */ +body:not([data-theme="light"]) .highlight .nt { color: #6EBF26; font-weight: bold } /* Name.Tag */ +body:not([data-theme="light"]) .highlight .nv { color: #40FFFF } /* Name.Variable */ +body:not([data-theme="light"]) .highlight .ow { color: #6EBF26; font-weight: bold } /* Operator.Word */ +body:not([data-theme="light"]) .highlight .pm { color: #D0D0D0 } /* Punctuation.Marker */ +body:not([data-theme="light"]) .highlight .w { color: #666 } /* Text.Whitespace */ +body:not([data-theme="light"]) .highlight .mb { color: #51B2FD } /* Literal.Number.Bin */ +body:not([data-theme="light"]) .highlight .mf { color: #51B2FD } /* Literal.Number.Float */ +body:not([data-theme="light"]) .highlight .mh { color: #51B2FD } /* Literal.Number.Hex */ +body:not([data-theme="light"]) .highlight .mi { color: #51B2FD } /* Literal.Number.Integer */ +body:not([data-theme="light"]) .highlight .mo { color: #51B2FD } /* Literal.Number.Oct */ +body:not([data-theme="light"]) .highlight .sa { color: #ED9D13 } /* Literal.String.Affix */ +body:not([data-theme="light"]) .highlight .sb { color: #ED9D13 } /* Literal.String.Backtick */ +body:not([data-theme="light"]) .highlight .sc { color: #ED9D13 } /* Literal.String.Char */ +body:not([data-theme="light"]) .highlight .dl { color: #ED9D13 } /* Literal.String.Delimiter */ +body:not([data-theme="light"]) .highlight .sd { color: #ED9D13 } /* Literal.String.Doc */ +body:not([data-theme="light"]) .highlight .s2 { color: #ED9D13 } /* Literal.String.Double */ +body:not([data-theme="light"]) .highlight .se { color: #ED9D13 } /* Literal.String.Escape */ +body:not([data-theme="light"]) .highlight .sh { color: #ED9D13 } /* Literal.String.Heredoc */ +body:not([data-theme="light"]) .highlight .si { color: #ED9D13 } /* Literal.String.Interpol */ +body:not([data-theme="light"]) .highlight .sx { color: #FFA500 } /* Literal.String.Other */ +body:not([data-theme="light"]) .highlight .sr { color: #ED9D13 } /* Literal.String.Regex */ +body:not([data-theme="light"]) .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */ +body:not([data-theme="light"]) .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */ +body:not([data-theme="light"]) .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */ +body:not([data-theme="light"]) .highlight .fm { color: #71ADFF } /* Name.Function.Magic */ +body:not([data-theme="light"]) .highlight .vc { color: #40FFFF } /* Name.Variable.Class */ +body:not([data-theme="light"]) .highlight .vg { color: #40FFFF } /* Name.Variable.Global */ +body:not([data-theme="light"]) .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */ +body:not([data-theme="light"]) .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */ +body:not([data-theme="light"]) .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */ } } \ No newline at end of file diff --git a/docs/manual/examples.html b/docs/manual/examples.html index 646b679..b1ebdb5 100644 --- a/docs/manual/examples.html +++ b/docs/manual/examples.html @@ -2,7 +2,7 @@
- + @@ -237,9 +237,9 @@ program. # new destination, and let the user send an announce. # ########################################################## -import argparse -import sys -import RNS +import argparse +import sys +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this basic example @@ -248,7 +248,7 @@ program. APP_NAME = "example_utilities" # This initialisation is executed when the program is started -def program_setup(configpath): +def program_setup(configpath): # We must first initialise Reticulum reticulum = RNS.Reticulum(configpath) @@ -282,7 +282,7 @@ program. announceLoop(destination) -def announceLoop(destination): +def announceLoop(destination): # Let the user know that everything is ready RNS.log( "Minimal example "+ @@ -348,10 +348,10 @@ notifications about announces from relevant destinations. # notification when an announce relevant for it arrives # ########################################################## -import argparse -import random -import sys -import RNS +import argparse +import random +import sys +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this basic example @@ -364,7 +364,7 @@ notifications about announces from relevant destinations. noble_gases = ["Helium", "Neon", "Argon", "Krypton", "Xenon", "Radon", "Oganesson"] # This initialisation is executed when the program is started -def program_setup(configpath): +def program_setup(configpath): # We must first initialise Reticulum reticulum = RNS.Reticulum(configpath) @@ -421,7 +421,7 @@ notifications about announces from relevant destinations. announceLoop(destination_1, destination_2) -def announceLoop(destination_1, destination_2): +def announceLoop(destination_1, destination_2): # Let the user know that everything is ready RNS.log("Announce example running, hit enter to manually send an announce (Ctrl-C to quit)") @@ -456,20 +456,20 @@ notifications about announces from relevant destinations. # We will need to define an announce handler class that # Reticulum can message when an announce arrives. -class ExampleAnnounceHandler: +class ExampleAnnounceHandler: # The initialisation method takes the optional # aspect_filter argument. If aspect_filter is set to # None, all announces will be passed to the instance. # If only some announces are wanted, it can be set to # an aspect string. - def __init__(self, aspect_filter=None): + def __init__(self, aspect_filter=None): self.aspect_filter = aspect_filter # This method will be called by Reticulums Transport # system when an announce arrives that matches the # configured aspect filter. Filters must be specific, # and cannot use wildcards. - def received_announce(self, destination_hash, announced_identity, app_data): + def received_announce(self, destination_hash, announced_identity, app_data): RNS.log( "Received an announce from "+ RNS.prettyhexrep(destination_hash) @@ -527,9 +527,9 @@ over the network. # information to any listening destinations. # ########################################################## -import sys -import argparse -import RNS +import sys +import argparse +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this basic example @@ -538,7 +538,7 @@ over the network. APP_NAME = "example_utilities" # This initialisation is executed when the program is started -def program_setup(configpath, channel=None): +def program_setup(configpath, channel=None): # We must first initialise Reticulum reticulum = RNS.Reticulum(configpath) @@ -569,13 +569,13 @@ over the network. # Let's hand over control to the main loop broadcastLoop(broadcast_destination) -def packet_callback(data, packet): +def packet_callback(data, packet): # Simply print out the received data print("") print("Received data: "+data.decode("utf-8")+"\r\n> ", end="") sys.stdout.flush() -def broadcastLoop(destination): +def broadcastLoop(destination): # Let the user know that everything is ready RNS.log( "Broadcast example "+ @@ -658,9 +658,9 @@ the Packet interface. # of the packet. # ########################################################## -import argparse -import sys -import RNS +import argparse +import sys +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this echo example @@ -675,7 +675,7 @@ the Packet interface. # This initialisation is executed when the users chooses # to run as a server -def server(configpath): +def server(configpath): global reticulum # We must first initialise Reticulum @@ -715,7 +715,7 @@ the Packet interface. announceLoop(echo_destination) -def announceLoop(destination): +def announceLoop(destination): # Let the user know that everything is ready RNS.log( "Echo server "+ @@ -733,7 +733,7 @@ the Packet interface. RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash)) -def server_callback(message, packet): +def server_callback(message, packet): global reticulum # Tell the user that we received an echo request, and @@ -768,7 +768,7 @@ the Packet interface. # This initialisation is executed when the users chooses # to run as a client -def client(destination_hexhash, configpath, timeout=None): +def client(destination_hexhash, configpath, timeout=None): global reticulum # We need a binary representation of the destination @@ -869,7 +869,7 @@ the Packet interface. # This function is called when our reply destination # receives a proof packet. -def packet_delivered(receipt): +def packet_delivered(receipt): global reticulum if receipt.status == RNS.PacketReceipt.DELIVERED: @@ -908,7 +908,7 @@ the Packet interface. ) # This function is called if a packet times out. -def packet_timed_out(receipt): +def packet_timed_out(receipt): if receipt.status == RNS.PacketReceipt.FAILED: RNS.log("Packet "+RNS.prettyhexrep(receipt.hash)+" timed out") @@ -996,11 +996,11 @@ destination, and passing traffic back and forth over the link. # a destination, and pass data back and forth over it. # ########################################################## -import os -import sys -import time -import argparse -import RNS +import os +import sys +import time +import argparse +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this echo example @@ -1017,7 +1017,7 @@ destination, and passing traffic back and forth over the link. # This initialisation is executed when the users chooses # to run as a server -def server(configpath): +def server(configpath): # We must first initialise Reticulum reticulum = RNS.Reticulum(configpath) @@ -1043,7 +1043,7 @@ destination, and passing traffic back and forth over the link. # Let's Wait for client requests or user input server_loop(server_destination) -def server_loop(destination): +def server_loop(destination): # Let the user know that everything is ready RNS.log( "Link example "+ @@ -1065,7 +1065,7 @@ destination, and passing traffic back and forth over the link. # When a client establishes a link to our server # destination, this function will be called with # a reference to the link. -def client_connected(link): +def client_connected(link): global latest_client_link RNS.log("Client connected") @@ -1073,10 +1073,10 @@ destination, and passing traffic back and forth over the link. link.set_packet_callback(server_packet_received) latest_client_link = link -def client_disconnected(link): +def client_disconnected(link): RNS.log("Client disconnected") -def server_packet_received(message, packet): +def server_packet_received(message, packet): global latest_client_link # When data is received over any active link, @@ -1099,7 +1099,7 @@ destination, and passing traffic back and forth over the link. # This initialisation is executed when the users chooses # to run as a client -def client(destination_hexhash, configpath): +def client(destination_hexhash, configpath): # We need a binary representation of the destination # hash that was entered on the command line try: @@ -1157,7 +1157,7 @@ destination, and passing traffic back and forth over the link. # for the user to interact with the example client_loop() -def client_loop(): +def client_loop(): global server_link # Wait for the link to become active @@ -1195,7 +1195,7 @@ destination, and passing traffic back and forth over the link. # This function is called when a link # has been established with the server -def link_established(link): +def link_established(link): # We store a reference to the link # instance for later use global server_link @@ -1207,7 +1207,7 @@ destination, and passing traffic back and forth over the link. # When a link is closed, we'll inform the # user, and exit the program -def link_closed(link): +def link_closed(link): if link.teardown_reason == RNS.Link.TIMEOUT: RNS.log("The link timed out, exiting now") elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED: @@ -1220,7 +1220,7 @@ destination, and passing traffic back and forth over the link. # When a packet is received over the link, we # simply print out the data. -def client_packet_received(message, packet): +def client_packet_received(message, packet): text = message.decode("utf-8") RNS.log("Received data on the link: "+text) print("> ", end=" ") @@ -1294,11 +1294,11 @@ the link has been established. # a destination, and identify the initiator to it's peer # ########################################################## -import os -import sys -import time -import argparse -import RNS +import os +import sys +import time +import argparse +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this echo example @@ -1315,7 +1315,7 @@ the link has been established. # This initialisation is executed when the users chooses # to run as a server -def server(configpath): +def server(configpath): # We must first initialise Reticulum reticulum = RNS.Reticulum(configpath) @@ -1341,7 +1341,7 @@ the link has been established. # Let's Wait for client requests or user input server_loop(server_destination) -def server_loop(destination): +def server_loop(destination): # Let the user know that everything is ready RNS.log( "Link identification example "+ @@ -1363,7 +1363,7 @@ the link has been established. # When a client establishes a link to our server # destination, this function will be called with # a reference to the link. -def client_connected(link): +def client_connected(link): global latest_client_link RNS.log("Client connected") @@ -1372,13 +1372,13 @@ the link has been established. link.set_remote_identified_callback(remote_identified) latest_client_link = link -def client_disconnected(link): +def client_disconnected(link): RNS.log("Client disconnected") -def remote_identified(link, identity): +def remote_identified(link, identity): RNS.log("Remote identified as: "+str(identity)) -def server_packet_received(message, packet): +def server_packet_received(message, packet): global latest_client_link # Get the originating identity for display @@ -1410,7 +1410,7 @@ the link has been established. # This initialisation is executed when the users chooses # to run as a client -def client(destination_hexhash, configpath): +def client(destination_hexhash, configpath): global client_identity # We need a binary representation of the destination # hash that was entered on the command line @@ -1476,7 +1476,7 @@ the link has been established. # for the user to interact with the example client_loop() -def client_loop(): +def client_loop(): global server_link # Wait for the link to become active @@ -1514,7 +1514,7 @@ the link has been established. # This function is called when a link # has been established with the server -def link_established(link): +def link_established(link): # We store a reference to the link # instance for later use global server_link, client_identity @@ -1528,7 +1528,7 @@ the link has been established. # When a link is closed, we'll inform the # user, and exit the program -def link_closed(link): +def link_closed(link): if link.teardown_reason == RNS.Link.TIMEOUT: RNS.log("The link timed out, exiting now") elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED: @@ -1541,7 +1541,7 @@ the link has been established. # When a packet is received over the link, we # simply print out the data. -def client_packet_received(message, packet): +def client_packet_received(message, packet): text = message.decode("utf-8") RNS.log("Received data on the link: "+text) print("> ", end=" ") @@ -1614,12 +1614,12 @@ the link has been established. # requests and receive responses over a link. # ########################################################## -import os -import sys -import time -import random -import argparse -import RNS +import os +import sys +import time +import random +import argparse +import RNS # Let's define an app name. We'll use this for all # destinations we create. Since this echo example @@ -1634,14 +1634,14 @@ the link has been established. # A reference to the latest client link that connected latest_client_link = None -def random_text_generator(path, data, request_id, link_id, remote_identity, requested_at): +def random_text_generator(path, data, request_id, link_id, remote_identity, requested_at): RNS.log("Generating response to request "+RNS.prettyhexrep(request_id)+" on link "+RNS.prettyhexrep(link_id)) texts = ["They looked up", "On each full moon", "Becky was upset", "I’ll stay away from it", "The pet shop stocks everything"] return texts[random.randint(0, len(texts)-1)] # This initialisation is executed when the users chooses # to run as a server -def server(configpath): +def server(configpath): # We must first initialise Reticulum reticulum = RNS.Reticulum(configpath) @@ -1675,7 +1675,7 @@ the link has been established. # Let's Wait for client requests or user input server_loop(server_destination) -def server_loop(destination): +def server_loop(destination): # Let the user know that everything is ready RNS.log( "Request example "+ @@ -1697,14 +1697,14 @@ the link has been established. # When a client establishes a link to our server # destination, this function will be called with # a reference to the link. -def client_connected(link): +def client_connected(link): global latest_client_link RNS.log("Client connected") link.set_link_closed_callback(client_disconnected) latest_client_link = link -def client_disconnected(link): +def client_disconnected(link): RNS.log("Client disconnected") @@ -1717,7 +1717,7 @@ the link has been established. # This initialisation is executed when the users chooses # to run as a client -def client(destination_hexhash, configpath): +def client(destination_hexhash, configpath): # We need a binary representation of the destination # hash that was entered on the command line try: @@ -1770,7 +1770,7 @@ the link has been established. # for the user to interact with the example client_loop() -def client_loop(): +def client_loop(): global server_link # Wait for the link to become active @@ -1802,22 +1802,22 @@ the link has been established. should_quit = True server_link.teardown() -def got_response(request_receipt): +def got_response(request_receipt): request_id = request_receipt.request_id response = request_receipt.response RNS.log("Got response for request "+RNS.prettyhexrep(request_id)+": "+str(response)) -def request_received(request_receipt): +def request_received(request_receipt): RNS.log("The request "+RNS.prettyhexrep(request_receipt.request_id)+" was received by the remote peer.") -def request_failed(request_receipt): +def request_failed(request_receipt): RNS.log("The request "+RNS.prettyhexrep(request_receipt.request_id)+" failed.") # This function is called when a link # has been established with the server -def link_established(link): +def link_established(link): # We store a reference to the link # instance for later use global server_link @@ -1829,7 +1829,7 @@ the link has been established. # When a link is closed, we'll inform the # user, and exit the program -def link_closed(link): +def link_closed(link): if link.teardown_reason == RNS.Link.TIMEOUT: RNS.log("The link timed out, exiting now") elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED: @@ -1909,14 +1909,14 @@ data between peers of a# using a channel. #
##########################################################
-import os
-import sys
-import time
-import argparse
-from datetime import datetime
+import os
+import sys
+import time
+import argparse
+from datetime import datetime
-import RNS
-from RNS.vendor import umsgpack
+import RNS
+from RNS.vendor import umsgpack
# Let's define an app name. We'll use this for all
# destinations we create. Since this echo example
@@ -1944,7 +1944,7 @@ data between peers of a # Let's make a simple message class called StringMessage
# that will convey a string with a timestamp.
-class StringMessage(RNS.MessageBase):
+class StringMessage(RNS.MessageBase):
# The MSGTYPE class variable needs to be assigned a
# 2 byte integer value. This identifier allows the
# channel to look up your message's constructor when a
@@ -1962,7 +1962,7 @@ data between peers of a # This is needed so the channel can create an empty
# version of our message into which the incoming
# message can be unpacked.
- def __init__(self, data=None):
+ def __init__(self, data=None):
self.data = data
self.timestamp = datetime.now()
@@ -1982,12 +1982,12 @@ data between peers of a # The pack function encodes the message contents into
# a byte stream.
- def pack(self) -> bytes:
+ def pack(self) -> bytes:
return umsgpack.packb((self.data, self.timestamp))
# And the unpack function decodes a byte stream into
# the message contents.
- def unpack(self, raw):
+ def unpack(self, raw):
self.data, self.timestamp = umsgpack.unpackb(raw)
@@ -2000,7 +2000,7 @@ data between peers of a # This initialisation is executed when the users chooses
# to run as a server
-def server(configpath):
+def server(configpath):
# We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath)
@@ -2026,7 +2026,7 @@ data between peers of a # Let's Wait for client requests or user input
server_loop(server_destination)
-def server_loop(destination):
+def server_loop(destination):
# Let the user know that everything is ready
RNS.log(
"Channel example "+
@@ -2048,7 +2048,7 @@ data between peers of a # When a client establishes a link to our server
# destination, this function will be called with
# a reference to the link.
-def client_connected(link):
+def client_connected(link):
global latest_client_link
latest_client_link = link
@@ -2060,10 +2060,10 @@ data between peers of a channel.register_message_type(StringMessage)
channel.add_message_handler(server_message_received)
-def client_disconnected(link):
+def client_disconnected(link):
RNS.log("Client disconnected")
-def server_message_received(message):
+def server_message_received(message):
"""
A message handler
@param message: An instance of a subclass of MessageBase
@@ -2104,7 +2104,7 @@ data between peers of a # This initialisation is executed when the users chooses
# to run as a client
-def client(destination_hexhash, configpath):
+def client(destination_hexhash, configpath):
# We need a binary representation of the destination
# hash that was entered on the command line
try:
@@ -2157,7 +2157,7 @@ data between peers of a # for the user to interact with the example
client_loop()
-def client_loop():
+def client_loop():
global server_link
# Wait for the link to become active
@@ -2201,7 +2201,7 @@ data between peers of a # This function is called when a link
# has been established with the server
-def link_established(link):
+def link_established(link):
# We store a reference to the link
# instance for later use
global server_link
@@ -2218,7 +2218,7 @@ data between peers of a # When a link is closed, we'll inform the
# user, and exit the program
-def link_closed(link):
+def link_closed(link):
if link.teardown_reason == RNS.Link.TIMEOUT:
RNS.log("The link timed out, exiting now")
elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
@@ -2231,7 +2231,7 @@ data between peers of a # When a packet is received over the channel, we
# simply print out the data.
-def client_message_received(message):
+def client_message_received(message):
if isinstance(message, StringMessage):
RNS.log("Received data on the link: " + message.data + " (message created at " + str(message.timestamp) + ")")
print("> ", end=" ")
@@ -2305,15 +2305,15 @@ binary data between peers of a # a destination, and pass binary data over it using a #
# channel buffer. #
##########################################################
-from __future__ import annotations
-import os
-import sys
-import time
-import argparse
-from datetime import datetime
+from __future__ import annotations
+import os
+import sys
+import time
+import argparse
+from datetime import datetime
-import RNS
-from RNS.vendor import umsgpack
+import RNS
+from RNS.vendor import umsgpack
# Let's define an app name. We'll use this for all
# destinations we create. Since this echo example
@@ -2334,7 +2334,7 @@ binary data between peers of a # This initialisation is executed when the users chooses
# to run as a server
-def server(configpath):
+def server(configpath):
# We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath)
@@ -2360,7 +2360,7 @@ binary data between peers of a # Let's Wait for client requests or user input
server_loop(server_destination)
-def server_loop(destination):
+def server_loop(destination):
# Let the user know that everything is ready
RNS.log(
"Link buffer example "+
@@ -2382,7 +2382,7 @@ binary data between peers of a # When a client establishes a link to our server
# destination, this function will be called with
# a reference to the link.
-def client_connected(link):
+def client_connected(link):
global latest_client_link, latest_buffer
latest_client_link = link
@@ -2408,10 +2408,10 @@ binary data between peers of a channel = link.get_channel()
latest_buffer = RNS.Buffer.create_bidirectional_buffer(0, 0, channel, server_buffer_ready)
-def client_disconnected(link):
+def client_disconnected(link):
RNS.log("Client disconnected")
-def server_buffer_ready(ready_bytes: int):
+def server_buffer_ready(ready_bytes: int):
"""
Callback from buffer when buffer has data available
@@ -2446,7 +2446,7 @@ binary data between peers of a # This initialisation is executed when the users chooses
# to run as a client
-def client(destination_hexhash, configpath):
+def client(destination_hexhash, configpath):
# We need a binary representation of the destination
# hash that was entered on the command line
try:
@@ -2499,7 +2499,7 @@ binary data between peers of a # for the user to interact with the example
client_loop()
-def client_loop():
+def client_loop():
global server_link
# Wait for the link to become active
@@ -2531,7 +2531,7 @@ binary data between peers of a # This function is called when a link
# has been established with the server
-def link_established(link):
+def link_established(link):
# We store a reference to the link
# instance for later use
global server_link, buffer
@@ -2548,7 +2548,7 @@ binary data between peers of a # When a link is closed, we'll inform the
# user, and exit the program
-def link_closed(link):
+def link_closed(link):
if link.teardown_reason == RNS.Link.TIMEOUT:
RNS.log("The link timed out, exiting now")
elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
@@ -2560,7 +2560,7 @@ binary data between peers of a sys.exit(0)
# When the buffer has new data, read it and write it to the terminal.
-def client_buffer_ready(ready_bytes: int):
+def client_buffer_ready(ready_bytes: int):
global buffer
data = buffer.read(ready_bytes)
RNS.log("Received data over the link buffer: " + data.decode("utf-8"))
@@ -2649,13 +2649,13 @@ interface to efficiently pass files of any size over a Reticulum # into chunks suitable for packing as a Resource. #
##########################################################
-import os
-import sys
-import time
-import threading
-import argparse
-import RNS
-import RNS.vendor.umsgpack as umsgpack
+import os
+import sys
+import time
+import threading
+import argparse
+import RNS
+import RNS.vendor.umsgpack as umsgpack
# Let's define an app name. We'll use this for all
# destinations we create. Since this echo example
@@ -2674,7 +2674,7 @@ interface to efficiently pass files of any size over a Reticulum # This initialisation is executed when the users chooses
# to run as a server
-def server(configpath, path):
+def server(configpath, path):
# We must first initialise Reticulum
reticulum = RNS.Reticulum(configpath)
@@ -2704,7 +2704,7 @@ interface to efficiently pass files of any size over a Reticulum # Let's Wait for client requests or user input
announceLoop(server_destination)
-def announceLoop(destination):
+def announceLoop(destination):
# Let the user know that everything is ready
RNS.log("File server "+RNS.prettyhexrep(destination.hash)+" running")
RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
@@ -2720,7 +2720,7 @@ interface to efficiently pass files of any size over a Reticulum # Here's a convenience function for listing all files
# in our served directory
-def list_files():
+def list_files():
# We add all entries from the directory that are
# actual files, and does not start with "."
global serve_path
@@ -2730,7 +2730,7 @@ interface to efficiently pass files of any size over a Reticulum # destination, this function will be called with
# a reference to the link. We then send the client
# a list of files hosted on the server.
-def client_connected(link):
+def client_connected(link):
# Check if the served directory still exists
if os.path.isdir(serve_path):
RNS.log("Client connected, sending file list...")
@@ -2763,10 +2763,10 @@ interface to efficiently pass files of any size over a Reticulum RNS.log("Client connected, but served path no longer exists!", RNS.LOG_ERROR)
link.teardown()
-def client_disconnected(link):
+def client_disconnected(link):
RNS.log("Client disconnected")
-def client_request(message, packet):
+def client_request(message, packet):
global serve_path
try:
@@ -2801,7 +2801,7 @@ interface to efficiently pass files of any size over a Reticulum # This function is called on the server when a
# resource transfer concludes.
-def resource_sending_concluded(resource):
+def resource_sending_concluded(resource):
if hasattr(resource, "filename"):
name = resource.filename
else:
@@ -2812,10 +2812,10 @@ interface to efficiently pass files of any size over a Reticulum elif resource.status == RNS.Resource.FAILED:
RNS.log("Sending \""+name+"\" to client failed")
-def list_delivered(receipt):
+def list_delivered(receipt):
RNS.log("The file list was received by the client")
-def list_timeout(receipt):
+def list_timeout(receipt):
RNS.log("Sending list to client timed out, closing this link")
link = receipt.destination
link.teardown()
@@ -2844,7 +2844,7 @@ interface to efficiently pass files of any size over a Reticulum # This initialisation is executed when the users chooses
# to run as a client
-def client(destination_hexhash, configpath):
+def client(destination_hexhash, configpath):
# We need a binary representation of the destination
# hash that was entered on the command line
try:
@@ -2912,7 +2912,7 @@ interface to efficiently pass files of any size over a Reticulum menu()
# Requests the specified file from the server
-def download(filename):
+def download(filename):
global server_link, menu_mode, current_filename, transfer_size, download_started
current_filename = filename
download_started = 0
@@ -2932,7 +2932,7 @@ interface to efficiently pass files of any size over a Reticulum # This function runs a simple menu for the user
# to select which files to download, or quit
menu_mode = None
-def menu():
+def menu():
global server_files, server_link
# Wait until we have a filelist
while len(server_files) == 0:
@@ -2972,7 +2972,7 @@ interface to efficiently pass files of any size over a Reticulum # It's simple and quite uninteresting.
# I won't go into detail here. Just
# strings basically.
-def print_menu():
+def print_menu():
global menu_mode, download_time, download_started, download_finished, transfer_size, file_size
if menu_mode == "main":
@@ -3041,13 +3041,13 @@ interface to efficiently pass files of any size over a Reticulum # This function prints out a list of files
# on the connected server.
-def print_filelist():
+def print_filelist():
global server_files
print("Files on server:")
for index,file in enumerate(server_files):
print("\t("+str(index)+")\t"+file)
-def filelist_received(filelist_data, packet):
+def filelist_received(filelist_data, packet):
global server_files, menu_mode
try:
# Unpack the list and extend our
@@ -3068,7 +3068,7 @@ interface to efficiently pass files of any size over a Reticulum # This function is called when a link
# has been established with the server
-def link_established(link):
+def link_established(link):
# We store a reference to the link
# instance for later use
global server_link
@@ -3089,7 +3089,7 @@ interface to efficiently pass files of any size over a Reticulum # time, and then checks if the file list
# was received. If not, the program will
# exit.
-def filelist_timeout_job():
+def filelist_timeout_job():
time.sleep(APP_TIMEOUT)
global server_files
@@ -3100,7 +3100,7 @@ interface to efficiently pass files of any size over a Reticulum # When a link is closed, we'll inform the
# user, and exit the program
-def link_closed(link):
+def link_closed(link):
if link.teardown_reason == RNS.Link.TIMEOUT:
RNS.log("The link timed out, exiting now")
elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
@@ -3115,7 +3115,7 @@ interface to efficiently pass files of any size over a Reticulum # started, we'll update our menu state
# so the user can be shown a progress of
# the download.
-def download_began(resource):
+def download_began(resource):
global menu_mode, current_download, download_started, transfer_size, file_size
current_download = resource
@@ -3130,7 +3130,7 @@ interface to efficiently pass files of any size over a Reticulum # When the download concludes, successfully
# or not, we'll update our menu state and
# inform the user about how it all went.
-def download_concluded(resource):
+def download_concluded(resource):
global menu_mode, current_filename, download_started, download_finished, download_time
download_finished = time.time()
download_time = download_finished - download_started
@@ -3155,7 +3155,7 @@ interface to efficiently pass files of any size over a Reticulum # A convenience function for printing a human-
# readable file size
-def size_str(num, suffix='B'):
+def size_str(num, suffix='B'):
units = ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']
last_unit = 'Yi'
@@ -3171,7 +3171,7 @@ interface to efficiently pass files of any size over a Reticulum return "%.2f %s%s" % (num, last_unit, suffix)
# A convenience function for clearing the screen
-def clear_screen():
+def clear_screen():
os.system('cls' if os.name=='nt' else 'clear')
##########################################################
@@ -3263,15 +3263,15 @@ will be fully on-par with natively included interfaces, including all supported
# parity = none
# stopbits = 1
-from time import sleep
-import sys
-import threading
-import time
+from time import sleep
+import sys
+import threading
+import time
# This HDLC helper class is used by the interface
# to delimit and packetize data over the physical
# medium - in this case a serial connection.
-class HDLC():
+class HDLC():
# This example interface packetizes data using
# simplified HDLC framing, similar to PPP
FLAG = 0x7E
@@ -3279,14 +3279,14 @@ will be fully on-par with natively included interfaces, including all supported
ESC_MASK = 0x20
@staticmethod
- def escape(data):
+ def escape(data):
data = data.replace(bytes([HDLC.ESC]), bytes([HDLC.ESC, HDLC.ESC^HDLC.ESC_MASK]))
data = data.replace(bytes([HDLC.FLAG]), bytes([HDLC.ESC, HDLC.FLAG^HDLC.ESC_MASK]))
return data
# Let's define our custom interface class. It must
# be a sub-class of the RNS "Interface" class.
-class ExampleInterface(Interface):
+class ExampleInterface(Interface):
# All interface classes must define a default
# IFAC size, used in IFAC setup when the user
# has not specified a custom IFAC size. This
@@ -3307,14 +3307,14 @@ will be fully on-par with natively included interfaces, including all supported
# method that takes 2 positional arguments:
# The owner RNS Transport instance, and a dict
# of configuration values.
- def __init__(self, owner, configuration):
+ def __init__(self, owner, configuration):
# The following lines demonstrate handling
# potential dependencies required for the
# interface to function correctly.
- import importlib
+ import importlib
if importlib.util.find_spec('serial') != None:
- import serial
+ import serial
else:
RNS.log("Using this interface requires a serial communication module to be installed.", RNS.LOG_CRITICAL)
RNS.log("You can install one with the command: python3 -m pip install pyserial", RNS.LOG_CRITICAL)
@@ -3400,7 +3400,7 @@ will be fully on-par with natively included interfaces, including all supported
# Open the serial port with supplied configuration
# parameters and store a reference to the open port.
- def open_port(self):
+ def open_port(self):
RNS.log("Opening serial port "+self.port+"...", RNS.LOG_VERBOSE)
self.serial = self.pyserial.Serial(
port = self.port,
@@ -3420,7 +3420,7 @@ will be fully on-par with natively included interfaces, including all supported
# is to wait a small amount of time for the
# hardware to initialise and then start a thread
# that reads any incoming data from the device.
- def configure_device(self):
+ def configure_device(self):
sleep(0.5)
thread = threading.Thread(target=self.read_loop)
thread.daemon = True
@@ -3432,7 +3432,7 @@ will be fully on-par with natively included interfaces, including all supported
# This method will be called from our read-loop
# whenever a full packet has been received over
# the underlying medium.
- def process_incoming(self, data):
+ def process_incoming(self, data):
# Update our received bytes counter
self.rxb += len(data)
@@ -3443,7 +3443,7 @@ will be fully on-par with natively included interfaces, including all supported
# The running Reticulum Transport instance will
# call this method on the interface whenever the
# interface must transmit a packet.
- def process_outgoing(self,data):
+ def process_outgoing(self,data):
if self.online:
# First, escape and packetize the data
# according to HDLC framing.
@@ -3463,7 +3463,7 @@ will be fully on-par with natively included interfaces, including all supported
# When a full packet has been received, it will
# be sent to the process_incoming methed, which
# will in turn pass it to the Transport instance.
- def read_loop(self):
+ def read_loop(self):
try:
in_frame = False
escape = False
@@ -3516,7 +3516,7 @@ will be fully on-par with natively included interfaces, including all supported
self.reconnect_port()
# This method handles serial port disconnects.
- def reconnect_port(self):
+ def reconnect_port(self):
while not self.online:
try:
time.sleep(5)
@@ -3531,13 +3531,13 @@ will be fully on-par with natively included interfaces, including all supported
# Signal to Reticulum that this interface should
# not perform any ingress limiting.
- def should_ingress_limit(self):
+ def should_ingress_limit(self):
return False
# We must provide a string representation of this
# interface, that is used whenever the interface
# is printed in logs or external programs.
- def __str__(self):
+ def __str__(self):
return "ExampleInterface["+self.name+"]"
# Finally, register the defined interface class as the
diff --git a/docs/manual/forhumans.html b/docs/manual/forhumans.html
index 41ce930..f85cc16 100644
--- a/docs/manual/forhumans.html
+++ b/docs/manual/forhumans.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/gettingstartedfast.html b/docs/manual/gettingstartedfast.html
index 114fad9..19ac753 100644
--- a/docs/manual/gettingstartedfast.html
+++ b/docs/manual/gettingstartedfast.html
@@ -2,7 +2,7 @@
-
+
@@ -292,8 +292,7 @@ provides a complete encrypted communications suite built with Reticulum. It feat
encrypted messaging (both direct and delayed-delivery for offline users), file sharing,
and has a built-in text-browser and page server with support for dynamically rendered pages,
user authentication and more.
-
-
+
Nomad Network is a user-facing client
for the messaging and information-sharing protocol
LXMF, another project built with Reticulum.
@@ -319,8 +318,7 @@ manually add the pi
If you would rather use a program with a graphical user interface, you can take
a look at Sideband, which is available for Android,
Linux, macOS and Windows.
-
-
+
Sideband allows you to communicate with other people or LXMF-compatible
systems over Reticulum networks using LoRa, Packet Radio, WiFi, I2P, Encrypted QR
Paper Messages, or anything else Reticulum supports. It also interoperates with
@@ -331,8 +329,7 @@ the Nomad Network program.
The Reticulum MeshChat application
is a user-friendly LXMF client for macOS and Windows, that also includes voice call
functionality, and a range of other interesting functions.
-
-
+
Reticulum MeshChat is of course also compatible with Sideband and Nomad Network, or
any other LXMF client.
diff --git a/docs/manual/hardware.html b/docs/manual/hardware.html
index 6bd2dfa..9e727ef 100644
--- a/docs/manual/hardware.html
+++ b/docs/manual/hardware.html
@@ -2,7 +2,7 @@
-
+
@@ -292,8 +292,7 @@ to the configuration.
To create one or more RNodes, you will need to obtain supported development
boards. The following boards are supported by the auto-installer.
-
-
+
LilyGO T-Beam Supreme#
@@ -302,8 +301,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
LilyGO T-Beam#
@@ -313,8 +311,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
LilyGO T3S3#
@@ -324,8 +321,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
RAK4631-based Boards#
@@ -335,8 +331,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer RAK Wireless
-
-
+
Unsigned RNode v2.x#
@@ -346,8 +341,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer unsigned.io
-
-
+
LilyGO LoRa32 v2.1#
@@ -357,8 +351,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
LilyGO LoRa32 v2.0#
@@ -368,8 +361,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
LilyGO LoRa32 v1.0#
@@ -379,8 +371,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
LilyGO T-Deck#
@@ -390,8 +381,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer LilyGO
-
-
+
Heltec LoRa32 v3.0#
@@ -401,8 +391,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer Heltec Automation
-
-
+
Heltec LoRa32 v2.0#
@@ -412,8 +401,7 @@ boards. The following boards are supported by the auto-installer.
Manufacturer Heltec Automation
-
-
+
Unsigned RNode v1.x#
@@ -462,10 +450,8 @@ Most devices will behave like this by default, or allow it via configuration opt
and start communicating over them using Reticulum. It is not necessary to enable any IP
infrastructure such as DHCP servers, DNS or similar, as long as at least Ethernet is
available, and packets are passed transparently over the physical WiFi-based devices.
-
-
-
-
+
+
Below is a list of example WiFi (and similar) radios that work well for high capacity
Reticulum links over long distances:
diff --git a/docs/manual/index.html b/docs/manual/index.html
index 1a1c615..baa2677 100644
--- a/docs/manual/index.html
+++ b/docs/manual/index.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/interfaces.html b/docs/manual/interfaces.html
index 9dd75cd..1f682f6 100644
--- a/docs/manual/interfaces.html
+++ b/docs/manual/interfaces.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/networks.html b/docs/manual/networks.html
index 589b3db..b6f66a3 100644
--- a/docs/manual/networks.html
+++ b/docs/manual/networks.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/reference.html b/docs/manual/reference.html
index 47a4393..f966810 100644
--- a/docs/manual/reference.html
+++ b/docs/manual/reference.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/support.html b/docs/manual/support.html
index 409bb62..484e41c 100644
--- a/docs/manual/support.html
+++ b/docs/manual/support.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/understanding.html b/docs/manual/understanding.html
index d1271b6..3eb7dee 100644
--- a/docs/manual/understanding.html
+++ b/docs/manual/understanding.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/using.html b/docs/manual/using.html
index 9d948eb..9f820de 100644
--- a/docs/manual/using.html
+++ b/docs/manual/using.html
@@ -2,7 +2,7 @@
-
+
diff --git a/docs/manual/whatis.html b/docs/manual/whatis.html
index 0157827..150e3b8 100644
--- a/docs/manual/whatis.html
+++ b/docs/manual/whatis.html
@@ -2,7 +2,7 @@
-
+