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

restore(chksum, choose_first=False)[source]

Restore mets.xml to previous state

add()[source]

Create a backup in <self.backup_directory>

list()[source]

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

undo()[source]

Restore to last version