mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 08:26:12 +02:00
update commands to use python for win compat
This commit is contained in:
parent
2bff21432d
commit
aabae4e0fc
1 changed files with 8 additions and 1 deletions
|
@ -53,6 +53,7 @@ pytest = ">=6.2"
|
|||
pytest-bdd = ">=4.0.1,<6.0"
|
||||
pytest-clarity = "*"
|
||||
pytest-xdist = ">=2.5.0"
|
||||
requests = "*"
|
||||
toml = ">=0.10"
|
||||
tox = "*"
|
||||
yq = "*"
|
||||
|
@ -68,7 +69,13 @@ 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-sitemap.interpreter = "python"
|
||||
script-generate-sitemap.shell = '''
|
||||
import requests
|
||||
sitemap = requests.get("http://127.0.0.1:8000/sitemap.xml")
|
||||
with open('sitemap.xml', 'wb+') as f:
|
||||
f.write(sitemap.content)
|
||||
'''
|
||||
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]}'
|
||||
poetry run xq "$select" sitemap.xml > list.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue