ocrd.workspace_backup module

class ocrd.workspace_backup.WorkspaceBackup(chksum, lastmod, size, mets_xml)[source]

Bases: object

classmethod from_path(d)[source]
class ocrd.workspace_backup.WorkspaceBackupManager(workspace)[source]

Bases: object

Manages backups of a workspace in a directory BACKUP_DIR

add()[source]

Create a backup in <self.backup_directory>

list()[source]

List all backups as WorkspaceBackup objects, sorted descending by lastmod.

restore(chksum, choose_first=False)[source]

Restore mets.xml to previous state

undo()[source]

Restore to last version