The list_ct command uses this logic for listing CT:
for file in os.listdir(cache_path):
file_prefix = file.split("-")[0]
if file_prefix.endswith("ct") and (not subsets or file_prefix in subsets):
print(os.path.splitext(file)[0])
This will not find Define-XML CT packages, since those have a "-" in the package name: define-xmlct-2023-12-15.
This logic seems to work:
for file in os.listdir(cache_path):
file_prefix = file[0:file.find('ct-')+2]
if file_prefix.endswith("ct") and (not subsets or file_prefix in subsets):
print(os.path.splitext(file)[0])
The list_ct command uses this logic for listing CT:
This will not find Define-XML CT packages, since those have a "-" in the package name: define-xmlct-2023-12-15. This logic seems to work: