summaryrefslogtreecommitdiffstats
path: root/TODO
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-07 01:08:31 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-07 14:26:31 +0200
commita9fbbd5dca1f39e9eafc8ddf8ada30dffd68e4df (patch)
treef5b141539d5972280958b4aa03f9492e17cb4f54 /TODO
parent948de609900745835656d4566a90fee64c5343da (diff)
downloadqpdf-a9fbbd5dca1f39e9eafc8ddf8ada30dffd68e4df.tar.zst
Objectinfo json: write incrementally and in numeric order
This script was used on test data: ---------- #!/usr/bin/env python3 import json import sys import re def json_dumps(data): return json.dumps(data, ensure_ascii=False, indent=2, separators=(',', ': ')) for filename in sys.argv[1:]: with open(filename, 'r') as f: data = json.loads(f.read()) if 'objectinfo' not in data: continue trailer = None to_sort = [] for k, v in data['objectinfo'].items(): if k == 'trailer': trailer = v else: m = re.match(r'^(\d+) \d+ R', k) if m: to_sort.append([int(m.group(1)), k, v]) newobjectinfo = {x[1]: x[2] for x in sorted(to_sort)} if trailer is not None: newobjectinfo['trailer'] = trailer data['objectinfo'] = newobjectinfo print(json_dumps(data)) ----------
Diffstat (limited to 'TODO')
-rw-r--r--TODO10
1 files changed, 0 insertions, 10 deletions
diff --git a/TODO b/TODO
index d33141ba..7ec4085e 100644
--- a/TODO
+++ b/TODO
@@ -48,16 +48,6 @@ Soon: Break ground on "Document-level work"
Output JSON v2
==============
-Before starting on v2 format:
-
-* Writing objects should write in numerical order with the trailer at
- the end.
-
-* Having QPDFJob call these methods will change output ordering. We
- should fix the json test outputs manually (or programmatically from
- the input), not by overwriting, in case this has any unwanted side
- effects.
-
General things to remember:
* deprecate getJSON without a version