for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import sys
import click
from ocrd_utils import initLogging
from ocrd_validators import OcrdZipValidator
from ..resource_manager import OcrdResourceManager
def print_resources(executable, reslist):
print('%s' % executable)
for resdict in reslist:
print('- %s (%s)\n %s' % (resdict['name'], resdict['url'], resdict['description']))
print()
@click.group("resmgr")
def resmgr_cli():
"""
Managing processor resources
initLogging()
@resmgr_cli.command('list-available')
@click.option('-e', '--executable', help='Show only resources for executable EXEC', metavar='EXEC')
def list_available(executable=None):
List available resources
resmgr = OcrdResourceManager()
for executable, reslist in resmgr.list_available(executable):
print_resources(executable, reslist)
@resmgr_cli.command('list-installed')
def list_installed(executable=None):
List installed resources
ret = []
for executable, reslist in resmgr.list_installed(executable):