replace nix-specific call with python version (for windows compat)

This commit is contained in:
Jonathan Wren 2022-08-13 16:11:50 -07:00
parent b3351b1e1f
commit 2bff21432d

View file

@ -61,7 +61,13 @@ yq = "*"
jrnl = 'jrnl.cli:cli'
[tool.poe.tasks]
script-clean-docs.shell = "rm -fv sitemap.xml list.json"
script-clean-docs.interpreter = "python"
script-clean-docs.shell = """
import pathlib
files = ["sitemap.xml", "list.json"]
for f in files:
pathlib.Path(f).unlink(missing_ok=True)
"""
script-generate-sitemap.shell = 'curl -s "127.0.0.1:8000/sitemap.xml" > sitemap.xml'
script-generate-page-list-from-sitemap.shell = '''
select='{urls: ["http://127.0.0.1:8000/", "http://127.0.0.1:8000/search.html?q=jrnl", .urlset.url[].loc]}'