Compare commits

..

No commits in common. "bafcb245f35fa0c66d39d45cb62a04d065255f24" and "7338784e3b5143e0d2fb01639ab58333685835ce" have entirely different histories.

2 changed files with 8 additions and 15 deletions

View File

@ -11,17 +11,14 @@ from urllib.parse import urlparse
logger = logging.getLogger(__name__)
raw_url = urlparse(
"https://git.fsfe.org/FSFE/activities/raw/branch/master/activities.csv"
)
raw_url = urlparse("https://git.fsfe.org/FSFE/activities/raw/branch/master/activities.csv")
def create_activities_file():
git_token = os.environ.get("GIT_TOKEN")
if git_token is None:
logger.warn("GIT_TOKEN is not set, skipping generation of activities file")
return
url = raw_url._replace(query=f"token={git_token}").geturl()
r = requests.get(url)
@ -43,11 +40,11 @@ def create_activities_file():
activities += f' <option value="{tag}||{description}"'
if event:
activities += f' data-event="{event}"'
activities += ">"
activities += '>'
activities += f"{tag} ({description})"
activities += "</option>\n"
content = f"""<?xml version="1.0" encoding="UTF-8"?>
<data>
@ -61,5 +58,5 @@ def create_activities_file():
activities_path = Path("global/data/modules/fsfe-activities-options.en.xml")
with open(activities_path, "w") as f:
f.write(content)
logger.info(f"Wrote activity file to {str(activities_path)}")
logger.info(f"Wrote activity file to {str(activities_path)}")

View File

@ -36,11 +36,7 @@ def _process_dir(languages: list[str], target: Path, dir: Path) -> None:
else basename.with_suffix(".en.xhtml")
),
processor,
(
source_file.parent.joinpath(
"." + basename.name
).with_suffix(".xmllist")
),
target_file.with_suffix("").with_suffix(".xmllist"),
Path(f"global/data/texts/.texts.{lang}.xml"),
Path(f"global/data/topbanner/.topbanner.{lang}.xml"),
Path("global/data/texts/texts.en.xml"),