Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberskull/cbz.sh
Simple script to create a cbz archive from a folder.
https://github.com/cyberskull/cbz.sh
comic-book-zip compression shell-script zip
Last synced: 2 months ago
JSON representation
Simple script to create a cbz archive from a folder.
- Host: GitHub
- URL: https://github.com/cyberskull/cbz.sh
- Owner: CyberSkull
- Created: 2013-08-24T10:55:59.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-08-01T04:01:07.000Z (6 months ago)
- Last Synced: 2024-08-09T17:30:04.096Z (5 months ago)
- Topics: comic-book-zip, compression, shell-script, zip
- Language: Shell
- Homepage:
- Size: 24.4 KB
- Stars: 23
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
*cbz.sh* is a simple command line shell script (zsh) to take a folder and turn it into a comic book zip archive (a zip archive with a `cbz` file name extension instead of `zip`).
### Dependancies
* `zsh` (orignally written for `bash`)
* `zip` (version 3)
* `afplay`### Process
`cbz.sh` takes a list of file, check to see if they are readable folders, then passes each one to `zip` to compress it. `zip` will compress using DEFLATE at the highest compression setting, test the archive to ensure it is properly constructed, then delete the original folder (if it is empty, any unzipped files will be left behind; see the excluded files list below) and then move on to the next.Finally, it will play a sound when finished.
### Usage
`cbz.sh` takes any kind of list of folders to convert to a cbz archive.```zsh
cbz.sh [-k] comic1 [comic2…]cbz.sh -h
```#### Examples
```zsh
cbz.sh "comic by some dude" ["another comic by that guy"…]cbz.sh comic*
```The `-k` flag can be used to keep the file instead of immediately removing them on success.
```zsh
cbz.sh -k comic1 [comic2…]
```
The `-h` flag will print the usage and exit.### Excluded files
* `.DS_Store` - Used by macOS to store folder metadata and appearance preferences.
* `Thumbs.db` - Used by Windows to store file preview thumbnails.