dtar: add --list and --output options
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 200
- Forks
- 85
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 2
Description
The --list option would read the metadata from the archive, print a summary of its contents, and exit.
dtar --list foo.tar
[2021-01-26T16:55:13] Listing foo.tar
[2021-01-26T16:55:13] Read index foo.tar.dtaridx
[2021-01-26T16:55:13] Extracting metadata
[2021-01-26T16:55:13] Items: 11
[2021-01-26T16:55:13] Directories: 3
[2021-01-26T16:55:13] Files: 6
[2021-01-26T16:55:13] Links: 2
[2021-01-26T16:55:13] Data: 62.398 KiB (10.399 KiB per file)
The --output <file> option will write the file list to a file. This could be handy for processing the list by other tools without having to extract the archive.
dtar --list foo.tar --output list.mfu
dfind --input list.mfu ...
The --output option could be used with any of --list, --create, or --extract.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the dtar command-line option handling and trace the existing --create and --extract flows, then identify how archive metadata and file lists are read. Add the --list summary and --output behavior described in the issue, including compatibility with --create and --extract. Done means the shown listing works and output can be consumed by dfind.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100