From 0414a71b5d5dd0734f8c2d01687281ca3be484be Mon Sep 17 00:00:00 2001
From: Amir MOHAMMADI <amir.mohammadi@idiap.ch>
Date: Sun, 11 Mar 2018 11:43:53 +0100
Subject: [PATCH] Add support for listing annotator configs

---
 bob/bio/base/script/resources.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/bob/bio/base/script/resources.py b/bob/bio/base/script/resources.py
index 15fc0211..c68d6f22 100644
--- a/bob/bio/base/script/resources.py
+++ b/bob/bio/base/script/resources.py
@@ -9,8 +9,8 @@ def resources(command_line_parameters = None):
   import argparse
   parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
   parser.add_argument("--types", '-t', nargs = '+',
-                      choices = ('d', 'database', 'p', 'preprocessor', 'e', 'extractor', 'a', 'algorithm', 'g', 'grid', 'c', 'config'),
-                      default = ('d', 'p', 'e', 'a', 'g', 'c'),
+                      choices = ('d', 'database', 'p', 'preprocessor', 'e', 'extractor', 'a', 'algorithm', 'g', 'grid', 'c', 'config', 'an', 'annotator'),
+                      default = ('d', 'p', 'e', 'a', 'g', 'c', 'an'),
                       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")
@@ -51,6 +51,10 @@ def resources(command_line_parameters = None):
     print ("\nList of registered configurations:")
     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()
 
 def databases(command_line_parameters = None):
-- 
GitLab