-
Notifications
You must be signed in to change notification settings - Fork 385
Expand file tree
/
Copy pathjustfile
More file actions
42 lines (35 loc) · 1.2 KB
/
justfile
File metadata and controls
42 lines (35 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
set script-interpreter := ['uv', 'run', '--script']
@_default:
just -l
echo -e "\npython:"
just -l python
# Call recipes from the Python library
mod python
# Run checks
check:
make check
# Upgrade Hugo to new version in Github workflows & README
upgrade-hugo-version VERSION:
sed -i 's/HUGO_VERSION: .*$/HUGO_VERSION: {{VERSION}}/' .github/workflows/*.yml
sed -i 's/Hugo [0-9.]\+/Hugo {{VERSION}}/' README.md README_detailed.md
sed -i 's/hugo >= [0-9.]\+/hugo >= {{VERSION}}/' README.md
# Build site and serve via Hugo's webserver
serve ENV='development' NOBIB='true':
make NOBIB={{NOBIB}} static hugo_data bib
cd build/ && hugo server --environment {{ENV}}
# Fetch an Anthology item and print it
[script]
print ANTHOLOGYID:
from acl_anthology import Anthology
from rich import print
item = Anthology.from_within_repo().get("{{ANTHOLOGYID}}")
print(item)
# Fetch an Anthology item and print its XML representation
[script]
print-xml ANTHOLOGYID:
from acl_anthology import Anthology
from acl_anthology.utils.xml import indent
from lxml import etree
item = Anthology.from_within_repo().get("{{ANTHOLOGYID}}").to_xml()
indent(item)
print(etree.tostring(item, encoding="utf-8").decode())