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 ascolumn_names).
Read the source for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2a1b8cd5ecf86f428200820c4f7c0f402b264b9c65fbea11d58122d850247a3
|
|
| MD5 |
c756fa7bb89f70edb39aac0a707c54e9
|
|
| BLAKE2b-256 |
f9c5f2dc9f2bc7bb628e052a8cdda8391821b50f1461577b9caee3baad4e3a91
|
File details
Details for the file dotclear_backup_parser-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dotclear_backup_parser-0.0.1-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bde7fc39046b6d1fed06a5a75ac4a32f98904d0787535ce473c905224b0f0948
|
|
| MD5 |
3b5b11f8ac5232e2033de80d392da5de
|
|
| BLAKE2b-256 |
a0b96f1fd4d49f78bc8a583827c7caaba012cf46e951d127130944d6be65e558
|