It is possible that a private person is linked to in a tiddler with the
syntax `[[Jane|MsJaneDoe]]`.
Up to now, the text of the link was not redacted, which could lead to
unintentional privacy leaks.
Therefore, a new parameter `replace_link_text` is introduced for the
`replace_private_people` builder.
When that is set to True, then the link text is also replaced with the
initials.
Signed-off-by: Jacob Kiers <code@kiers.eu>
The previous method occasionally gave incorrect results because it
performed replacements on an entire line, rather than on individual
instances of the text to replace. This usually worked fine, but in rare
cases could create wrong/ugly output, and with future improvements to
what can be replaced could end up causing leaks.
This was a royal PITA to get working, but I'm fairly sure it's correct
now due to all the doctests. Please add more if you find any regressions
or think of cases that aren't covered.
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>
Because the 'line' variable was already bound in the outer loop, changes
to the line in the inner loop were lost in subsequent inner-loop
iterations, if required. Change to always indexing the array (which is
defined outside the scope of the loops) directly on every reference.
(This is why it's usually best not to modify things while looping over
them. Maybe a refactor could be in order.)
Otherwise files that have been removed will still show up in the wheel
-- but not in the source distribution -- which is super confusing and
wrong. No idea why Python doesn't check this itself.
5065efd3 incorrectly changed to doing an rmtree of the entire target
since that was what editionify needed. Editionify should clean the
target directory, but the single HTML file build should not (it ended up
wiping my git repository from my hard drive). We might wish to revisit
this particular fix in the future since it still fails to delete removed
extimages, but this doesn't seem like a big deal.
Better for people to set up their own scheme if they want one, and it
avoids tiddlers potentially being in two different places (since
FileSystemPaths isn't honored during an init/savewikifolder).
Although this is automatically generated, it represents a critical part
of the content of the edition which cannot be created from the content
in the repository (it's generated from a private directory on my
computer), so at this point it is appropriate to check it in.
The interface isn't the cleanest (it'd probably be better to map from
tiddlers to a set of fields, rather than having a different set of
mappings for each field), but it will do for now. Needing more
than a few of these is a Zettelkasten-design smell anyway.