-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patharchive_bootstrappers.py
More file actions
29 lines (24 loc) · 953 Bytes
/
archive_bootstrappers.py
File metadata and controls
29 lines (24 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright 2025 Braden Ganetsky
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
import datetime
from pathlib import Path
from get_install_args import scrape_bootstrappers
def main():
bootstrappers = (
scrape_bootstrappers(16) |
scrape_bootstrappers(17) |
scrape_bootstrappers(18)
)
script_dir = Path(__file__).resolve().parent
out_path = script_dir / "generated/bootstrappers.py"
Path(out_path).parent.mkdir(parents=True, exist_ok=True)
with open(out_path, "w") as file:
timestamp = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%S")
file.write(f"# Generated on {timestamp}\n")
file.write("bootstrappers = {\n")
for k,v in bootstrappers.items():
file.write(f""" "{k}": "{v}",\n""")
file.write("}\n")
if __name__ == "__main__":
main()