Skip to content

Commit

Permalink
ocrd workspace list-page
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Mar 24, 2019
1 parent 6d1920b commit b63638e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Versioned according to [Semantic Versioning](http://semver.org/).

## Unreleased

Added:

* `ocrd workspace list-page` to list all page IDs

## [1.0.0b6] - 2019-03-19

* `ocrd workspace set-id` case in argument error
Expand Down
14 changes: 14 additions & 0 deletions ocrd/ocrd/cli/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,20 @@ def list_groups(ctx):
workspace = Workspace(ctx.resolver, directory=ctx.directory)
print("\n".join(workspace.mets.file_groups))

# ----------------------------------------------------------------------
# ocrd workspace list-pages
# ----------------------------------------------------------------------

@workspace_cli.command('list-page', help="""
List page IDs
""")
@pass_workspace
def list_pages(ctx):
workspace = Workspace(ctx.resolver, directory=ctx.directory)
print("\n".join(workspace.mets.physical_pages))

# ----------------------------------------------------------------------
# ocrd workspace get-id
# ----------------------------------------------------------------------
Expand Down

0 comments on commit b63638e

Please sign in to comment.