Compare commits

...

2 Commits

Author SHA1 Message Date
gauthiier
2e2da08a09 fetches 2025-09-21 07:32:21 +02:00
gauthiier
5ed1a6ebd7 citeproc 2025-09-21 07:24:54 +02:00
5 changed files with 22 additions and 7 deletions

4
.gitignore vendored
View File

@ -1,7 +1,7 @@
conf.yml conf.yml
public/ public/
content/events content/events/
content/bibliography content/bibliography/
# ---> macOS # ---> macOS
# General # General

View File

@ -2,9 +2,22 @@
Site logics of "Mathematics & Artifice" Site logics of "Mathematics & Artifice"
''' Setup:
```
> python -m venv venv > python -m venv venv
> source venv/bin/activate > source venv/bin/activate
> pip install -r requirements.txt > pip install -r requirements.txt
> python make.py > python make.py
''' ```
Fetch bibliography (make sure conf.yml is set/valid):
```
> python fetch_bib.py
> python make.py
```
Fetch events (make sure conf.yml is set/valid):
```
> python fetch_ics.py
> python make.py
```

View File

@ -62,7 +62,7 @@ if __name__ == "__main__":
fm_date = e.begin.format(DFMT) fm_date = e.begin.format(DFMT)
fm_date_interval = f"{e.begin.format(DHFMT)}-{e.end.format(HFMT)}" fm_date_interval = f"{e.begin.format(DHFMT)}-{e.end.format(HFMT)}"
filename = f'{fm_date}-{name}.md' filename = f'{fm_date}-{name}.md'
filepath = pathlib.Path(conf['content']) / 'event' / filename filepath = pathlib.Path(conf['content']) / 'events' / filename
if not filepath.exists(): if not filepath.exists():
print(f"new event: {e.name}") print(f"new event: {e.name}")

View File

@ -55,11 +55,11 @@ if __name__ == "__main__":
events_dir = content_dir / 'events' events_dir = content_dir / 'events'
upcoming_events = [] upcoming_events = []
previous_events = [] previous_events = []
if not events_dir.exists(): if not events_dir.exists():
print("path content/events does not exist.") print("path content/events does not exist.")
else: else:
events = list(utils.get_files_in_subdir(conf['content'], 'event', 'md').values()) events = list(utils.get_files_in_subdir(conf['content'], 'events', 'md').values())
for e in events: for e in events:
p = frontmatter.load(e) p = frontmatter.load(e)
summary = f"{p['title']} - {p['date']}" summary = f"{p['title']} - {p['date']}"

View File

@ -3,10 +3,12 @@ attrs==24.2.0
bibtexparser==1.4.2 bibtexparser==1.4.2
certifi==2024.8.30 certifi==2024.8.30
charset-normalizer==3.3.2 charset-normalizer==3.3.2
citeproc-py==0.6.0
feedparser==6.0.11 feedparser==6.0.11
ics==0.7.2 ics==0.7.2
idna==3.10 idna==3.10
Jinja2==3.1.4 Jinja2==3.1.4
lxml==5.3.0
Markdown==3.7 Markdown==3.7
MarkupSafe==2.1.5 MarkupSafe==2.1.5
pyparsing==3.1.4 pyparsing==3.1.4