Delete services/manifest.py
This commit is contained in:
parent
a39ba7596a
commit
74f5bab0fe
1 changed files with 0 additions and 24 deletions
|
|
@ -1,24 +0,0 @@
|
|||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
def save_manifest(out_dir: Path, data: dict):
|
||||
manifest = {
|
||||
"conversion_time": time.time(),
|
||||
"format": data.get("format", "ept"), # était "version"
|
||||
"entry_file": data.get("entry_file"),
|
||||
"entry_type": data.get("entry_type"),
|
||||
"ept_dir": data.get("ept_dir"),
|
||||
}
|
||||
with open(out_dir / "manifest.json", 'w', encoding='utf-8') as f:
|
||||
json.dump(manifest, f, indent=2)
|
||||
|
||||
def read_manifest(out_dir: Path) -> dict:
|
||||
manifest_file = out_dir / "manifest.json"
|
||||
if not manifest_file.exists():
|
||||
return {}
|
||||
try:
|
||||
with open(manifest_file, 'r', encoding='utf-8') as f:
|
||||
return json.load(f)
|
||||
except:
|
||||
return {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue