Skip to main content

Module to parse dotclear backup files.

Project description

dotclear-backup-parser

dotclear-backup-parser is a Python module to parse Dotclear backup files (like 2024-01-07-11-22-dotclear-backup.txt).

Note

As there are no format specification for dotclear backup format, there is no way to "validate" parsed data are correct. Please always check your data.

Example

You load the backup content in a parser object:

import dotclear_backup_parser

# Load dotclear backup content.
with open("2024-01-07-11-22-dotclear-backup.txt") as fp:
    parser = dotclear_backup_parser.load(fp)

Then you can iterate over tables found in the backup file:

for table in parser:
    
    print(table.name, len(table.rows))
    
    for column_name in table.column_names:
        
        print(f"  {column_name}")

Tables are DcBackupTable object having three properties:

  • name (str): Table name.
  • column_names (list[str]): Name of the columns of the table.
  • rows (list[list[str]]): List of rows, each row is a list of value (same length as column_names).

Read the source for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dotclear-backup-parser-0.0.1.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dotclear_backup_parser-0.0.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file dotclear-backup-parser-0.0.1.tar.gz.

File metadata

  • Download URL: dotclear-backup-parser-0.0.1.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for dotclear-backup-parser-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a2a1b8cd5ecf86f428200820c4f7c0f402b264b9c65fbea11d58122d850247a3
MD5 c756fa7bb89f70edb39aac0a707c54e9
BLAKE2b-256 f9c5f2dc9f2bc7bb628e052a8cdda8391821b50f1461577b9caee3baad4e3a91

See more details on using hashes here.

File details

Details for the file dotclear_backup_parser-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dotclear_backup_parser-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bde7fc39046b6d1fed06a5a75ac4a32f98904d0787535ce473c905224b0f0948
MD5 3b5b11f8ac5232e2033de80d392da5de
BLAKE2b-256 a0b96f1fd4d49f78bc8a583827c7caaba012cf46e951d127130944d6be65e558

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page