Commit 0414a71b authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Add support for listing annotator configs

parent 9234ab61
...@@ -9,8 +9,8 @@ def resources(command_line_parameters = None): ...@@ -9,8 +9,8 @@ def resources(command_line_parameters = None):
import argparse import argparse
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--types", '-t', nargs = '+', parser.add_argument("--types", '-t', nargs = '+',
choices = ('d', 'database', 'p', 'preprocessor', 'e', 'extractor', 'a', 'algorithm', 'g', 'grid', 'c', 'config'), choices = ('d', 'database', 'p', 'preprocessor', 'e', 'extractor', 'a', 'algorithm', 'g', 'grid', 'c', 'config', 'an', 'annotator'),
default = ('d', 'p', 'e', 'a', 'g', 'c'), default = ('d', 'p', 'e', 'a', 'g', 'c', 'an'),
help = "Select the resource types that should be listed.") help = "Select the resource types that should be listed.")
parser.add_argument("--details", '-d', action='store_true', help = "Prints the complete configuration for all resources") parser.add_argument("--details", '-d', action='store_true', help = "Prints the complete configuration for all resources")
...@@ -51,6 +51,10 @@ def resources(command_line_parameters = None): ...@@ -51,6 +51,10 @@ def resources(command_line_parameters = None):
print ("\nList of registered configurations:") print ("\nList of registered configurations:")
print (bob.bio.base.list_resources('config', **kwargs)) print (bob.bio.base.list_resources('config', **kwargs))
if 'an' in args.types or 'annotator' in args.types:
print ("\nList of registered annotators:")
print (bob.bio.base.list_resources('annotator', **kwargs))
print() print()
def databases(command_line_parameters = None): def databases(command_line_parameters = None):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment