diff --git a/.gitignore b/.gitignore index 78d6a27..3d23a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -76,4 +76,7 @@ _site/ # DAR and HAR specific *.dar *.har +# Allow example files in samples/ +!samples/*.dar +!samples/*.har diff --git a/README.md b/README.md index a27ef2b..95feaa2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,12 @@ python tools/har_to_dar_converter.py input.har output.dar ### Examples -Check the `samples/` directory for example DAR files that demonstrate the extended capabilities of this format. Sample files include real-world use cases to help you get started quickly. +Check the `samples/` directory for example `.har` and `.dar` files. These samples let you try the converter and inspect DAR output immediately. To view them from the command line: + +```bash +less samples/example.har +jq '.' samples/example.dar +``` ## **DAR Schema Specification** diff --git a/samples/example.dar b/samples/example.dar new file mode 100644 index 0000000..6df4b66 --- /dev/null +++ b/samples/example.dar @@ -0,0 +1,22 @@ +{ + "log": { + "version": "1.4", + "creator": { + "name": "DAR Converter", + "version": "1.0" + }, + "renders": [ + { + "url": "https://example.com", + "status": "200", + "content": "...", + "time": "2024-09-05T12:00:00Z" + } + ], + "result": { + "summary": "Crawl completed successfully" + }, + "entries": [] + } +} + diff --git a/samples/example.har b/samples/example.har new file mode 100644 index 0000000..fdf357b --- /dev/null +++ b/samples/example.har @@ -0,0 +1,11 @@ +{ + "log": { + "version": "1.2", + "creator": { + "name": "Sample", + "version": "1.0" + }, + "entries": [] + } +} +