This was removed from recent Node versions. Using 'npx' is the new way
and should resolve this issue.
I suppose we might run into someone who had a non-working npx and it
breaks, but we'll cross that bridge when we come to it; it works in my
testing and there are people broken in the current version.
This seems slightly dangerous because we're just applying the same
replacement logic and JSON has a much fussier syntax. However, if any
tiddlers end up invalid we should just get a build failure, so this
doesn't seem highly consequential.
Since we have to do raw links anyway in many cases, it doesn't really
make sense to use two different formats. This also gets around an edge
case where replacement produces invalid syntax if the person to be
replaced is linked within a macro, since the >> of privateperson then
terminates the outside macro -- given my increasing use of footnotes,
this isn't all that uncommon.
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.