docs: fix all end of file newlines
ClusterFuzzLite batch fuzzing / BatchFuzzing (address) (push) Has been cancelled
ClusterFuzzLite batch fuzzing / BatchFuzzing (memory) (push) Has been cancelled
ClusterFuzzLite batch fuzzing / BatchFuzzing (undefined) (push) Has been cancelled
Build all targets / Scan for Board Targets (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_fmu-v5_default) (push) Has been cancelled
Checks / build (NO_NINJA_BUILD=1 px4_sitl_default) (push) Has been cancelled
Checks / build (check_format) (push) Has been cancelled
Checks / build (check_newlines) (push) Has been cancelled
Checks / build (module_documentation) (push) Has been cancelled
Checks / build (px4_fmu-v2_default stack_check) (push) Has been cancelled
Checks / build (px4_sitl_allyes) (push) Has been cancelled
Checks / build (shellcheck_all) (push) Has been cancelled
Checks / build (tests) (push) Has been cancelled
Checks / build (tests_coverage) (push) Has been cancelled
Checks / build (validate_module_configs) (push) Has been cancelled
Clang Tidy / build (push) Has been cancelled
MacOS build / build (px4_fmu-v5_default) (push) Has been cancelled
MacOS build / build (px4_sitl) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:22.04) (push) Has been cancelled
Ubuntu environment build / Build and Test (ubuntu:24.04) (push) Has been cancelled
Container build / Set Tags and Variables (push) Has been cancelled
Docs - Crowdin - Upload Guide sources (en) / upload-to-crowdin (push) Has been cancelled
Docs - Deploy PX4 User Guide / build (push) Has been cancelled
EKF Update Change Indicator / unit_tests (push) Has been cancelled
Failsafe Simulator Build / build (failsafe_web) (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v5x (push) Has been cancelled
FLASH usage analysis / Analyzing px4_fmu-v6x (push) Has been cancelled
ITCM check / Checking nxp_tropic-community (push) Has been cancelled
ITCM check / Checking px4_fmu-v5x (push) Has been cancelled
ITCM check / Checking px4_fmu-v6xrt (push) Has been cancelled
MAVROS Mission Tests / build (map[mission:MC_mission_box vehicle:iris]) (push) Has been cancelled
MAVROS Mission Tests / build (map[mission:rover_mission_1 vehicle:rover]) (push) Has been cancelled
MAVROS Offboard Tests / build (map[test_file:mavros_posix_tests_offboard_posctl.test vehicle:iris]) (push) Has been cancelled
Nuttx Target with extra env config / build (px4_fmu-v5_default) (push) Has been cancelled
Python CI Checks / build (push) Has been cancelled
ROS Integration Tests / build (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:humble ubuntu:jammy]) (push) Has been cancelled
ROS Translation Node Tests / Build and test (map[ros_version:jazzy ubuntu:noble]) (push) Has been cancelled
SITL Tests / Testing PX4 tailsitter (push) Has been cancelled
SITL Tests / Testing PX4 iris (push) Has been cancelled
SITL Tests / Testing PX4 standard_vtol (push) Has been cancelled
Build all targets / Build Group [${{ matrix.group }}][${{ matrix.arch == 'nuttx' && 'x86' || 'arm64' }}] (push) Has been cancelled
Build all targets / Upload Artifacts to S3 (push) Has been cancelled
Build all targets / Create Release and Upload Artifacts (push) Has been cancelled
Container build / Build Container (amd64) (push) Has been cancelled
Container build / Build Container (arm64) (push) Has been cancelled
Container build / Deploy To Registry (push) Has been cancelled
Docs - Deploy PX4 User Guide / deploy (push) Has been cancelled
FLASH usage analysis / Publish Results (push) Has been cancelled
Docs - Crowdin - Download Guide Translations / Synchronize with Crowdin (ko) (push) Has been cancelled
Docs - Crowdin - Download Guide Translations / Synchronize with Crowdin (uk) (push) Has been cancelled
Docs - Crowdin - Download Guide Translations / Synchronize with Crowdin (zh-CN) (push) Has been cancelled
Handle stale issues and PRs / stale (push) Has been cancelled

Note: Some files are autogenerated and I did not yet
go through each source of generation to fix it there.
Instead I adjusted the filter to only exclude those
such that we can fix things in steps.
This commit is contained in:
Matthias Grob
2025-03-18 11:28:14 +01:00
committed by Ramon Roche
parent e9bac962ab
commit 2bc04f91f8
90 changed files with 173 additions and 193 deletions
+11 -12
View File
@@ -19,7 +19,7 @@ include_dirs = set(['en','zh','ko','uk']) #update for new language builds.
exclude_dirs = set(['.vitepress','node_modules']) #update for new language builds.
my_parser = argparse.ArgumentParser(description='Generate sitemap for all markdown files in directory (default to main for output)')
# Add the arguments
# Add the arguments
my_parser.add_argument('-v',
'--version',
action='store',
@@ -45,18 +45,18 @@ build_version = args.version
BRANCH_NAME = os.getenv('BRANCH_NAME')
if BRANCH_NAME:
build_version=BRANCH_NAME
url_prefix = 'https://docs.px4.io/%s' % build_version
sitemapitems=[]
for subdir, dirs, files in os.walk(dir_name, topdown=True):
if subdir == '.':
#print("RootFile: %s" % originalfile)
#Handle a root file.
continue
# Check if any of the include directories is in the subdir path
if any(f"/{inc_dir}/" in subdir or f"\\{inc_dir}\\" in subdir for inc_dir in include_dirs):
pass
@@ -67,7 +67,7 @@ for subdir, dirs, files in os.walk(dir_name, topdown=True):
if any(f"/{ex_dir}/" in subdir or f"\\{ex_dir}\\" in subdir for ex_dir in exclude_dirs):
continue
#print(f"SUBDIR Ex: {subdir}")
for file in files:
#print(f"xxDebug: {file}")
@@ -76,7 +76,7 @@ for subdir, dirs, files in os.walk(dir_name, topdown=True):
if not file.endswith('.md'): #only process md files.
#print(f"Skip: {file} (not md)")
continue
originalfile=subdir+'\\'+file
dir_name=subdir[2:].replace('\\','/')
orig_file_forwardslash=originalfile.replace('\\','/')
@@ -98,10 +98,10 @@ for subdir, dirs, files in os.walk(dir_name, topdown=True):
#print("Subdir: %s" % subdir )
#print("file_name: %s" % file_name)
#print(sitemapitem['url'])
sitemapitems.append(sitemapitem)
# Generate the sitemap from the sitemapitems
all_sitemap_item_text = ""
for item in sitemapitems:
@@ -112,7 +112,7 @@ for item in sitemapitems:
if args.date:
sitemap_item_text+=f" <lastmod>{item['modified']}</lastmod>\n"
sitemap_item_text+=' </url>\n'
all_sitemap_item_text+=sitemap_item_text
sitemaptext = '''<?xml version="1.0" encoding="UTF-8"?>
@@ -122,11 +122,10 @@ sitemaptext = '''<?xml version="1.0" encoding="UTF-8"?>
# Write the sitemap to file
outputfile=args.output+'sitemap.xml'
with open(outputfile,"w") as f:
with open(outputfile,"w") as f:
f.write(sitemaptext)
print("Sitemap generated to: %s" % outputfile)
#print("BRANCH_NAME: %s" % BRANCH_NAME)
#print("Build version: %s" % build_version)