adjust explanation of restore-plugins situation

It was just me being dense...I was overwriting the existing plugins
array.
This commit is contained in:
Soren I. Bjornstad 2021-09-21 13:08:55 -05:00
parent a7bdd2397e
commit c335597b57
1 changed files with 5 additions and 5 deletions

View File

@ -122,11 +122,11 @@ def _init_tw(wiki_name: str) -> None:
def _restore_plugins(wiki_name: str) -> None: def _restore_plugins(wiki_name: str) -> None:
""" """
Add the plugins from the edition's tiddlywiki.info to the new wiki's Add the two plugins required for client-server operation to the existing
tiddlywiki.info (for some reason, this is not done automatically). Also ones in the edition, sort them in order, and replace the existing plugins
add the two plugins required for client-server operation. array in the tiddlywiki.info.
""" """
print("tzk: Adding plugins to tiddlywiki.info...") print("tzk: Configuring plugins in tiddlywiki.info...")
info_path = Path.cwd() / wiki_name / "tiddlywiki.info" info_path = Path.cwd() / wiki_name / "tiddlywiki.info"
edition_path = Path(__file__).parent / "editions" / "tzk" / "tiddlywiki.info" edition_path = Path(__file__).parent / "editions" / "tzk" / "tiddlywiki.info"
@ -135,7 +135,7 @@ def _restore_plugins(wiki_name: str) -> None:
info_data = json.load(f) info_data = json.load(f)
with edition_path.open("r") as f: with edition_path.open("r") as f:
edition_data = json.load(f) edition_data = json.load(f)
plugins = {"tiddlywiki/filesystem", "tiddlywiki/tiddlyweb"} plugins = {"tiddlywiki/filesystem", "tiddlywiki/tiddlyweb"}
plugins = plugins.union(edition_data['plugins']) plugins = plugins.union(edition_data['plugins'])
info_data['plugins'] = sorted(plugins) info_data['plugins'] = sorted(plugins)