Compare commits

..

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

5 changed files with 12 additions and 22 deletions

View File

@ -29,6 +29,6 @@ RUN pip install -r /website-source/requirements.txt
COPY . /website-source/ COPY . /website-source/
WORKDIR /website-source WORKDIR /website-source
ENTRYPOINT [ "bash", "./entrypoint.sh" ] ENTRYPOINT [ "bash", "./entrypoint.sh", "--full" ]

View File

@ -11,10 +11,7 @@ from urllib.parse import urlparse
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
raw_url = urlparse( raw_url = urlparse("https://git.fsfe.org/FSFE/activities/raw/branch/master/activities.csv")
"https://git.fsfe.org/FSFE/activities/raw/branch/master/activities.csv"
)
def create_activities_file(): def create_activities_file():
git_token = os.environ.get("GIT_TOKEN") git_token = os.environ.get("GIT_TOKEN")
@ -44,7 +41,7 @@ def create_activities_file():
if event: if event:
activities += f' data-event="{event}"' activities += f' data-event="{event}"'
activities += ">" activities += '>'
activities += f"{tag} ({description})" activities += f"{tag} ({description})"
activities += "</option>\n" activities += "</option>\n"

View File

@ -8,7 +8,7 @@ from pathlib import Path
import lxml.etree as etree import lxml.etree as etree
from build.lib.misc import get_basepath, update_if_changed from build.lib.misc import get_basepath
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -71,10 +71,7 @@ def _write_localmenus(
), ),
).text = localmenu.text ).text = localmenu.text
update_if_changed( page.getroottree().write(file, xml_declaration=True, encoding="utf-8")
file,
etree.tostring(page, encoding="utf-8").decode("utf-8"),
)
def update_localmenus(languages: list[str], pool: multiprocessing.Pool) -> None: def update_localmenus(languages: list[str], pool: multiprocessing.Pool) -> None:

View File

@ -127,7 +127,7 @@ def _check_xmllist_deps(file: Path) -> None:
xmls = set() xmls = set()
with file.open(mode="r") as fileobj: with file.open(mode="r") as fileobj:
for line in fileobj: for line in fileobj:
for newfile in Path("").glob(line.strip() + ".??.xml"): for newfile in Path("").glob(line + ".??.xml"):
xmls.add(newfile) xmls.add(newfile)
touch_if_newer_dep(file, list(xmls)) touch_if_newer_dep(file, list(xmls))

View File

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