default=False, help="List all freely available sources")
parser.add_argument("--enabled", action="store_true",
help="List all enabled sources")
+ parser.add_argument("--all", action="store_true",
+ help="List all sources (including deprecated)")
parser.set_defaults(func=list_sources)
def list_sources():
is_not_free = source.get("subscribe-url")
if free_only and is_not_free:
continue
+ deprecated = source.get("deprecated")
+ if deprecated is not None and not config.args().all:
+ continue
print("%s: %s" % (util.bright_cyan("Name"), util.bright_magenta(name)))
print(" %s: %s" % (
util.bright_cyan("Vendor"), util.bright_magenta(source["vendor"])))
print(" %s: %s" % (
util.bright_cyan("Subscription"),
util.bright_magenta(source["subscribe-url"])))
+ if "deprecated" in source:
+ print(" %s: %s" % (
+ util.orange("Deprecated"),
+ util.bright_magenta(source["deprecated"])))
checksum = True
url = (index.resolve_url(name, params), http_header,
checksum)
+ if "deprecated" in source_config:
+ logger.warn("Source has been deprecated: %s: %s" % (
+ name, source_config["deprecated"]))
logger.debug("Resolved source %s to URL %s.", name, url[0])
urls.append(url)
def bright_cyan(msg):
return "%s%s%s" % (BRIGHT_CYAN, msg, RESET)
+
+def orange(msg):
+ return "%s%s%s" % (ORANGE, msg, RESET)