CTAN only provides API to query data for a single package: https://ctan.org/help/json/2.0/pkg.
This means to find all possible CTAN-to-TL package name mappings, the packages/data/scripts/generate-namemap.ts script has to query >2000 times in a cold run, making it slow (>10min). Warm run would get wrong results, because we don't know if any existing mappings would change.
I guess there is some non-public way to get such data as a whole. Maybe https://texlive.info/ already provides such way, but as of writing, this site is down.
Currently packages/data/scripts/generate-namemap.ts stores three caches under packages/data/build:
ctan-packages.json for list of CTAN packages names, returned by a query to https://ctan.org/help/json/2.0/packages
ctan-packages.jsonl for list of CTAN package data, by combining results of >2000 queries to https://ctan.org/help/json/2.0/pkg/<pkgname>
tlpdb.json for tlpdb
ctan-packages.jsonl is the only bottleneck.
The subdir packages/data/build is excluded from Git, due to a .gitignore in it, created by generate-namemap.ts.
CTAN only provides API to query data for a single package: https://ctan.org/help/json/2.0/pkg.
This means to find all possible CTAN-to-TL package name mappings, the
packages/data/scripts/generate-namemap.tsscript has to query >2000 times in a cold run, making it slow (>10min). Warm run would get wrong results, because we don't know if any existing mappings would change.I guess there is some non-public way to get such data as a whole. Maybe https://texlive.info/ already provides such way, but as of writing, this site is down.
Currently
packages/data/scripts/generate-namemap.tsstores three caches underpackages/data/build:ctan-packages.jsonfor list of CTAN packages names, returned by a query to https://ctan.org/help/json/2.0/packagesctan-packages.jsonlfor list of CTAN package data, by combining results of >2000 queries tohttps://ctan.org/help/json/2.0/pkg/<pkgname>tlpdb.jsonfor tlpdbctan-packages.jsonlis the only bottleneck.The subdir
packages/data/buildis excluded from Git, due to a.gitignorein it, created bygenerate-namemap.ts.