On Wed Dec 15, 2021 at 9:32 PM CET, Aditya Mahajan via ntg-context wrote:
i never came to a 'download option' because it was ot clear where to download from .. are there zips?
Not sure if it's for every package, but should be just
"http://mirrors.ctan.org/" .. data.ctan.path .. ".zip"
in scripts.ctan.details.
This corresponds the "Download" link on the CTAN page of each package, but unfortunately, is not always in TDS format. For example, for pgf (which is locate at /graphics/pgf/base), we have
https://mirrors.ctan.org/graphics/pgf/base.zip
which lists all tex related files in base/tex sub-directory. The CTAN page (https://www.ctan.org/pkg/pgf) also has a field "TDS Archive", which lists:
http://mirrors.ctan.org/install/graphics/pgf/base/pgf.tds.zip
which is TDS compliant. The same is the case for circuitikz and pgfplots. So, it safer to use
"http://mirrors.ctan.org/" .. data.ctan.path .. "/" .. pkg_name .. "tds.zip"
But, for context packages, CTAN does nto have the tds zips (I guess because the default zip is already TDS compliant). For example:
https://www.ctan.org/pkg/context-filter
has the "download" link at the bottom but not the "TDS Archive" link.
In the end, since I am only installing 4-5 packages, it is simpler to input the URLs but hand rather than write code to automate the logic.
Oops, sorry, I completely forgot to mention that indeed what I mention corresponds to the download link on the package page, which in general "shouldn't be" in TDS format. Only packages whose authors upload their own TDS zip have these .tds.zip files you found:
From https://www.ctan.org/help/upload-pkg: The CTAN team has decided that packages on the archive shall remain in a browsing-friendly layout, i.e. the best format is to have all the files inside a directory. Very large packages – such as modern font distributions – are improved by a single extra layer of directories.
In parallel to the main directory tree, CTAN offers possibility to provide a TDS-structured ZIP file. Such a file will only be accepted as an addition to your upload, not as a replacement.
This file is not necessary at all for simple packages. Thus it should be omitted for instance for normal LaTeX packages. This file might be required when the package is complex.
Michal Vlasák