6 Commits

Author SHA1 Message Date
Soren I. Bjornstad
3e9ecd4b70 work around ReadTheDocs bug 2022-03-27 15:22:31 -05:00
Soren I. Bjornstad
7be018ea3f pull ZK updates and bump version 2022-03-27 15:19:41 -05:00
Soren I. Bjornstad
8fb496bbfe Merge branch 'new-private-person-replacement-logic' into march-tweaks 2022-03-27 15:14:41 -05:00
Soren Bjornstad
d3f6216837 Merge pull request #4 from jacobkiers/allow-specifying-listening-host
Allow setting the host parameter
2022-03-14 21:01:35 -05:00
bdeaac5d03 Specify listen_host as an option in the config file
Signed-off-by: Jacob Kiers <code@kiers.eu>
2022-03-14 18:22:07 +01:00
3b1f91bcb0 Allow setting the host parameter
In order to run in a Docker container, it is necessary to listen on all interfaces (`0.0.0.0`).
So make it possible to set the host.

Fixes #1

Signed-off-by: Jacob Kiers <code@kiers.eu>
2022-03-12 02:31:57 +01:00
14 changed files with 37 additions and 20 deletions

View File

@@ -18,9 +18,9 @@ copyright = '2021 Soren Bjornstad'
author = 'Soren Bjornstad'
# The short X.Y version
version = "0.1.5"
version = "0.2.0"
# The full version, including alpha/beta/rc tags
release = "0.1.5"
release = "0.2.0"
# -- General configuration ---------------------------------------------------

File diff suppressed because one or more lines are too long

View File

@@ -4,6 +4,7 @@
# docs
sphinx==3.5.4 # newer versions display function names in the wrong color?
sphinx_rtd_theme==0.5.2
Jinja2<3.1 # https://github.com/readthedocs/readthedocs.org/issues/9038
# dev tools
build

View File

@@ -9,7 +9,7 @@ with open("README.md", "r") as fh:
setuptools.setup(
name="tzk",
version="0.1.5",
version="0.2.0",
author="Soren I. Bjornstad",
author_email="zettelkasten@sorenbjornstad.com",
description="Build tool for TiddlyWiki Zettelkasten",

View File

@@ -85,6 +85,12 @@ class ListenCommand(CliCommand):
@classmethod
def setup_arguments(cls, parser: argparse.ArgumentParser) -> None:
parser.add_argument(
"--host",
metavar="HOST",
help="Host to listen on.",
default=str(cm().listen_host or "127.0.0.1"),
)
parser.add_argument(
"-p", "--port",
metavar="PORT",
@@ -111,6 +117,7 @@ class ListenCommand(CliCommand):
tw.exec(
[
("listen",
f"host={args.host}",
f"port={args.port}",
f"username={args.username}",
f"password={args.password}")

View File

@@ -35,6 +35,10 @@ commit_remote = ""
# http://localhost:8080 in your browser.
listen_port = 8080
# Host to listen on. If you specify "0.0.0.0" it will listen to all network interfaces.
# This is useful for allowing the wiki to be exposed to the network through a container.
listen_host = "127.0.0.1"
# Uncomment if you want to require HTTP basic authentication when serving your wiki.
# **WARNING**: this is NOT secure for use over the open Internet or all but the
# simplest local networks, as the password is sent in the clear. For good

View File

@@ -8,7 +8,7 @@ type: text/vnd.tiddlywiki
<$set name="tr-rendering" value="yes">
<span id="tr-version">1.3.2</span>
<span id="tr-version">1.3.3</span>
{{||$:/plugins/sobjornstad/TiddlyRemember/templates/AnkiDecks}}
{{||$:/plugins/sobjornstad/TiddlyRemember/templates/AnkiTags}}

View File

@@ -2,7 +2,7 @@
"title": "$:/plugins/sobjornstad/TiddlyRemember",
"description": "TiddlyRemember: Embed Anki notes in your TiddlyWiki",
"author": "Soren Bjornstad",
"version": "1.3.2",
"version": "1.3.3",
"core-version": ">=5.1.21",
"source": "https://github.com/sobjornstad/TiddlyRemember",
"list": "readme license",

View File

@@ -1,5 +1,7 @@
created: 20200516190911842
modified: 20211113234932630
creator: soren
modified: 20220302210205566
modifier: soren
tags:
title: $:/config/TiddlyRemember/TagMapping
type: text/vnd.tiddlywiki

View File

@@ -1,6 +1,6 @@
created: 20200118003731285
creator: soren
modified: 20200118003737882
modified: 20220215235820508
modifier: soren
title: $:/config/Toolbar/ButtonClass
type: text/vnd.tiddlywiki

View File

@@ -2,7 +2,7 @@ caption: Spoiler banner
created: 20210622003118415
creator: soren
description: Display a warning banner on fiction tiddlers (any tiddler with a non-empty `universe` field) noting that we don't try to hide spoilers.
modified: 20211107181812051
modified: 20220201042246695
modifier: soren
private: no
public: no

View File

@@ -3,7 +3,7 @@ created: 20200419143537510
creator: soren
description: Copy the name of this tiddler to the clipboard
list-after: $:/core/ui/Buttons/info
modified: 20210922125723154
modified: 20220215235957457
modifier: soren
tags: $:/tags/ViewToolbar
title: $:/sib/Buttons/CopyTitleReference

View File

@@ -1,7 +1,7 @@
created: 20211120164840100
creator: soren
description: Navigate to the parent or a sibling of the current subtiddler. Subtiddler names are separated from that of their supertiddlers by a / (and are not system tiddlers).
modified: 20211120170254112
modified: 20220202173655863
modifier: soren
tags: $:/tags/ViewTemplate
title: $:/sib/Templates/Automatic/Subtiddler
@@ -10,6 +10,7 @@ type: text/vnd.tiddlywiki
\define expand-siblings() <$action-setfield $tiddler="$:/temp/ShowSiblings" $index=<<currentTiddler>> $value="yes" />
\define contract-siblings() <$action-setfield $tiddler="$:/temp/ShowSiblings" $index=<<currentTiddler>> $value="no" />
\define siblings-filter() [prefix<parentTiddlerPlusSlash>!match<currentTiddler>]
<$list filter="[all[current]!is[system]regexp:title[/]]" variable=_>
<$set name="parentTiddler" value={{{ [all[current]split[/]butlast[]join[/]] }}}>
@@ -18,11 +19,13 @@ type: text/vnd.tiddlywiki
This is a subtiddler of <$link to=<<parentTiddler>>/>.<br>
<$reveal stateTitle="$:/temp/ShowSiblings" stateIndex=<<currentTiddler>> type="nomatch" text="yes">
<$button class="tc-btn-invisible tc-tiddlylink" actions=<<expand-siblings>>>{{$:/core/images/right-arrow}} Siblings of this subtiddler</$button>
<$list filter="[prefix<parentTiddlerPlusSlash>!match<currentTiddler>first[]]" variable=_ emptyMessage="This is the only subtiddler.">
<$button class="tc-btn-invisible tc-tiddlylink" actions=<<expand-siblings>>>{{$:/core/images/right-arrow}} Siblings of this subtiddler</$button> (<$count filter=<<siblings-filter>>/>)
</$list>
</$reveal>
<$reveal stateTitle="$:/temp/ShowSiblings" stateIndex=<<currentTiddler>> type="match" text="yes">
<$button class="tc-btn-invisible tc-tiddlylink" actions=<<contract-siblings>>>{{$:/core/images/down-arrow}} Siblings of this subtiddler:</$button><br>
<$list filter="[prefix<parentTiddlerPlusSlash>]">
<$list filter=<<siblings-filter>>>
<$link to=<<currentTiddler>>><$text text={{{ [<currentTiddler>removeprefix<parentTiddlerPlusSlash>] }}}/></$link><br>
</$list>
</$reveal>

View File

@@ -10,7 +10,7 @@ import sys
from typing import Any, Callable, Dict, NoReturn
TZK_VERSION = "0.1.5"
TZK_VERSION = "0.2.0"
class BuildError(Exception):