https://github.com/rythenglyth/dly-parser
A tool and Node.js package to parse immanens' DLY container files.
https://github.com/rythenglyth/dly-parser
container delivery delivery-reader deliveryreader dly dly-container file fileformat immanens parser
Last synced: 6 months ago
JSON representation
A tool and Node.js package to parse immanens' DLY container files.
- Host: GitHub
- URL: https://github.com/rythenglyth/dly-parser
- Owner: RythenGlyth
- Created: 2024-04-20T00:06:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-20T00:42:47.000Z (over 1 year ago)
- Last Synced: 2025-03-29T04:51:11.701Z (7 months ago)
- Topics: container, delivery, delivery-reader, deliveryreader, dly, dly-container, file, fileformat, immanens, parser
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DLY-Parser
A tool and Node.js package to parse immanens' DLY container files.
These files are used by immanens' Delivery Reader.
The files start with the magic bytes `DLY` and contain a header followed by a list of files.
# Command Line Usage
Install the package globally:
```sh
npm install -g dly-parser
```Then you can use the `dly-parser` command:
```sh
dly-parser --help
```## Examples
View information about a DLY container:
```sh
dly-parser info path/to/container.dly
```List files in a DLY container:
```sh
dly-parser list path/to/container.dly # List all filesdly-parser list path/to/container.dly --full # Show more information about each file
dly-parser list path/to/container.dly --extension pdf # Only files with the .pdf extension
dly-parser list path/to/container.dly --regex ".*\.(pdf|jpg)" # Only files with the .pdf or .jpg extension
```Extract files from a DLY container:
```sh
dly-parser extract path/to/container.dly -o path/to/output/directory --all # Extract all filesdly-parser extract path/to/container.dly -o path/to/output/directory --extension pdf # Only extract files with the .pdf extension
dly-parser extract path/to/container.dly -o path/to/output/directory --regex ".*\.(pdf|jpg)" # Only extract files with the .pdf or .jpg extension
dly-parser extract path/to/container.dly -o path/to/output/directory --index 0,1,2 # Only extract files at the specified indices
dly-parser extract path/to/container.dly -o path/to/output/directory --index 0,1,2 --extension pdf # Only extract files that are at the specified indices or have the .pdf extension
dly-parser extract path/to/container.dly -o path/to/output/directory --index 0,1,2 --extension pdf --filter-all # Only extract files that are at the specified indices and have the .pdf extension
```# Node.js Usage
Install the package as a dependency:
```sh
npm install dly-parser
```Then you can use the package in your code:
```js
import { DLYContainer, DLYContainerProviderFS } from 'dly-parser';const container = new DLYContainer(new DLYContainerProviderFS('path/to/container.dly'));
const header = await dly.parseHeader()
console.log(`Format-Version: ${header.archiveVersion & 0x0000FFFF}.${(header.archiveVersion & 0xFFFF0000) >> 16}`)
```Have a look at the [cli.ts](src/cli.ts) file as an example.
# Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.