Compare commits

...

2 Commits

Author SHA1 Message Date
41feb179b2 Merge pull request 'feat: move internal activities file generation to internal folder' (#5030) from feat/activities-subdir into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #5030
2025-05-17 14:58:58 +00:00
Darragh Elliott
ffefe38f41 feat: move internal activities file generation to internal folder
All checks were successful
continuous-integration/drone/pr Build is passing
no functional changes, but code slightly cleaner
also rework gitignores slightly to reflect site structure better
2025-05-17 15:48:33 +01:00
7 changed files with 27 additions and 24 deletions

16
.gitignore vendored
View File

@ -1,21 +1,8 @@
*/look/fsfe.min.css
*/look/valentine.min.css
fsfe.org/events/????/index.??.xhtml
fsfe.org/events/????/index.sources
fsfe.org/events/????/index.xsl
fsfe.org/news/????/index.??.xhtml
fsfe.org/news/????/index.sources
fsfe.org/news/????/index.xsl
fsfe.org/news/*/.*.??.xml
global/data/texts/.texts.??.xml
global/data/topbanner/.topbanner.??.xml
.default.xsl
.localmenu.*.xml
.*.xmllist
fsfe.org/search/index.js
fsfe.org/tags/tagged-*.??.xhtml
fsfe.org/tags/.tags.??.xml
global/data/modules/fsfe-activities-options.en.xml
# Local build stuff
output
# Python venv
@ -24,9 +11,6 @@ __pycache__
#Nltk
.nltk_data
## Status dir stuff
status.fsfe.org/*/data*/*
# Secrets
# docker compose
.env

View File

@ -13,7 +13,6 @@
import logging
import multiprocessing
from .create_activities_file import create_activities_file
from .global_symlinks import global_symlinks
from .index_website import index_websites
from .prepare_subdirectories import prepare_subdirectories
@ -33,11 +32,6 @@ def phase1_run(languages: list[str], processes: int, pool: multiprocessing.Pool)
"""
logger.info("Starting Phase 1 - Setup")
# -----------------------------------------------------------------------------
# Create XML activities file
# -----------------------------------------------------------------------------
create_activities_file()
# -----------------------------------------------------------------------------
# Build search index
# -----------------------------------------------------------------------------

18
fsfe.org/.gitignore vendored Normal file
View File

@ -0,0 +1,18 @@
# css
look/fsfe.min.css
look/valentine.min.css
# automatically generate subdirectory stuff
events/????/index.??.xhtml
events/????/index.sources
events/????/index.xsl
news/????/index.??.xhtml
news/????/index.sources
news/????/index.xsl
news/*/.*.??.xml
# search index
search/index.js
#tags
tags/tagged-*.??.xhtml
tags/.tags.??.xml
# internal activities file
internal/fsfe-activities-options.*.xml

View File

@ -0,0 +1 @@
fsfe.org/internal/fsfe-:[]

View File

@ -0,0 +1 @@
fsfe.org/internal/fsfe-:[]

View File

@ -15,7 +15,10 @@ from build.lib.misc import update_if_changed
logger = logging.getLogger(__name__)
def create_activities_file() -> None:
def run(languages: list[str], processes: int, working_dir: Path) -> None:
"""
Internal subdir preparation
"""
logger.info("Creating activities file")
raw_url = urlparse(
"https://git.fsfe.org/FSFE/activities/raw/branch/master/activities.csv"
@ -55,6 +58,6 @@ def create_activities_file() -> None:
option.text = f"{tag} ({description})"
update_if_changed(
Path("global/data/modules/fsfe-activities-options.en.xml"),
working_dir.joinpath("fsfe-activities-options.en.xml"),
etree.tostring(page, encoding="utf-8").decode("utf-8"),
)

2
status.fsfe.org/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
## Status dir stuff
*/data*/*