From 2bff21432d63aa6db363052a81fcebf1fe697d22 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 13 Aug 2022 16:11:50 -0700 Subject: [PATCH] replace nix-specific call with python version (for windows compat) --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2ebcb700..540d0bab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]}'