mirror of
https://github.com/gen2brain/cbconvert
synced 2025-10-13 18:18:52 +02:00
Update README.md
This commit is contained in:
231
README.md
231
README.md
@@ -26,6 +26,23 @@ Download the latest binaries from the [releases](https://github.com/gen2brain/cb
|
|||||||
|
|
||||||
Linux Flatpak is available at [Flathub](https://flathub.org/apps/io.github.gen2brain.cbconvert).
|
Linux Flatpak is available at [Flathub](https://flathub.org/apps/io.github.gen2brain.cbconvert).
|
||||||
|
|
||||||
|
### Compile
|
||||||
|
|
||||||
|
You must have `CGO_ENABLED=1`. Note that `Go` will disable cgo when cross-compiling.
|
||||||
|
|
||||||
|
Install to `GOBIN` (you can point `GOBIN` to e.g. `/usr/local/bin` or `~/.local/bin`):
|
||||||
|
|
||||||
|
`go install github.com/gen2brain/cbconvert/cmd/cbconvert@latest`
|
||||||
|
|
||||||
|
For GUI app, check [IUP](https://github.com/gen2brain/iup-go) requirements, and then install:
|
||||||
|
|
||||||
|
`go install github.com/gen2brain/cbconvert/cmd/cbconvert-gui@latest`
|
||||||
|
|
||||||
|
### Build tags
|
||||||
|
|
||||||
|
* `extlib` - use external `libmupdf` and `libunarr` libraries
|
||||||
|
* `pkgconfig` - enable pkg-config (used with `extlib`)
|
||||||
|
|
||||||
### Using cbconvert in file managers to generate FreeDesktop thumbnails
|
### Using cbconvert in file managers to generate FreeDesktop thumbnails
|
||||||
|
|
||||||
Copy/install `cbconvert` cli binary to your `PATH`, create file `~/.local/share/thumbnailers/cbconvert.thumbnailer`
|
Copy/install `cbconvert` cli binary to your `PATH`, create file `~/.local/share/thumbnailers/cbconvert.thumbnailer`
|
||||||
@@ -39,115 +56,117 @@ This is what it looks like in the `PCManFM` file manager:
|
|||||||
### Using command line app
|
### Using command line app
|
||||||
|
|
||||||
```
|
```
|
||||||
Usage: cbconvert <command> [<flags>] [file1 dir1 ... fileOrDirN]
|
Usage: cbconvert <command> [<flags>] [file1 dir1 ... fileOrDirN]
|
||||||
|
|
||||||
|
|
||||||
Commands:
|
Commands:
|
||||||
|
|
||||||
convert
|
convert
|
||||||
Convert archive or document
|
Convert archive or document
|
||||||
|
|
||||||
--width
|
--width
|
||||||
Image width (default "0")
|
Image width (default "0")
|
||||||
--height
|
--height
|
||||||
Image height (default "0")
|
Image height (default "0")
|
||||||
--fit
|
--fit
|
||||||
Best fit for required width and height (default "false")
|
Best fit for required width and height (default "false")
|
||||||
--format
|
--format
|
||||||
Image format, valid values are jpeg, png, tiff, bmp, webp, avif, jxl (default "jpeg")
|
Image format, valid values are jpeg, png, tiff, bmp, webp, avif, jxl (default "jpeg")
|
||||||
--archive
|
--archive
|
||||||
Archive format, valid values are zip, tar (default "zip")
|
Archive format, valid values are zip, tar (default "zip")
|
||||||
--quality
|
--quality
|
||||||
Image quality (default "75")
|
Image quality (default "75")
|
||||||
--filter
|
--filter
|
||||||
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
|
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
|
||||||
--no-cover
|
--no-cover
|
||||||
Do not convert the cover image (default "false")
|
Do not convert the cover image (default "false")
|
||||||
--no-rgb
|
--no-rgb
|
||||||
Do not convert images that have RGB colorspace (default "false")
|
Do not convert images that have RGB colorspace (default "false")
|
||||||
--no-nonimage
|
--no-nonimage
|
||||||
Remove non-image files from the archive (default "false")
|
Remove non-image files from the archive (default "false")
|
||||||
--no-convert
|
--no-convert
|
||||||
Do not transform or convert images (default "false")
|
Do not transform or convert images (default "false")
|
||||||
--grayscale
|
--grayscale
|
||||||
Convert images to grayscale (monochromatic) (default "false")
|
Convert images to grayscale (monochromatic) (default "false")
|
||||||
--rotate
|
--rotate
|
||||||
Rotate images, valid values are 0, 90, 180, 270 (default "0")
|
Rotate images, valid values are 0, 90, 180, 270 (default "0")
|
||||||
--brightness
|
--brightness
|
||||||
Adjust the brightness of the images, must be in the range (-100, 100) (default "0")
|
Adjust the brightness of the images, must be in the range (-100, 100) (default "0")
|
||||||
--contrast
|
--contrast
|
||||||
Adjust the contrast of the images, must be in the range (-100, 100) (default "0")
|
Adjust the contrast of the images, must be in the range (-100, 100) (default "0")
|
||||||
--suffix
|
--suffix
|
||||||
Add suffix to file basename (default "")
|
Add suffix to file basename (default "")
|
||||||
--outdir
|
--outdir
|
||||||
Output directory (default ".")
|
Output directory (default ".")
|
||||||
--size
|
--size
|
||||||
Process only files larger than size (in MB) (default "0")
|
Process only files larger than size (in MB) (default "0")
|
||||||
--recursive
|
--recursive
|
||||||
Process subdirectories recursively (default "false")
|
Process subdirectories recursively (default "false")
|
||||||
--quiet
|
--quiet
|
||||||
Hide console output (default "false")
|
Hide console output (default "false")
|
||||||
|
|
||||||
cover
|
cover
|
||||||
Extract cover
|
Extract cover
|
||||||
|
|
||||||
--width
|
--width
|
||||||
Image width (default "0")
|
Image width (default "0")
|
||||||
--height
|
--height
|
||||||
Image height (default "0")
|
Image height (default "0")
|
||||||
--fit
|
--fit
|
||||||
Best fit for required width and height (default "false")
|
Best fit for required width and height (default "false")
|
||||||
--format
|
--format
|
||||||
Image format, valid values are jpeg, png, tiff, bmp, webp, avif, jxl (default "jpeg")
|
Image format, valid values are jpeg, png, tiff, bmp, webp, avif (default "jpeg")
|
||||||
--quality
|
--quality
|
||||||
Image quality (default "75")
|
Image quality (default "75")
|
||||||
--filter
|
--filter
|
||||||
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
|
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
|
||||||
--outdir
|
--outdir
|
||||||
Output directory (default ".")
|
Output directory (default ".")
|
||||||
--size
|
--size
|
||||||
Process only files larger than size (in MB) (default "0")
|
Process only files larger than size (in MB) (default "0")
|
||||||
--recursive
|
--recursive
|
||||||
Process subdirectories recursively (default "false")
|
Process subdirectories recursively (default "false")
|
||||||
--quiet
|
--quiet
|
||||||
Hide console output (default "false")
|
Hide console output (default "false")
|
||||||
|
|
||||||
thumbnail
|
thumbnail
|
||||||
Extract cover thumbnail (freedesktop spec.)
|
Extract cover thumbnail (freedesktop spec.)
|
||||||
|
|
||||||
--width
|
--width
|
||||||
Image width (default "0")
|
Image width (default "0")
|
||||||
--height
|
--height
|
||||||
Image height (default "0")
|
Image height (default "0")
|
||||||
--fit
|
--fit
|
||||||
Best fit for required width and height (default "false")
|
Best fit for required width and height (default "false")
|
||||||
--filter
|
--filter
|
||||||
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
|
0=NearestNeighbor, 1=Box, 2=Linear, 3=MitchellNetravali, 4=CatmullRom, 6=Gaussian, 7=Lanczos (default "2")
|
||||||
--outdir
|
--outdir
|
||||||
Output directory (default ".")
|
Output directory (default ".")
|
||||||
--outfile
|
--outfile
|
||||||
Output file (default "")
|
Output file (default "")
|
||||||
--size
|
--size
|
||||||
Process only files larger than size (in MB) (default "0")
|
Process only files larger than size (in MB) (default "0")
|
||||||
--recursive
|
--recursive
|
||||||
Process subdirectories recursively (default "false")
|
Process subdirectories recursively (default "false")
|
||||||
--quiet
|
--quiet
|
||||||
Hide console output (default "false")
|
Hide console output (default "false")
|
||||||
|
|
||||||
meta
|
meta
|
||||||
CBZ metadata
|
CBZ metadata
|
||||||
|
|
||||||
--cover
|
--cover
|
||||||
Print cover name (default "false")
|
Print cover name (default "false")
|
||||||
--comment
|
--comment
|
||||||
Print zip comment (default "false")
|
Print zip comment (default "false")
|
||||||
--comment-body
|
--comment-body
|
||||||
Set zip comment (default "")
|
Set zip comment (default "")
|
||||||
--file-add
|
--file-add
|
||||||
Add file to archive (default "")
|
Add file to archive (default "")
|
||||||
--file-remove
|
--file-remove
|
||||||
Remove file(s) from archive (glob pattern, i.e. *.xml) (default "")
|
Remove file from archive (glob pattern, i.e. *.xml) (default "")
|
||||||
|
|
||||||
|
version
|
||||||
|
Print version
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
@@ -180,19 +199,3 @@ This table maps quality settings for JPEG to the respective AVIF and WEBP qualit
|
|||||||
| AVIF quality | 48 | 51 | 56 | 64 |
|
| AVIF quality | 48 | 51 | 56 | 64 |
|
||||||
| WEBP quality | 55 | 64 | 72 | 82 |
|
| WEBP quality | 55 | 64 | 72 | 82 |
|
||||||
|
|
||||||
### Compile
|
|
||||||
|
|
||||||
You must have `CGO_ENABLED=1`. Note that `Go` will disable cgo when cross-compiling.
|
|
||||||
|
|
||||||
Install to `GOBIN` (you can point `GOBIN` to e.g. `/usr/local/bin` or `~/.local/bin`):
|
|
||||||
|
|
||||||
`go install github.com/gen2brain/cbconvert/cmd/cbconvert@latest`
|
|
||||||
|
|
||||||
For GUI app, check [IUP](https://github.com/gen2brain/iup-go) requirements, and then install:
|
|
||||||
|
|
||||||
`go install github.com/gen2brain/cbconvert/cmd/cbconvert-gui@latest`
|
|
||||||
|
|
||||||
### Build tags
|
|
||||||
|
|
||||||
* `extlib` - use external `libmupdf` and `libunarr` libraries
|
|
||||||
* `pkgconfig` - enable pkg-config (used with `extlib`)
|
|
Reference in New Issue
Block a user