Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e4ec17382 | |||
| 05f08f46ec | |||
| 4d845afa43 | |||
| 0dee611bf1 | |||
| 4bd35fe570 | |||
| f85fe990ff | |||
| 31e1c94f70 | |||
| 8e14a22a9b | |||
| 5d20f5c81e | |||
| a2738b4c08 | |||
| a0b1f65940 | |||
| 1e0f5b5956 | |||
| 544d824afb | |||
| 90ed56d4ad | |||
| eff4730014 | |||
| 85059d7df3 | |||
| 9e944142d6 | |||
| ee2cf2e14d | |||
| bf95d62242 | |||
| be50bf1e16 | |||
| 1a5520c050 | |||
| 4f23f228a8 | |||
| 5b2ed5233b | |||
| e2c41b3193 | |||
| 4c51c152f3 | |||
| c5cbc9fa9b | |||
| a668ae5e3d | |||
| 3bd7e672eb | |||
| 6b21c36902 | |||
| d54cec94a2 | |||
| 0df2f7d39d | |||
| e7b9fd8c2c | |||
| f795c70c33 | |||
| 3bb40a87cd | |||
| e38b5b3fb4 | |||
| f57b2598f1 | |||
| fca9f31fcf | |||
| 5f5fa2bb80 | |||
| 622c82a9df | |||
| f4c149ac31 | |||
| de2f8a2035 | |||
| 749ff0b943 | |||
| 1f33bec28c | |||
| 6a4054455a | |||
| 962a2e6dee | |||
| 63013998c7 | |||
| c0a077fcd1 | |||
| 71d8f9dbb6 | |||
| c794ea6b9d | |||
| 74c5de6994 | |||
| 1a36ec17b2 | |||
| a9e3281a5f | |||
| 962fde8c8d | |||
| a8084ed897 | |||
| 183c42613f | |||
| cad75231b1 | |||
| c32019615d | |||
| dd9000cfea | |||
| 4fc3209b4e | |||
| 000bd20f71 | |||
| f558b109e5 | |||
| 5922f102be | |||
| f84d2d4333 | |||
| 551ab9e137 | |||
| 046cc2c1fd |
@@ -1,120 +1,23 @@
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
name: Test
|
name: Test
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
go-version: [1.23.x]
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 0
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Setup cmake
|
|
||||||
uses: jwlawson/actions-setup-cmake@v1.13
|
|
||||||
with:
|
|
||||||
cmake-version: '3.27.x'
|
|
||||||
|
|
||||||
- name: Update apt-get
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
|
|
||||||
- name: Wget libheif
|
|
||||||
uses: wei/wget@v1
|
|
||||||
with:
|
|
||||||
args: https://github.com/strukturag/libheif/releases/download/v1.15.2/libheif-1.15.2.tar.gz
|
|
||||||
- name: Unpack libheif
|
|
||||||
run: |
|
|
||||||
tar -xpf libheif-1.15.2.tar.gz
|
|
||||||
- name: Install libheif dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get install libaom-dev -y
|
|
||||||
- name: Configure libheif
|
|
||||||
working-directory: libheif-1.15.2
|
|
||||||
run: |
|
|
||||||
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static --disable-libde265 \
|
|
||||||
--disable-dav1d --disable-go --enable-aom --disable-gdk-pixbuf --disable-rav1e --disable-tests --disable-x265 --disable-examples
|
|
||||||
- name: Install libheif
|
|
||||||
working-directory: libheif-1.15.2
|
|
||||||
run: |
|
|
||||||
make -j3 && sudo make install
|
|
||||||
|
|
||||||
- name: Wget lcms2
|
|
||||||
uses: wei/wget@v1
|
|
||||||
with:
|
|
||||||
args: https://github.com/mm2/Little-CMS/releases/download/lcms2.15/lcms2-2.15.tar.gz
|
|
||||||
- name: Unpack lcms2
|
|
||||||
run: |
|
|
||||||
tar -xpf lcms2-2.15.tar.gz
|
|
||||||
- name: Configure lcms2
|
|
||||||
working-directory: lcms2-2.15
|
|
||||||
run: |
|
|
||||||
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
|
|
||||||
- name: Install lcms2
|
|
||||||
working-directory: lcms2-2.15
|
|
||||||
run: |
|
|
||||||
make -j3 && sudo make install
|
|
||||||
|
|
||||||
- name: Wget highway
|
|
||||||
uses: wei/wget@v1
|
|
||||||
with:
|
|
||||||
args: -O highway-1.0.5.tar.gz https://github.com/google/highway/archive/refs/tags/1.0.5.tar.gz
|
|
||||||
- name: Unpack highway
|
|
||||||
run: |
|
|
||||||
tar -xpf highway-1.0.5.tar.gz && mkdir -p highway-1.0.5/build
|
|
||||||
- name: Configure highway
|
|
||||||
working-directory: highway-1.0.5/build
|
|
||||||
run: |
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/usr -DHWY_ENABLE_TESTS=OFF -DHWY_ENABLE_EXAMPLES=OFF -DHWY_WARNINGS_ARE_ERRORS=OFF ../
|
|
||||||
- name: Install highway
|
|
||||||
working-directory: highway-1.0.5/build
|
|
||||||
run: |
|
|
||||||
make -j3 && sudo make install
|
|
||||||
|
|
||||||
- name: Wget libjxl
|
|
||||||
uses: wei/wget@v1
|
|
||||||
with:
|
|
||||||
args: -O libjxl-0.8.2.tar.gz https://github.com/libjxl/libjxl/archive/refs/tags/v0.8.2.tar.gz
|
|
||||||
- name: Unpack libjxl
|
|
||||||
run: |
|
|
||||||
tar -xpf libjxl-0.8.2.tar.gz && mkdir -p libjxl-0.8.2/build
|
|
||||||
- name: Configure libjxl
|
|
||||||
working-directory: libjxl-0.8.2/build
|
|
||||||
run: |
|
|
||||||
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DJPEGXL_ENABLE_BENCHMARK=OFF \
|
|
||||||
-DJPEGXL_ENABLE_COVERAGE=OFF -DJPEGXL_ENABLE_FUZZERS=OFF -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_WARNINGS_AS_ERRORS=OFF \
|
|
||||||
-DJPEGXL_ENABLE_SKCMS=OFF -DJPEGXL_ENABLE_VIEWERS=OFF -DJPEGXL_ENABLE_PLUGINS=OFF -DJPEGXL_ENABLE_DOXYGEN=OFF \
|
|
||||||
-DJPEGXL_ENABLE_MANPAGES=OFF -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF -DJPEGXL_ENABLE_TCMALLOC=OFF \
|
|
||||||
-DJPEGXL_ENABLE_EXAMPLES=OFF -DJPEGXL_ENABLE_TOOLS=OFF -DJPEGXL_ENABLE_OPENEXR=OFF -DBUILD_TESTING=OFF \
|
|
||||||
-DJXL_HWY_DISABLED_TARGETS_FORCED=ON -DJPEGXL_FORCE_SYSTEM_BROTLI=ON -DJPEGXL_FORCE_SYSTEM_HWY=ON ../
|
|
||||||
- name: Install libjxl
|
|
||||||
working-directory: libjxl-0.8.2/build
|
|
||||||
run: |
|
|
||||||
make -j3 && sudo make install
|
|
||||||
|
|
||||||
- name: Wget ImageMagick
|
|
||||||
uses: wei/wget@v1
|
|
||||||
with:
|
|
||||||
args: -O ImageMagick-7.1.1-15.tar.gz https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-15.tar.gz
|
|
||||||
- name: Unpack ImageMagick
|
|
||||||
run: |
|
|
||||||
tar -xpf ImageMagick-7.1.1-15.tar.gz
|
|
||||||
- name: Configure ImageMagick
|
|
||||||
working-directory: ImageMagick-7.1.1-15
|
|
||||||
run: |
|
|
||||||
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static --enable-zero-configuration \
|
|
||||||
--without-frozenpaths --without-utilities --disable-hdri --disable-opencl --without-modules --without-magick-plus-plus --without-perl \
|
|
||||||
--without-bzlib --without-x --without-zip --with-zlib --without-dps --without-djvu --without-autotrace --without-fftw \
|
|
||||||
--without-fpx --without-fontconfig --without-freetype --without-gslib --without-gvc --without-jbig --without-openjp2 \
|
|
||||||
--without-lcms --without-lqr --without-lzma --without-openexr --without-pango --without-raw --without-rsvg --without-wmf \
|
|
||||||
--without-xml --disable-openmp --with-jpeg --with-heic --with-jxl --with-png --with-tiff --with-webp
|
|
||||||
- name: Install ImageMagick
|
|
||||||
working-directory: ImageMagick-7.1.1-15
|
|
||||||
run: |
|
|
||||||
make -j3 && sudo make install
|
|
||||||
|
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: 1.21
|
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go-version }}
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test
|
run: go test
|
||||||
|
env:
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
cmd/cbconvert-gui/cbconvert-gui
|
||||||
|
cmd/cbconvert/cbconvert
|
||||||
|
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
@@ -8,39 +8,32 @@ It can convert comics to different formats to fit your various devices.
|
|||||||
|
|
||||||
<img src="cmd/cbconvert-gui/screenshots/linux-01.jpg" width="700" alt="screenshot" />
|
<img src="cmd/cbconvert-gui/screenshots/linux-01.jpg" width="700" alt="screenshot" />
|
||||||
|
|
||||||
See more [screnshots](https://github.com/gen2brain/cbconvert/blob/master/cmd/cbconvert-gui/screenshots/).
|
See more [screenshots](https://github.com/gen2brain/cbconvert/blob/master/cmd/cbconvert-gui/screenshots/).
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* reads CBR (RAR), CBZ (ZIP), CB7 (7Z), CBT (TAR), PDF, XPS, EPUB, MOBI and plain directory
|
* reads CBR (RAR), CBZ (ZIP), CB7 (7Z), CBT (TAR), PDF, XPS, EPUB, MOBI, DOCX, PPTX and plain directory
|
||||||
* saves processed files in ZIP archive format or TAR
|
* saves processed files in ZIP archive format or TAR
|
||||||
* images can be converted to JPEG, PNG, TIFF, WEBP, AVIF, JXL, or 4-Bit BMP (16 colors) image format
|
* images can be converted to JPEG, PNG, TIFF, WEBP, AVIF, JXL, or 4-Bit BMP (16 colors) image format
|
||||||
* rotate, adjust brightness/contrast, adjust levels (Photoshop-like) or grayscale images
|
* rotate, adjust brightness/contrast or grayscale images
|
||||||
* resize filters (NearestNeighbor, Box, Linear, MitchellNetravali, CatmullRom, Gaussian, Lanczos)
|
* resize filters (NearestNeighbor, Box, Linear, MitchellNetravali, CatmullRom, Gaussian, Lanczos)
|
||||||
* export covers from comics
|
* export covers from comics
|
||||||
* create thumbnails from covers by [FreeDesktop](http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html) specification
|
* create thumbnails from covers by [FreeDesktop](http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html) specification
|
||||||
|
|
||||||
### Download
|
### Download
|
||||||
|
|
||||||
* [Windows x86_64](https://github.com/gen2brain/cbconvert/releases/latest/download/cbconvert-1.0.0-windows-x86_64.zip)
|
Download the latest binaries from the [releases](https://github.com/gen2brain/cbconvert/releases).
|
||||||
* [Linux x86_64](https://github.com/gen2brain/cbconvert/releases/latest/download/cbconvert-1.0.0-linux-x86_64.tar.gz)
|
|
||||||
* [macOS x86_64](https://github.com/gen2brain/cbconvert/releases/latest/download/cbconvert-1.0.0-darwin-x86_64.zip)
|
Linux Flatpak is available at [Flathub](https://flathub.org/apps/io.github.gen2brain.cbconvert).
|
||||||
* [macOS aarch64](https://github.com/gen2brain/cbconvert/releases/latest/download/cbconvert-1.0.0-darwin-aarch64.zip)
|
|
||||||
|
|
||||||
### Using cbconvert in file managers to generate FreeDesktop thumbnails
|
### Using cbconvert in file managers to generate FreeDesktop thumbnails
|
||||||
|
|
||||||
Copy `cbconvert` cli binary to your PATH and create file `~/.local/share/thumbnailers/cbconvert.thumbnailer`:
|
Copy/install `cbconvert` cli binary to your `PATH`, create file `~/.local/share/thumbnailers/cbconvert.thumbnailer`
|
||||||
|
and paste contents from [thumbnailer](https://github.com/gen2brain/cbconvert/tree/master/cmd/cbconvert-gui/dist/linux/io.github.gen2brain.cbconvert.thumbnailer).
|
||||||
|
|
||||||
```
|
This is what it looks like in the `PCManFM` file manager:
|
||||||
[Thumbnailer Entry]
|
|
||||||
TryExec=cbconvert
|
|
||||||
Exec=cbconvert thumbnail --quiet --width %s --outfile %o %i
|
|
||||||
MimeType=application/pdf;application/x-cb7;application/x-cbt;application/epub+zip;application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-mobipocket-ebook;application/vnd.ms-xpsdocument;
|
|
||||||
```
|
|
||||||
|
|
||||||
This is what it looks like in the PCManFM file manager:
|
<img src="cmd/cbconvert-gui/screenshots/thumbnails.jpg" width="700" alt="thumbnails" />
|
||||||
|
|
||||||
<img src="cmd/cbconvert/screenshots/thumbnails.jpg" width="700" alt="thumbnails" />
|
|
||||||
|
|
||||||
|
|
||||||
### Using command line app
|
### Using command line app
|
||||||
@@ -62,8 +55,8 @@ This is what it looks like in the PCManFM file manager:
|
|||||||
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
|
||||||
@@ -75,7 +68,7 @@ This is what it looks like in the PCManFM file manager:
|
|||||||
--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
|
||||||
@@ -86,16 +79,6 @@ This is what it looks like in the PCManFM file manager:
|
|||||||
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 "")
|
||||||
--levels-inmin
|
|
||||||
Shadow input value (default "0")
|
|
||||||
--levels-gamma
|
|
||||||
Midpoint/Gamma (default "1")
|
|
||||||
--levels-inmax
|
|
||||||
Highlight input value (default "255")
|
|
||||||
--levels-outmin
|
|
||||||
Shadow output value (default "0")
|
|
||||||
--levels-outmax
|
|
||||||
Highlight output value (default "255")
|
|
||||||
--outdir
|
--outdir
|
||||||
Output directory (default ".")
|
Output directory (default ".")
|
||||||
--size
|
--size
|
||||||
@@ -151,19 +134,19 @@ This is what it looks like in the PCManFM file manager:
|
|||||||
--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(s) from archive (glob pattern, i.e. *.xml) (default "")
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -199,10 +182,17 @@ This table maps quality settings for JPEG to the respective AVIF and WEBP qualit
|
|||||||
|
|
||||||
### Compile
|
### Compile
|
||||||
|
|
||||||
Install ImageMagick7 (with libheif/libjxl support) and MuPDF libraries and headers and then install to GOBIN:
|
You must have `CGO_ENABLED=1`. Note that `Go` will disable cgo when cross-compiling.
|
||||||
|
|
||||||
`go install -tags extlib github.com/gen2brain/cbconvert/cmd/cbconvert@latest`
|
Install to `GOBIN` (you can point `GOBIN` to e.g. `/usr/local/bin` or `~/.local/bin`):
|
||||||
|
|
||||||
For GUI app, check [IUP requirements](https://github.com/gen2brain/iup-go), and then install:
|
`go install github.com/gen2brain/cbconvert/cmd/cbconvert@latest`
|
||||||
|
|
||||||
`go install -tags extlib github.com/gen2brain/cbconvert/cmd/cbconvert-gui@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`)
|
||||||
@@ -7,12 +7,13 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/gen2brain/go-unarr"
|
"github.com/gen2brain/go-unarr"
|
||||||
)
|
)
|
||||||
|
|
||||||
// archiveSave saves workdir to CBZ archive.
|
// archiveSave saves workdir to CBZ archive.
|
||||||
func (c *Convertor) archiveSave(fileName string) error {
|
func (c *Converter) archiveSave(fileName string) error {
|
||||||
if c.Opts.Archive == "zip" {
|
if c.Opts.Archive == "zip" {
|
||||||
return c.archiveSaveZip(fileName)
|
return c.archiveSaveZip(fileName)
|
||||||
} else if c.Opts.Archive == "tar" {
|
} else if c.Opts.Archive == "tar" {
|
||||||
@@ -23,19 +24,20 @@ func (c *Convertor) archiveSave(fileName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveSaveZip saves workdir to CBZ archive.
|
// archiveSaveZip saves workdir to CBZ archive.
|
||||||
func (c *Convertor) archiveSaveZip(fileName string) error {
|
func (c *Converter) archiveSaveZip(fileName string) error {
|
||||||
if c.OnCompress != nil {
|
if c.OnCompress != nil {
|
||||||
c.OnCompress()
|
c.OnCompress()
|
||||||
}
|
}
|
||||||
|
|
||||||
var zipName string
|
var zipName string
|
||||||
if c.Opts.Recursive {
|
if c.Opts.Recursive {
|
||||||
err := os.MkdirAll(filepath.Join(c.Opts.OutDir, filepath.Dir(fileName)), 0755)
|
fDir := strings.Split(filepath.Dir(fileName), string(os.PathSeparator))[1:]
|
||||||
|
err := os.MkdirAll(filepath.Join(c.Opts.OutDir, filepath.Join(fDir...)), 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("archiveSaveZip: %w", err)
|
return fmt.Errorf("archiveSaveZip: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
zipName = filepath.Join(c.Opts.OutDir, filepath.Dir(fileName), fmt.Sprintf("%s%s.cbz", baseNoExt(fileName), c.Opts.Suffix))
|
zipName = filepath.Join(c.Opts.OutDir, filepath.Join(fDir...), fmt.Sprintf("%s%s.cbz", baseNoExt(fileName), c.Opts.Suffix))
|
||||||
} else {
|
} else {
|
||||||
zipName = filepath.Join(c.Opts.OutDir, fmt.Sprintf("%s%s.cbz", baseNoExt(fileName), c.Opts.Suffix))
|
zipName = filepath.Join(c.Opts.OutDir, fmt.Sprintf("%s%s.cbz", baseNoExt(fileName), c.Opts.Suffix))
|
||||||
}
|
}
|
||||||
@@ -97,19 +99,20 @@ func (c *Convertor) archiveSaveZip(fileName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveSaveTar saves workdir to CBT archive.
|
// archiveSaveTar saves workdir to CBT archive.
|
||||||
func (c *Convertor) archiveSaveTar(fileName string) error {
|
func (c *Converter) archiveSaveTar(fileName string) error {
|
||||||
if c.OnCompress != nil {
|
if c.OnCompress != nil {
|
||||||
c.OnCompress()
|
c.OnCompress()
|
||||||
}
|
}
|
||||||
|
|
||||||
var tarName string
|
var tarName string
|
||||||
if c.Opts.Recursive {
|
if c.Opts.Recursive {
|
||||||
err := os.MkdirAll(filepath.Join(c.Opts.OutDir, filepath.Dir(fileName)), 0755)
|
fDir := strings.Split(filepath.Dir(fileName), string(os.PathSeparator))[1:]
|
||||||
|
err := os.MkdirAll(filepath.Join(c.Opts.OutDir, filepath.Join(fDir...)), 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("archiveSaveTar: %w", err)
|
return fmt.Errorf("archiveSaveTar: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
tarName = filepath.Join(c.Opts.OutDir, filepath.Dir(fileName), fmt.Sprintf("%s%s.cbt", baseNoExt(fileName), c.Opts.Suffix))
|
tarName = filepath.Join(c.Opts.OutDir, filepath.Join(fDir...), fmt.Sprintf("%s%s.cbt", baseNoExt(fileName), c.Opts.Suffix))
|
||||||
} else {
|
} else {
|
||||||
tarName = filepath.Join(c.Opts.OutDir, fmt.Sprintf("%s%s.cbt", baseNoExt(fileName), c.Opts.Suffix))
|
tarName = filepath.Join(c.Opts.OutDir, fmt.Sprintf("%s%s.cbt", baseNoExt(fileName), c.Opts.Suffix))
|
||||||
}
|
}
|
||||||
@@ -170,7 +173,7 @@ func (c *Convertor) archiveSaveTar(fileName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveList lists contents of archive.
|
// archiveList lists contents of archive.
|
||||||
func (c *Convertor) archiveList(fileName string) ([]string, error) {
|
func (c *Converter) archiveList(fileName string) ([]string, error) {
|
||||||
var contents []string
|
var contents []string
|
||||||
|
|
||||||
archive, err := unarr.NewArchive(fileName)
|
archive, err := unarr.NewArchive(fileName)
|
||||||
@@ -188,7 +191,7 @@ func (c *Convertor) archiveList(fileName string) ([]string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveComment returns ZIP comment.
|
// archiveComment returns ZIP comment.
|
||||||
func (c *Convertor) archiveComment(fileName string) (string, error) {
|
func (c *Converter) archiveComment(fileName string) (string, error) {
|
||||||
zr, err := zip.OpenReader(fileName)
|
zr, err := zip.OpenReader(fileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("archiveComment: %w", err)
|
return "", fmt.Errorf("archiveComment: %w", err)
|
||||||
@@ -199,7 +202,7 @@ func (c *Convertor) archiveComment(fileName string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveSetComment sets ZIP comment.
|
// archiveSetComment sets ZIP comment.
|
||||||
func (c *Convertor) archiveSetComment(fileName, commentBody string) error {
|
func (c *Converter) archiveSetComment(fileName, commentBody string) error {
|
||||||
zr, err := zip.OpenReader(fileName)
|
zr, err := zip.OpenReader(fileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("archiveSetComment: %w", err)
|
return fmt.Errorf("archiveSetComment: %w", err)
|
||||||
@@ -263,7 +266,7 @@ func (c *Convertor) archiveSetComment(fileName, commentBody string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveFileAdd adds file to archive.
|
// archiveFileAdd adds file to archive.
|
||||||
func (c *Convertor) archiveFileAdd(fileName, newFileName string) error {
|
func (c *Converter) archiveFileAdd(fileName, newFileName string) error {
|
||||||
zr, err := zip.OpenReader(fileName)
|
zr, err := zip.OpenReader(fileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("archiveFileAdd: %w", err)
|
return fmt.Errorf("archiveFileAdd: %w", err)
|
||||||
@@ -353,7 +356,7 @@ func (c *Convertor) archiveFileAdd(fileName, newFileName string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// archiveFileRemove removes files from archive.
|
// archiveFileRemove removes files from archive.
|
||||||
func (c *Convertor) archiveFileRemove(fileName, pattern string) error {
|
func (c *Converter) archiveFileRemove(fileName, pattern string) error {
|
||||||
zr, err := zip.OpenReader(fileName)
|
zr, err := zip.OpenReader(fileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("archiveFileRemove: %w", err)
|
return fmt.Errorf("archiveFileRemove: %w", err)
|
||||||
@@ -0,0 +1,408 @@
|
|||||||
|
package cbconvert
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
|
"image"
|
||||||
|
"image/png"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
"sync/atomic"
|
||||||
|
|
||||||
|
"github.com/gen2brain/avif"
|
||||||
|
"github.com/gen2brain/go-fitz"
|
||||||
|
"github.com/gen2brain/go-unarr"
|
||||||
|
"github.com/gen2brain/jpegli"
|
||||||
|
"github.com/gen2brain/jpegxl"
|
||||||
|
"github.com/gen2brain/webp"
|
||||||
|
"github.com/jsummers/gobmp"
|
||||||
|
"golang.org/x/image/tiff"
|
||||||
|
"golang.org/x/sync/errgroup"
|
||||||
|
)
|
||||||
|
|
||||||
|
// convertDocument converts PDF/EPUB document to CBZ.
|
||||||
|
func (c *Converter) convertDocument(ctx context.Context, fileName string) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
|
c.Workdir, err = os.MkdirTemp(os.TempDir(), "cbc")
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDocument: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
doc, err := fitz.New(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDocument: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
defer doc.Close()
|
||||||
|
|
||||||
|
c.Ncontents = doc.NumPage()
|
||||||
|
c.CurrContent = 0
|
||||||
|
|
||||||
|
if c.OnStart != nil {
|
||||||
|
c.OnStart()
|
||||||
|
}
|
||||||
|
|
||||||
|
eg, ctx := errgroup.WithContext(ctx)
|
||||||
|
eg.SetLimit(runtime.NumCPU() + 1)
|
||||||
|
|
||||||
|
for n := 0; n < c.Ncontents; n++ {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return fmt.Errorf("convertDocument: %w", ctx.Err())
|
||||||
|
}
|
||||||
|
|
||||||
|
img, err := doc.Image(n)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDocument: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if img != nil {
|
||||||
|
eg.Go(func() error {
|
||||||
|
return c.imageConvert(ctx, img, n, "")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = eg.Wait()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDocument: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// convertArchive converts archive to CBZ.
|
||||||
|
func (c *Converter) convertArchive(ctx context.Context, fileName string) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
|
c.Workdir, err = os.MkdirTemp(os.TempDir(), "cbc")
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
contents, err := c.archiveList(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
images := imagesFromSlice(contents)
|
||||||
|
|
||||||
|
c.Ncontents = len(images)
|
||||||
|
c.CurrContent = 0
|
||||||
|
|
||||||
|
if c.OnStart != nil {
|
||||||
|
c.OnStart()
|
||||||
|
}
|
||||||
|
|
||||||
|
cover := c.coverName(images)
|
||||||
|
|
||||||
|
archive, err := unarr.NewArchive(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
defer archive.Close()
|
||||||
|
|
||||||
|
eg, ctx := errgroup.WithContext(ctx)
|
||||||
|
eg.SetLimit(runtime.NumCPU() + 1)
|
||||||
|
|
||||||
|
for {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", ctx.Err())
|
||||||
|
}
|
||||||
|
|
||||||
|
err := archive.Entry()
|
||||||
|
if err != nil {
|
||||||
|
if errors.Is(err, io.EOF) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
data, err := archive.ReadAll()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
pathName := archive.Name()
|
||||||
|
|
||||||
|
if isImage(pathName) {
|
||||||
|
if c.Opts.NoConvert {
|
||||||
|
if err = copyFile(bytes.NewReader(data), filepath.Join(c.Workdir, filepath.Base(pathName))); err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if cover == pathName && c.Opts.NoCover {
|
||||||
|
if err = copyFile(bytes.NewReader(data), filepath.Join(c.Workdir, filepath.Base(pathName))); err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
var img image.Image
|
||||||
|
img, err = c.imageDecode(bytes.NewReader(data))
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.Opts.NoRGB && !isGrayScale(img) {
|
||||||
|
if err = copyFile(bytes.NewReader(data), filepath.Join(c.Workdir, filepath.Base(pathName))); err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if img != nil {
|
||||||
|
eg.Go(func() error {
|
||||||
|
return c.imageConvert(ctx, img, 0, pathName)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if filepath.Ext(pathName) == ".DS_Store" || strings.Contains(pathName, "__MACOSX") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if !c.Opts.NoNonImage {
|
||||||
|
if err = copyFile(bytes.NewReader(data), filepath.Join(c.Workdir, filepath.Base(pathName))); err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = eg.Wait()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// convertDirectory converts directory to CBZ.
|
||||||
|
func (c *Converter) convertDirectory(ctx context.Context, dirPath string) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
|
c.Workdir, err = os.MkdirTemp(os.TempDir(), "cbc")
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
contents, err := imagesFromPath(dirPath)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
images := imagesFromSlice(contents)
|
||||||
|
c.Ncontents = len(images)
|
||||||
|
c.CurrContent = 0
|
||||||
|
|
||||||
|
if c.OnStart != nil {
|
||||||
|
c.OnStart()
|
||||||
|
}
|
||||||
|
|
||||||
|
eg, ctx := errgroup.WithContext(ctx)
|
||||||
|
eg.SetLimit(runtime.NumCPU() + 1)
|
||||||
|
|
||||||
|
for index, img := range contents {
|
||||||
|
if ctx.Err() != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", ctx.Err())
|
||||||
|
}
|
||||||
|
|
||||||
|
file, err := os.Open(img)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if isNonImage(img) && !c.Opts.NoNonImage {
|
||||||
|
if err = copyFile(file, filepath.Join(c.Workdir, filepath.Base(img))); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = file.Close(); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
} else if isImage(img) {
|
||||||
|
if c.Opts.NoConvert {
|
||||||
|
if err = copyFile(file, filepath.Join(c.Workdir, filepath.Base(img))); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = file.Close(); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
var i image.Image
|
||||||
|
i, err = c.imageDecode(file)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.Opts.NoRGB && !isGrayScale(i) {
|
||||||
|
if err = copyFile(file, filepath.Join(c.Workdir, filepath.Base(img))); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = file.Close(); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if err = file.Close(); err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if i != nil {
|
||||||
|
eg.Go(func() error {
|
||||||
|
return c.imageConvert(ctx, i, index, img)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
err = eg.Wait()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("convertDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageConvert converts image.Image.
|
||||||
|
func (c *Converter) imageConvert(ctx context.Context, img image.Image, index int, pathName string) error {
|
||||||
|
err := ctx.Err()
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("imageConvert: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
atomic.AddInt32(&c.CurrContent, 1)
|
||||||
|
if c.OnProgress != nil {
|
||||||
|
c.OnProgress()
|
||||||
|
}
|
||||||
|
|
||||||
|
ext := c.Opts.Format
|
||||||
|
if ext == "jpeg" {
|
||||||
|
ext = "jpg"
|
||||||
|
}
|
||||||
|
|
||||||
|
var fileName string
|
||||||
|
if pathName != "" {
|
||||||
|
fileName = filepath.Join(c.Workdir, fmt.Sprintf("%s.%s", baseNoExt(pathName), ext))
|
||||||
|
} else {
|
||||||
|
fileName = filepath.Join(c.Workdir, fmt.Sprintf("%03d.%s", index, ext))
|
||||||
|
}
|
||||||
|
|
||||||
|
img = c.imageTransform(img)
|
||||||
|
|
||||||
|
w, err := os.Create(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("imageConvert: %w", err)
|
||||||
|
}
|
||||||
|
defer w.Close()
|
||||||
|
|
||||||
|
if err := c.imageEncode(img, w); err != nil {
|
||||||
|
return fmt.Errorf("imageConvert: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageTransform transforms image (resize, rotate, brightness, contrast).
|
||||||
|
func (c *Converter) imageTransform(img image.Image) image.Image {
|
||||||
|
var i = img
|
||||||
|
|
||||||
|
if c.Opts.Width > 0 || c.Opts.Height > 0 {
|
||||||
|
if c.Opts.Fit {
|
||||||
|
i = fit(i, c.Opts.Width, c.Opts.Height, filters[c.Opts.Filter])
|
||||||
|
} else {
|
||||||
|
i = resize(i, c.Opts.Width, c.Opts.Height, filters[c.Opts.Filter])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.Opts.Rotate > 0 {
|
||||||
|
switch c.Opts.Rotate {
|
||||||
|
case 90:
|
||||||
|
i = rotate(i, 90)
|
||||||
|
case 180:
|
||||||
|
i = rotate(i, 180)
|
||||||
|
case 270:
|
||||||
|
i = rotate(i, 270)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.Opts.Brightness != 0 {
|
||||||
|
i = brightness(i, float64(c.Opts.Brightness))
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.Opts.Contrast != 0 {
|
||||||
|
i = contrast(i, float64(c.Opts.Contrast))
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.Opts.Grayscale {
|
||||||
|
i = imageToGray(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageDecode decodes image from reader.
|
||||||
|
func (c *Converter) imageDecode(reader io.Reader) (image.Image, error) {
|
||||||
|
img, _, err := image.Decode(reader)
|
||||||
|
if err != nil {
|
||||||
|
return img, fmt.Errorf("imageDecode: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return img, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageEncode encodes image to file.
|
||||||
|
func (c *Converter) imageEncode(img image.Image, w io.Writer) error {
|
||||||
|
var err error
|
||||||
|
|
||||||
|
switch c.Opts.Format {
|
||||||
|
case "png":
|
||||||
|
err = png.Encode(w, img)
|
||||||
|
case "tiff":
|
||||||
|
err = tiff.Encode(w, img, &tiff.Options{Compression: tiff.Uncompressed})
|
||||||
|
case "jpeg":
|
||||||
|
opts := &jpegli.EncodingOptions{}
|
||||||
|
opts.Quality = c.Opts.Quality
|
||||||
|
opts.ChromaSubsampling = image.YCbCrSubsampleRatio420
|
||||||
|
opts.ProgressiveLevel = 2
|
||||||
|
opts.AdaptiveQuantization = true
|
||||||
|
opts.DCTMethod = jpegli.DefaultDCTMethod
|
||||||
|
err = jpegli.Encode(w, img, opts)
|
||||||
|
case "webp":
|
||||||
|
err = webp.Encode(w, img, webp.Options{Quality: c.Opts.Quality, Method: webp.DefaultMethod})
|
||||||
|
case "avif":
|
||||||
|
err = avif.Encode(w, img, avif.Options{Quality: c.Opts.Quality, Speed: avif.DefaultSpeed})
|
||||||
|
case "jxl":
|
||||||
|
err = jpegxl.Encode(w, img, jpegxl.Options{Quality: c.Opts.Quality, Effort: jpegxl.DefaultEffort})
|
||||||
|
case "bmp":
|
||||||
|
opts := &gobmp.EncoderOptions{}
|
||||||
|
opts.SupportTransparency(false)
|
||||||
|
err = gobmp.EncodeWithOptions(w, imageToPaletted(img), opts)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("imageEncode: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
package cbconvert
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"fmt"
|
||||||
|
"image"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/fvbommel/sortorder"
|
||||||
|
"github.com/gen2brain/go-fitz"
|
||||||
|
"github.com/gen2brain/go-unarr"
|
||||||
|
)
|
||||||
|
|
||||||
|
// coverArchive extracts cover from archive.
|
||||||
|
func (c *Converter) coverArchive(fileName string) (image.Image, error) {
|
||||||
|
var images []string
|
||||||
|
|
||||||
|
contents, err := c.archiveList(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, ct := range contents {
|
||||||
|
if isImage(ct) {
|
||||||
|
images = append(images, ct)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
cover := c.coverName(images)
|
||||||
|
|
||||||
|
archive, err := unarr.NewArchive(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverArchive: %w", err)
|
||||||
|
}
|
||||||
|
defer archive.Close()
|
||||||
|
|
||||||
|
if err = archive.EntryFor(cover); err != nil {
|
||||||
|
return nil, fmt.Errorf("coverArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
data, err := archive.ReadAll()
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
var img image.Image
|
||||||
|
img, err = c.imageDecode(bytes.NewReader(data))
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverArchive: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return img, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// coverDocument extracts cover from document.
|
||||||
|
func (c *Converter) coverDocument(fileName string) (image.Image, error) {
|
||||||
|
doc, err := fitz.New(fileName)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverDocument: %w", err)
|
||||||
|
}
|
||||||
|
defer doc.Close()
|
||||||
|
|
||||||
|
img, err := doc.Image(0)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverDocument: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return img, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// coverDirectory extracts cover from directory.
|
||||||
|
func (c *Converter) coverDirectory(dir string) (image.Image, error) {
|
||||||
|
contents, err := imagesFromPath(dir)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
images := imagesFromSlice(contents)
|
||||||
|
cover := c.coverName(images)
|
||||||
|
|
||||||
|
file, err := os.Open(cover)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverDirectory: %w", err)
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
|
||||||
|
var img image.Image
|
||||||
|
img, err = c.imageDecode(file)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverDirectory: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return img, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// coverName returns the filename that is the most likely to be the cover.
|
||||||
|
func (c *Converter) coverName(images []string) string {
|
||||||
|
if len(images) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
lower := make([]string, 0)
|
||||||
|
for idx, img := range images {
|
||||||
|
img = strings.ToLower(img)
|
||||||
|
lower = append(lower, img)
|
||||||
|
ext := baseNoExt(img)
|
||||||
|
|
||||||
|
if strings.HasPrefix(img, "cover") || strings.HasPrefix(img, "front") ||
|
||||||
|
strings.HasSuffix(ext, "cover") || strings.HasSuffix(ext, "front") {
|
||||||
|
return filepath.ToSlash(images[idx])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sort.Sort(sortorder.Natural(lower))
|
||||||
|
cover := lower[0]
|
||||||
|
|
||||||
|
for idx, img := range images {
|
||||||
|
img = strings.ToLower(img)
|
||||||
|
if img == cover {
|
||||||
|
return filepath.ToSlash(images[idx])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// coverImage returns cover as image.Image.
|
||||||
|
func (c *Converter) coverImage(fileName string, fileInfo os.FileInfo) (image.Image, error) {
|
||||||
|
var err error
|
||||||
|
var cover image.Image
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case fileInfo.IsDir():
|
||||||
|
cover, err = c.coverDirectory(fileName)
|
||||||
|
case isDocument(fileName):
|
||||||
|
cover, err = c.coverDocument(fileName)
|
||||||
|
case isArchive(fileName):
|
||||||
|
cover, err = c.coverArchive(fileName)
|
||||||
|
}
|
||||||
|
|
||||||
|
if c.OnProgress != nil {
|
||||||
|
c.OnProgress()
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("coverImage: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return cover, nil
|
||||||
|
}
|
||||||
@@ -2,41 +2,12 @@ package cbconvert
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"image"
|
|
||||||
"image/color"
|
|
||||||
"image/draw"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// imageToRGBA converts an image.Image to *image.RGBA.
|
|
||||||
func imageToRGBA(src image.Image) *image.RGBA {
|
|
||||||
if dst, ok := src.(*image.RGBA); ok {
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
b := src.Bounds()
|
|
||||||
dst := image.NewRGBA(b)
|
|
||||||
draw.Draw(dst, dst.Bounds(), src, b.Min, draw.Src)
|
|
||||||
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
// imageToGray converts an image.Image to *image.Gray.
|
|
||||||
func imageToGray(src image.Image) *image.Gray {
|
|
||||||
if dst, ok := src.(*image.Gray); ok {
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
b := src.Bounds()
|
|
||||||
dst := image.NewGray(b)
|
|
||||||
draw.Draw(dst, dst.Bounds(), src, b.Min, draw.Src)
|
|
||||||
|
|
||||||
return dst
|
|
||||||
}
|
|
||||||
|
|
||||||
// imagesFromPath returns list of found image files for given directory.
|
// imagesFromPath returns list of found image files for given directory.
|
||||||
func imagesFromPath(path string) ([]string, error) {
|
func imagesFromPath(path string) ([]string, error) {
|
||||||
var images []string
|
var images []string
|
||||||
@@ -102,7 +73,7 @@ func isArchive(f string) bool {
|
|||||||
|
|
||||||
// isDocument checks if file is document.
|
// isDocument checks if file is document.
|
||||||
func isDocument(f string) bool {
|
func isDocument(f string) bool {
|
||||||
var types = []string{".pdf", ".xps", ".epub", ".mobi"}
|
var types = []string{".pdf", ".xps", ".epub", ".mobi", ".docx", ".pptx", ".xlsx"}
|
||||||
for _, t := range types {
|
for _, t := range types {
|
||||||
if strings.ToLower(filepath.Ext(f)) == t {
|
if strings.ToLower(filepath.Ext(f)) == t {
|
||||||
return true
|
return true
|
||||||
@@ -147,16 +118,6 @@ func isSize(a, b int64) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// isGrayScale checks if image is grayscale.
|
|
||||||
func isGrayScale(img image.Image) bool {
|
|
||||||
model := img.ColorModel()
|
|
||||||
if model == color.GrayModel || model == color.Gray16Model {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// baseNoExt returns base name without extension.
|
// baseNoExt returns base name without extension.
|
||||||
func baseNoExt(filename string) string {
|
func baseNoExt(filename string) string {
|
||||||
return strings.TrimSuffix(filepath.Base(filename), filepath.Ext(filename))
|
return strings.TrimSuffix(filepath.Base(filename), filepath.Ext(filename))
|
||||||
|
|||||||
@@ -0,0 +1,163 @@
|
|||||||
|
package cbconvert
|
||||||
|
|
||||||
|
import (
|
||||||
|
"image"
|
||||||
|
"image/color"
|
||||||
|
"image/draw"
|
||||||
|
"math"
|
||||||
|
|
||||||
|
"github.com/anthonynsimon/bild/adjust"
|
||||||
|
"github.com/anthonynsimon/bild/transform"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Resample filters.
|
||||||
|
const (
|
||||||
|
// NearestNeighbor is the fastest resampling filter, no antialiasing.
|
||||||
|
nearestNeighbor int = iota
|
||||||
|
// Box filter (averaging pixels).
|
||||||
|
box
|
||||||
|
// Linear is the bilinear filter, smooth and reasonably fast.
|
||||||
|
linear
|
||||||
|
// MitchellNetravali is a smooth bicubic filter.
|
||||||
|
mitchellNetravali
|
||||||
|
// CatmullRom is a sharp bicubic filter.
|
||||||
|
catmullRom
|
||||||
|
// Gaussian is a blurring filter that uses gaussian function, useful for noise removal.
|
||||||
|
gaussian
|
||||||
|
// Lanczos is a high-quality resampling filter, it's slower than cubic filters.
|
||||||
|
lanczos
|
||||||
|
)
|
||||||
|
|
||||||
|
var filters = map[int]transform.ResampleFilter{
|
||||||
|
nearestNeighbor: transform.NearestNeighbor,
|
||||||
|
box: transform.Box,
|
||||||
|
linear: transform.Linear,
|
||||||
|
mitchellNetravali: transform.MitchellNetravali,
|
||||||
|
catmullRom: transform.CatmullRom,
|
||||||
|
gaussian: transform.Gaussian,
|
||||||
|
lanczos: transform.Lanczos,
|
||||||
|
}
|
||||||
|
|
||||||
|
func resize(img image.Image, width, height int, filter transform.ResampleFilter) *image.RGBA {
|
||||||
|
dstW, dstH := width, height
|
||||||
|
|
||||||
|
srcW := img.Bounds().Dx()
|
||||||
|
srcH := img.Bounds().Dy()
|
||||||
|
|
||||||
|
if dstW == 0 {
|
||||||
|
tmpW := float64(dstH) * float64(srcW) / float64(srcH)
|
||||||
|
dstW = int(math.Max(1.0, math.Floor(tmpW+0.5)))
|
||||||
|
}
|
||||||
|
if dstH == 0 {
|
||||||
|
tmpH := float64(dstW) * float64(srcH) / float64(srcW)
|
||||||
|
dstH = int(math.Max(1.0, math.Floor(tmpH+0.5)))
|
||||||
|
}
|
||||||
|
|
||||||
|
if srcW == dstW && srcH == dstH {
|
||||||
|
return imageToRGBA(img)
|
||||||
|
}
|
||||||
|
|
||||||
|
return transform.Resize(img, dstW, dstH, filter)
|
||||||
|
}
|
||||||
|
|
||||||
|
func fit(img image.Image, width, height int, filter transform.ResampleFilter) *image.RGBA {
|
||||||
|
maxW, maxH := width, height
|
||||||
|
|
||||||
|
b := img.Bounds()
|
||||||
|
srcW := b.Dx()
|
||||||
|
srcH := b.Dy()
|
||||||
|
|
||||||
|
if srcW <= maxW && srcH <= maxH {
|
||||||
|
return imageToRGBA(img)
|
||||||
|
}
|
||||||
|
|
||||||
|
srcAspectRatio := float64(srcW) / float64(srcH)
|
||||||
|
maxAspectRatio := float64(maxW) / float64(maxH)
|
||||||
|
|
||||||
|
var dstW, dstH int
|
||||||
|
if srcAspectRatio > maxAspectRatio {
|
||||||
|
dstW = maxW
|
||||||
|
dstH = int(float64(dstW) / srcAspectRatio)
|
||||||
|
} else {
|
||||||
|
dstH = maxH
|
||||||
|
dstW = int(float64(dstH) * srcAspectRatio)
|
||||||
|
}
|
||||||
|
|
||||||
|
return resize(img, dstW, dstH, filter)
|
||||||
|
}
|
||||||
|
|
||||||
|
func rotate(img image.Image, angle float64) *image.RGBA {
|
||||||
|
return transform.Rotate(img, angle, &transform.RotationOptions{ResizeBounds: true, Pivot: &image.Point{}})
|
||||||
|
}
|
||||||
|
|
||||||
|
func brightness(img image.Image, change float64) *image.RGBA {
|
||||||
|
return adjust.Brightness(img, change/100)
|
||||||
|
}
|
||||||
|
|
||||||
|
func contrast(img image.Image, change float64) *image.RGBA {
|
||||||
|
return adjust.Contrast(img, change/100)
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageToRGBA converts an image.Image to *image.RGBA.
|
||||||
|
func imageToRGBA(src image.Image) *image.RGBA {
|
||||||
|
if dst, ok := src.(*image.RGBA); ok {
|
||||||
|
return dst
|
||||||
|
}
|
||||||
|
|
||||||
|
b := src.Bounds()
|
||||||
|
dst := image.NewRGBA(b)
|
||||||
|
draw.Draw(dst, dst.Bounds(), src, b.Min, draw.Src)
|
||||||
|
|
||||||
|
return dst
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageToGray converts an image.Image to *image.Gray.
|
||||||
|
func imageToGray(src image.Image) *image.Gray {
|
||||||
|
if dst, ok := src.(*image.Gray); ok {
|
||||||
|
return dst
|
||||||
|
}
|
||||||
|
|
||||||
|
b := src.Bounds()
|
||||||
|
dst := image.NewGray(b)
|
||||||
|
draw.Draw(dst, dst.Bounds(), src, b.Min, draw.Src)
|
||||||
|
|
||||||
|
return dst
|
||||||
|
}
|
||||||
|
|
||||||
|
// isGrayScale checks if image is grayscale.
|
||||||
|
func isGrayScale(img image.Image) bool {
|
||||||
|
model := img.ColorModel()
|
||||||
|
if model == color.GrayModel || model == color.Gray16Model {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
var colors16 = []color.Color{
|
||||||
|
color.RGBA{0, 0, 0, 255},
|
||||||
|
color.RGBA{17, 17, 17, 255},
|
||||||
|
color.RGBA{34, 34, 34, 255},
|
||||||
|
color.RGBA{51, 51, 51, 255},
|
||||||
|
color.RGBA{68, 68, 68, 255},
|
||||||
|
color.RGBA{85, 85, 85, 255},
|
||||||
|
color.RGBA{102, 102, 102, 255},
|
||||||
|
color.RGBA{119, 119, 119, 255},
|
||||||
|
color.RGBA{136, 136, 136, 255},
|
||||||
|
color.RGBA{153, 153, 153, 255},
|
||||||
|
color.RGBA{170, 170, 170, 255},
|
||||||
|
color.RGBA{187, 187, 187, 255},
|
||||||
|
color.RGBA{204, 204, 204, 255},
|
||||||
|
color.RGBA{221, 221, 221, 255},
|
||||||
|
color.RGBA{238, 238, 238, 255},
|
||||||
|
color.RGBA{255, 255, 255, 255},
|
||||||
|
}
|
||||||
|
|
||||||
|
// imageToPaletted converts an image.Image to *image.Paletted using 16-color palette.
|
||||||
|
func imageToPaletted(src image.Image) *image.Paletted {
|
||||||
|
b := src.Bounds()
|
||||||
|
dst := image.NewPaletted(b, colors16)
|
||||||
|
draw.Draw(dst, dst.Bounds(), src, b.Min, draw.Src)
|
||||||
|
|
||||||
|
return dst
|
||||||
|
}
|
||||||
@@ -18,9 +18,6 @@ func TestConvert(t *testing.T) {
|
|||||||
|
|
||||||
conv := New(opts)
|
conv := New(opts)
|
||||||
|
|
||||||
conv.Initialize()
|
|
||||||
defer conv.Terminate()
|
|
||||||
|
|
||||||
files, err := conv.Files([]string{"testdata/test", "testdata"})
|
files, err := conv.Files([]string{"testdata/test", "testdata"})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
@@ -56,9 +53,6 @@ func TestCover(t *testing.T) {
|
|||||||
|
|
||||||
conv := New(opts)
|
conv := New(opts)
|
||||||
|
|
||||||
conv.Initialize()
|
|
||||||
defer conv.Terminate()
|
|
||||||
|
|
||||||
files, err := conv.Files([]string{"testdata/test.cbt"})
|
files, err := conv.Files([]string{"testdata/test.cbt"})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
@@ -88,9 +82,6 @@ func TestThumbnail(t *testing.T) {
|
|||||||
|
|
||||||
conv := New(opts)
|
conv := New(opts)
|
||||||
|
|
||||||
conv.Initialize()
|
|
||||||
defer conv.Terminate()
|
|
||||||
|
|
||||||
files, err := conv.Files([]string{"testdata/test.pdf"})
|
files, err := conv.Files([]string{"testdata/test.pdf"})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
@@ -1,10 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Name=CBconvert
|
|
||||||
GenericName=A Comic Book converter
|
|
||||||
Comment=A comic converter with support for .cb*, .pdf, .xps, .epub, .mobi and directories.
|
|
||||||
Exec=cbconvert-gui
|
|
||||||
Icon=cbconvert
|
|
||||||
Terminal=false
|
|
||||||
Type=Application
|
|
||||||
StartupNotify=true
|
|
||||||
Categories=Graphics;Utility;
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
diff -ur mupdf-1.23.3-source.orig/Makefile mupdf-1.23.3-source/Makefile
|
|
||||||
--- mupdf-1.23.3-source.orig/Makefile 2023-09-05 13:51:19.000000000 +0200
|
|
||||||
+++ mupdf-1.23.3-source/Makefile 2023-09-08 09:28:01.165486441 +0200
|
|
||||||
@@ -3,7 +3,7 @@
|
|
||||||
-include user.make
|
|
||||||
|
|
||||||
ifndef build
|
|
||||||
- build := release
|
|
||||||
+ build := debug
|
|
||||||
endif
|
|
||||||
|
|
||||||
default: all
|
|
||||||
@@ -290,17 +290,19 @@
|
|
||||||
$(THREAD_LIB) : $(THREAD_OBJ)
|
|
||||||
$(PKCS7_LIB) : $(PKCS7_OBJ)
|
|
||||||
else
|
|
||||||
-MUPDF_LIB = $(OUT)/libmupdf.a
|
|
||||||
+MUPDF_LIB = libmupdf.so
|
|
||||||
LIBS_TO_INSTALL_IN_LIB = $(MUPDF_LIB) $(THIRD_LIB)
|
|
||||||
-THIRD_LIB = $(OUT)/libmupdf-third.a
|
|
||||||
+THIRD_LIB =
|
|
||||||
+MUPDF_STATIC = $(OUT)/libmupdf.a
|
|
||||||
ifneq ($(USE_SYSTEM_GLUT),yes)
|
|
||||||
THIRD_GLUT_LIB = $(OUT)/libmupdf-glut.a
|
|
||||||
endif
|
|
||||||
THREAD_LIB = $(OUT)/libmupdf-threads.a
|
|
||||||
PKCS7_LIB = $(OUT)/libmupdf-pkcs7.a
|
|
||||||
|
|
||||||
-$(MUPDF_LIB) : $(MUPDF_OBJ)
|
|
||||||
-$(THIRD_LIB) : $(THIRD_OBJ)
|
|
||||||
+$(MUPDF_LIB) : $(MUPDF_OBJ) $(THIRD_OBJ)
|
|
||||||
+ $(QUIET_LINK) $(CC) $(LDFLAGS) --shared -Wl,-soname -Wl,$(MUPDF_LIB) -o $@ $^ $(THIRD_LIBS) $(LIBS)
|
|
||||||
+$(MUPDF_STATIC): $(MUPDF_OBJ) $(THIRD_OBJ)
|
|
||||||
$(THIRD_GLUT_LIB) : $(THIRD_GLUT_OBJ)
|
|
||||||
$(THREAD_LIB) : $(THREAD_OBJ)
|
|
||||||
$(PKCS7_LIB) : $(PKCS7_OBJ)
|
|
||||||
diff -ur mupdf-1.23.3-source.orig/Makethird mupdf-1.23.3-source/Makethird
|
|
||||||
--- mupdf-1.23.3-source.orig/Makethird 2023-09-05 13:51:19.000000000 +0200
|
|
||||||
+++ mupdf-1.23.3-source/Makethird 2023-09-08 01:16:56.785811250 +0200
|
|
||||||
@@ -2,16 +2,16 @@
|
|
||||||
|
|
||||||
ifeq ($(USE_SYSTEM_LIBS),yes)
|
|
||||||
USE_SYSTEM_FREETYPE := yes
|
|
||||||
- USE_SYSTEM_GUMBO := yes
|
|
||||||
+ USE_SYSTEM_GUMBO := no
|
|
||||||
USE_SYSTEM_HARFBUZZ := yes
|
|
||||||
- USE_SYSTEM_JBIG2DEC := yes
|
|
||||||
+ USE_SYSTEM_JBIG2DEC := no
|
|
||||||
USE_SYSTEM_JPEGXR := no # not available
|
|
||||||
USE_SYSTEM_LCMS2 := no # lcms2mt is strongly preferred
|
|
||||||
USE_SYSTEM_LIBJPEG := yes
|
|
||||||
USE_SYSTEM_MUJS := no # not available
|
|
||||||
- USE_SYSTEM_OPENJPEG := yes
|
|
||||||
+ USE_SYSTEM_OPENJPEG := no
|
|
||||||
USE_SYSTEM_ZLIB := yes
|
|
||||||
- USE_SYSTEM_GLUT := yes
|
|
||||||
+ USE_SYSTEM_GLUT := no
|
|
||||||
USE_SYSTEM_CURL := yes
|
|
||||||
USE_SYSTEM_LEPTONICA := yes
|
|
||||||
USE_SYSTEM_TESSERACT := yes
|
|
||||||
@@ -1,369 +0,0 @@
|
|||||||
app-id: io.github.gen2brain.cbconvert
|
|
||||||
runtime: org.freedesktop.Platform
|
|
||||||
runtime-version: '23.08'
|
|
||||||
sdk: org.freedesktop.Sdk
|
|
||||||
sdk-extensions:
|
|
||||||
- org.freedesktop.Sdk.Extension.golang
|
|
||||||
|
|
||||||
command: cbconvert-gui
|
|
||||||
|
|
||||||
finish-args:
|
|
||||||
- --share=ipc
|
|
||||||
- --socket=x11
|
|
||||||
|
|
||||||
build-options:
|
|
||||||
env:
|
|
||||||
- GOROOT=/usr/lib/sdk/golang
|
|
||||||
|
|
||||||
cleanup:
|
|
||||||
- '*.a'
|
|
||||||
- '*.la'
|
|
||||||
- '/bin/Magick*'
|
|
||||||
- '/etc'
|
|
||||||
- '/include'
|
|
||||||
- '/lib/cmake'
|
|
||||||
- '/lib/pkgconfig'
|
|
||||||
- '/lib/ImageMagick*'
|
|
||||||
- '/share'
|
|
||||||
|
|
||||||
modules:
|
|
||||||
|
|
||||||
- name: libheif
|
|
||||||
buildsystem: autotools
|
|
||||||
config-opts:
|
|
||||||
- --enable-shared
|
|
||||||
- --disable-static
|
|
||||||
- --disable-libde265
|
|
||||||
- --disable-dav1d
|
|
||||||
- --disable-go
|
|
||||||
- --disable-gdk-pixbuf
|
|
||||||
- --disable-rav1e
|
|
||||||
- --disable-x265
|
|
||||||
- --disable-tests
|
|
||||||
- --disable-examples
|
|
||||||
sources:
|
|
||||||
- type: archive
|
|
||||||
url: https://github.com/strukturag/libheif/releases/download/v1.15.2/libheif-1.15.2.tar.gz
|
|
||||||
sha256: 7a4c6077f45180926583e2087571371bdd9cb21b6e6fada85a6fbd544f26a0e2
|
|
||||||
|
|
||||||
- name: highway
|
|
||||||
buildsystem: cmake
|
|
||||||
config-opts:
|
|
||||||
- -DBUILD_SHARED_LIBS=ON
|
|
||||||
- -DHWY_ENABLE_TESTS=OFF
|
|
||||||
- -DHWY_ENABLE_EXAMPLES=OFF
|
|
||||||
- -DHWY_WARNINGS_ARE_ERRORS=OFF
|
|
||||||
sources:
|
|
||||||
- type: archive
|
|
||||||
url: https://github.com/google/highway/archive/refs/tags/1.0.7.tar.gz
|
|
||||||
sha256: 5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
|
|
||||||
|
|
||||||
- name: libjxl
|
|
||||||
buildsystem: cmake
|
|
||||||
config-opts:
|
|
||||||
- -DBUILD_SHARED_LIBS=ON
|
|
||||||
- -DJPEGXL_ENABLE_BENCHMARK=OFF
|
|
||||||
- -DJPEGXL_ENABLE_COVERAGE=OFF
|
|
||||||
- -DJPEGXL_ENABLE_FUZZERS=OFF
|
|
||||||
- -DJPEGXL_ENABLE_SJPEG=OFF
|
|
||||||
- -DJPEGXL_WARNINGS_AS_ERRORS=OFF
|
|
||||||
- -DJPEGXL_ENABLE_SKCMS=OFF
|
|
||||||
- -DJPEGXL_ENABLE_VIEWERS=OFF
|
|
||||||
- -DJPEGXL_ENABLE_PLUGINS=OFF
|
|
||||||
- -DJPEGXL_ENABLE_DOXYGEN=OFF
|
|
||||||
- -DJPEGXL_ENABLE_MANPAGES=OFF
|
|
||||||
- -DJPEGXL_ENABLE_JNI=OFF
|
|
||||||
- -DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF
|
|
||||||
- -DJPEGXL_ENABLE_TCMALLOC=OFF
|
|
||||||
- -DJPEGXL_ENABLE_EXAMPLES=OFF
|
|
||||||
- -DJPEGXL_ENABLE_TOOLS=OFF
|
|
||||||
- -DJPEGXL_ENABLE_OPENEXR=OFF
|
|
||||||
- -DBUILD_TESTING=OFF
|
|
||||||
- -DJPEGXL_FORCE_SYSTEM_BROTLI=ON
|
|
||||||
- -DJPEGXL_FORCE_SYSTEM_LCMS2=ON
|
|
||||||
sources:
|
|
||||||
- type: archive
|
|
||||||
url: https://github.com/libjxl/libjxl/archive/refs/tags/v0.8.2.tar.gz
|
|
||||||
sha256: c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
|
|
||||||
|
|
||||||
- name: ImageMagick
|
|
||||||
buildsystem: autotools
|
|
||||||
config-opts:
|
|
||||||
- --enable-shared
|
|
||||||
- --disable-static
|
|
||||||
- --enable-zero-configuration
|
|
||||||
- --without-frozenpaths
|
|
||||||
- --without-utilities
|
|
||||||
- --without-modules
|
|
||||||
- --without-magick-plus-plus
|
|
||||||
- --without-perl
|
|
||||||
- --without-bzlib
|
|
||||||
- --without-x
|
|
||||||
- --without-zip
|
|
||||||
- --without-dps
|
|
||||||
- --without-djvu
|
|
||||||
- --without-autotrace
|
|
||||||
- --without-fftw
|
|
||||||
- --without-fpx
|
|
||||||
- --without-fontconfig
|
|
||||||
- --without-freetype
|
|
||||||
- --without-gslib
|
|
||||||
- --without-gvc
|
|
||||||
- --without-jbig
|
|
||||||
- --without-openjp2
|
|
||||||
- --without-lcms
|
|
||||||
- --without-lqr
|
|
||||||
- --without-lzma
|
|
||||||
- --without-openexr
|
|
||||||
- --without-pango
|
|
||||||
- --without-raw
|
|
||||||
- --without-rsvg
|
|
||||||
- --without-wmf
|
|
||||||
- --without-xml
|
|
||||||
- --disable-hdri
|
|
||||||
- --disable-opencl
|
|
||||||
- --disable-openmp
|
|
||||||
- --with-jpeg
|
|
||||||
- --with-png
|
|
||||||
- --with-tiff
|
|
||||||
- --with-webp
|
|
||||||
- --with-heic
|
|
||||||
- --with-jxl
|
|
||||||
sources:
|
|
||||||
- type: archive
|
|
||||||
url: https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.1-15.tar.gz
|
|
||||||
sha256: 2372192a76af9be43c0543dd7ae6dfbf34b11fc0203583453ce3f9f707c36bcc
|
|
||||||
|
|
||||||
- name: MuPDF
|
|
||||||
buildsystem: simple
|
|
||||||
build-commands:
|
|
||||||
- HAVE_X11=no HAVE_LIBCRYPTO=no HAVE_GLUT=no HAVE_OBJCOPY=no USE_SYSTEM_LIBS=yes build=debug shared=yes tofu=yes tofu_cjk=yes make libs
|
|
||||||
- install -Dm00755 build/shared-debug-tofu-tofu_cjk/libmupdf.so $FLATPAK_DEST/lib/debug/lib/libmupdf.so.debug
|
|
||||||
- install -dm00755 $FLATPAK_DEST/lib/debug/source/mupdf/source
|
|
||||||
- cp -r source $FLATPAK_DEST/lib/debug/source/mupdf
|
|
||||||
- cp -r include/mupdf $FLATPAK_DEST/include/
|
|
||||||
- install -Dsm00755 build/shared-debug-tofu-tofu_cjk/libmupdf.so $FLATPAK_DEST/lib/libmupdf.so
|
|
||||||
sources:
|
|
||||||
- type: archive
|
|
||||||
url: https://mupdf.com/downloads/archive/mupdf-1.23.3-source.tar.gz
|
|
||||||
sha256: 1ef9a6409bc0a3271586e1b16f78eb156a579521cd212a124b57c4da8b940aad
|
|
||||||
- type: patch
|
|
||||||
path: 01-mupdf-shared.patch
|
|
||||||
|
|
||||||
- name: CBconvert
|
|
||||||
buildsystem: simple
|
|
||||||
build-commands:
|
|
||||||
- cp cmd/cbconvert-gui/dist/linux/flatpak/modules.txt cmd/cbconvert-gui/vendor/
|
|
||||||
- cd cmd/cbconvert-gui && $GOROOT/bin/go build -mod=vendor -trimpath -tags "extlib portal" -ldflags "-s -w -X main.appVersion=1.0.1"
|
|
||||||
- install -Dm00755 cmd/cbconvert-gui/cbconvert-gui $FLATPAK_DEST/bin/cbconvert-gui
|
|
||||||
- install -Dm00644 cmd/cbconvert-gui/dist/linux/cbconvert.png $FLATPAK_DEST/share/icons/hicolor/256x256/apps/$FLATPAK_ID.png
|
|
||||||
- install -Dm00644 cmd/cbconvert-gui/dist/linux/flatpak/$FLATPAK_ID.desktop $FLATPAK_DEST/share/applications/$FLATPAK_ID.desktop
|
|
||||||
- install -Dm00644 cmd/cbconvert-gui/dist/linux/flatpak/$FLATPAK_ID.metainfo.xml $FLATPAK_DEST/share/metainfo/$FLATPAK_ID.metainfo.xml
|
|
||||||
sources:
|
|
||||||
- type: archive
|
|
||||||
url: https://github.com/gen2brain/cbconvert/archive/refs/tags/v1.0.1.tar.gz
|
|
||||||
sha256: 2ba51b3ef9cddeed8a64da34ee2d7a6cb931e50fb6f9c944c13c59cbcc5f33e2
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/gen2brain/cbconvert/@v/v1.0.1.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/gen2brain/cbconvert
|
|
||||||
sha256: 57e0052fb89a7361e44f844dca0177f31935776f75ff799a3cc233e2260ef055
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/chai2010/webp/@v/v1.1.1.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/chai2010/webp
|
|
||||||
sha256: f42fe1697007ea12155a5d1342d61787e1f34ca396192e4995dc4f2b350552ac
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/davecgh/go-spew/@v/v1.1.1.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/davecgh/go-spew
|
|
||||||
sha256: 6b44a843951f371b7010c754ecc3cabefe815d5ced1c5b9409fb2d697e8a890d
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/disintegration/imaging/@v/v1.6.2.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/disintegration/imaging
|
|
||||||
sha256: 2934e7bace3c8c0b1b4a07144197e8720b9ffbe922600e3a3c764f77792ac7c4
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/dustin/go-humanize/@v/v1.0.1.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/dustin/go-humanize
|
|
||||||
sha256: 319404ea84c8a4e2d3d83f30988b006e7dd04976de3e1a1a90484ad94679fa46
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/fvbommel/sortorder/@v/v1.1.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/fvbommel/sortorder
|
|
||||||
sha256: a4dbc58d2f72212474a7b5e1894b11d6712b687f4cc66ca1f6e202a375d252f7
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/gen2brain/go-fitz/@v/v1.23.1.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/gen2brain/go-fitz
|
|
||||||
sha256: 60fc98c3420d7f7347e7a454fdfd66bca960accc8ed0ac582f4b4d82b38513c8
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/gen2brain/go-unarr/@v/v0.1.7.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/gen2brain/go-unarr
|
|
||||||
sha256: 6f3418edef461c2e1ce5ba77141d402b04d4cf86e89b27c5dc20c922ac63ca4e
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/gen2brain/iup-go/iup/@v/v0.0.0-20230906093706-8b037fe6a7bd.zip
|
|
||||||
strip-components: 4
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/gen2brain/iup-go/iup
|
|
||||||
sha256: a75dbec0ce228214533ee971771233f8b57653828af04bc012f72b624b76be5d
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/godbus/dbus/v5/@v/v5.1.0.zip
|
|
||||||
strip-components: 4
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/godbus/dbus/v5
|
|
||||||
sha256: 03dfa8e71089a6f477310d15c4d3a036d82d028532881b50fee254358e782ad9
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/google/uuid/@v/v1.3.1.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/google/uuid
|
|
||||||
sha256: 9d9d6cfb28ce6dbe4b518c42c6bccd67bb531a106859808f36e82a5c3fb8c64d
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/k0kubun/go-ansi/@v/v0.0.0-20180517002512-3bf9e2903213.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/k0kubun/go-ansi
|
|
||||||
sha256: 28366085f1787eaf9d6589f050455855f01caf559f2c6d1c4f4e590cd0abbdef
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/mattn/go-isatty/@v/v0.0.16.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/mattn/go-isatty
|
|
||||||
sha256: 3d5ff19c4b2a2a164feb84f5cc38af349380c0c4a03d0443dce40bbd6ec3fd2b
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/mattn/go-runewidth/@v/v0.0.13.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/mattn/go-runewidth
|
|
||||||
sha256: c104e14c1612a6d736bd109fe5fec9749a8146e1f7d37844d8a0a1296e00d4e9
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/mitchellh/colorstring/@v/v0.0.0-20190213212951-d06e56a500db.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/mitchellh/colorstring
|
|
||||||
sha256: d0733284b20567055e374b420373f5508fa47e95204e59e4b8a66834e7e3964d
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/pmezard/go-difflib/@v/v1.0.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/pmezard/go-difflib
|
|
||||||
sha256: de04cecc1a4b8d53e4357051026794bcbc54f2e6a260cfac508ce69d5d6457a0
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/rivo/uniseg/@v/v0.3.4.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/rivo/uniseg
|
|
||||||
sha256: 410ba5034e1683946d68e7fd50ad793c2ad72b157f2959fe4719449666d1e63f
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/schollz/progressbar/v3/@v/v3.10.0.zip
|
|
||||||
strip-components: 4
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/schollz/progressbar/v3
|
|
||||||
sha256: 2cdbf5e4bc314bf140911a923f22d5d9401d73f3b2c7311f6df5c2837d2743ba
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/spf13/pflag/@v/v1.0.5.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/spf13/pflag
|
|
||||||
sha256: fc6e704f2f6a84ddcdce6de0404e5340fa20c8676181bf5d381b17888107ba84
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/stretchr/objx/@v/v0.1.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/stretchr/objx
|
|
||||||
sha256: 1fa10dab404ed7fc8ed2a033f8784187d5df3513ced3841ce39e46d37850eb1d
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/stretchr/testify/@v/v1.3.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/stretchr/testify
|
|
||||||
sha256: 8c935aed71cc334d5bfdf04b34909d9965cf28f80198dec13fb954dc292e6588
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/strukturag/libheif/@v/v1.15.2.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/strukturag/libheif
|
|
||||||
sha256: bec8ad8e81d33d96b9ea8d11036a14ff4501b62f2cb79dbe49147a701c5c1d38
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/github.com/yuin/goldmark/@v/v1.4.13.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/github.com/yuin/goldmark
|
|
||||||
sha256: bb41a602b174345fda392c8ad83fcc93217c285c763699677630be90feb7a5e3
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/crypto/@v/v0.0.0-20210921155107-089bfa567519.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/crypto
|
|
||||||
sha256: eb2426a7891915213cc5da1da7b6fc6e9e2cf253d518d8e169e038e287f414e3
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/image/@v/v0.12.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/image
|
|
||||||
sha256: eee2ea2f688c5bbe2a8ce36ba57f37573f5b63828560cd34f8621f0f8d07e6bd
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/mod/@v/v0.8.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/mod
|
|
||||||
sha256: 4ae8176799d8cda819e70731ba6855735003e7e4930436e34584c75c96c496e0
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/net/@v/v0.6.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/net
|
|
||||||
sha256: 7ff2f50b1f3a58833f867d1646421569a91d8c19a0999793c5af79b10c16b8b8
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/sync/@v/v0.3.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/sync
|
|
||||||
sha256: 1870e7a196f7119d4c6edba7de9cdfc49ee13c8cb7921f3a947568171c6152e0
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/sys/@v/v0.5.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/sys
|
|
||||||
sha256: cf47336ac1bf675fa6d6dd5ac5399b0143c513404c449fa3f3380a58123c7908
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/term/@v/v0.5.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/term
|
|
||||||
sha256: 7d89c49ab41306950128a0f4b7c67fb8e2d2f637ece8e024e6cf38d17a33193b
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/text/@v/v0.13.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/text
|
|
||||||
sha256: ed544fb017e967c053892df7b068612fce707ba32b57f35824cb041e31c6ae0f
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/tools/@v/v0.6.0.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/tools
|
|
||||||
sha256: 9a29c8904c2acd4b65825e916cbdaf417086f35bb68c54af9a6283a0e1341e85
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/golang.org/x/xerrors/@v/v0.0.0-20190717185122-a985d3407aa7.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/golang.org/x/xerrors
|
|
||||||
sha256: c4e9f063cfed546c90f00a9657deac4f915a8994f8cbe6dbd3f18e79eb8302cf
|
|
||||||
|
|
||||||
- type: archive
|
|
||||||
url: https://proxy.golang.org/gopkg.in/gographics/imagick.v3/@v/v3.4.3.zip
|
|
||||||
strip-components: 3
|
|
||||||
dest: cmd/cbconvert-gui/vendor/gopkg.in/gographics/imagick.v3
|
|
||||||
sha256: ae0a425a2ffcbe92447c5da005deff2c0aac1e25995c443b86ae4bd48861d9e1
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
# github.com/chai2010/webp v1.1.1
|
|
||||||
## explicit; go 1.17
|
|
||||||
github.com/chai2010/webp
|
|
||||||
# github.com/disintegration/imaging v1.6.2
|
|
||||||
## explicit
|
|
||||||
github.com/disintegration/imaging
|
|
||||||
# github.com/dustin/go-humanize v1.0.1
|
|
||||||
## explicit; go 1.16
|
|
||||||
github.com/dustin/go-humanize
|
|
||||||
# github.com/fvbommel/sortorder v1.1.0
|
|
||||||
## explicit; go 1.13
|
|
||||||
github.com/fvbommel/sortorder
|
|
||||||
# github.com/gen2brain/cbconvert v1.0.0
|
|
||||||
## explicit; go 1.21
|
|
||||||
github.com/gen2brain/cbconvert
|
|
||||||
# github.com/gen2brain/go-fitz v1.23.1
|
|
||||||
## explicit; go 1.20
|
|
||||||
github.com/gen2brain/go-fitz
|
|
||||||
# github.com/gen2brain/go-unarr v0.1.7
|
|
||||||
## explicit; go 1.18
|
|
||||||
github.com/gen2brain/go-unarr
|
|
||||||
github.com/gen2brain/go-unarr/unarrc
|
|
||||||
# github.com/gen2brain/iup-go/iup v0.0.0-20230906093706-8b037fe6a7bd
|
|
||||||
## explicit; go 1.19
|
|
||||||
github.com/gen2brain/iup-go/iup
|
|
||||||
github.com/gen2brain/iup-go/iup/manifest
|
|
||||||
# github.com/godbus/dbus/v5 v5.1.0
|
|
||||||
## explicit; go 1.12
|
|
||||||
github.com/godbus/dbus/v5
|
|
||||||
# github.com/google/uuid v1.3.1
|
|
||||||
## explicit
|
|
||||||
github.com/google/uuid
|
|
||||||
# golang.org/x/image v0.12.0
|
|
||||||
## explicit; go 1.12
|
|
||||||
golang.org/x/image/bmp
|
|
||||||
golang.org/x/image/ccitt
|
|
||||||
golang.org/x/image/tiff
|
|
||||||
golang.org/x/image/tiff/lzw
|
|
||||||
# golang.org/x/sync v0.3.0
|
|
||||||
## explicit; go 1.17
|
|
||||||
golang.org/x/sync/errgroup
|
|
||||||
# gopkg.in/gographics/imagick.v3 v3.4.3
|
|
||||||
## explicit; go 1.13
|
|
||||||
gopkg.in/gographics/imagick.v3/imagick
|
|
||||||
gopkg.in/gographics/imagick.v3/imagick/types
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=CBconvert
|
Name=CBconvert
|
||||||
GenericName=A Comic Book converter
|
GenericName=A Comic Book converter
|
||||||
Comment=A comic converter with support for .cb*, .pdf, .xps, .epub, .mobi and directories
|
Comment=A comic converter with support for .cb*, .pdf, .xps, .epub, .mobi and directories.
|
||||||
Exec=cbconvert-gui
|
Exec=cbconvert-gui
|
||||||
Icon=io.github.gen2brain.cbconvert
|
Icon=io.github.gen2brain.cbconvert
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
Categories=Graphics;
|
Categories=Graphics;Utility;
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
<id>io.github.gen2brain.cbconvert</id>
|
<id>io.github.gen2brain.cbconvert</id>
|
||||||
|
|
||||||
<name>CBconvert</name>
|
<name>CBconvert</name>
|
||||||
<developer_name>Milan Nikolic</developer_name>
|
|
||||||
<summary>A Comic Book converter</summary>
|
<summary>A Comic Book converter</summary>
|
||||||
|
|
||||||
<metadata_license>MIT</metadata_license>
|
<metadata_license>MIT</metadata_license>
|
||||||
@@ -16,20 +15,64 @@
|
|||||||
</p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<developer id="com.github.gen2brain">
|
||||||
|
<name>Milan Nikolic</name>
|
||||||
|
</developer>
|
||||||
|
|
||||||
<launchable type="desktop-id">io.github.gen2brain.cbconvert.desktop</launchable>
|
<launchable type="desktop-id">io.github.gen2brain.cbconvert.desktop</launchable>
|
||||||
|
|
||||||
<screenshots>
|
<screenshots>
|
||||||
<screenshot type="default">
|
<screenshot type="default">
|
||||||
<image>https://raw.githubusercontent.com/gen2brain/cbconvert/master/cmd/cbconvert-gui/screenshots/linux-02.jpg</image>
|
<caption>Options</caption>
|
||||||
|
<image>https://raw.githubusercontent.com/gen2brain/cbconvert/master/cmd/cbconvert-gui/screenshots/linux-01.jpg</image>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
<screenshot>
|
<screenshot>
|
||||||
<image>https://raw.githubusercontent.com/gen2brain/cbconvert/master/cmd/cbconvert-gui/screenshots/linux-01.jpg</image>
|
<caption>Converting</caption>
|
||||||
|
<image>https://raw.githubusercontent.com/gen2brain/cbconvert/master/cmd/cbconvert-gui/screenshots/linux-02.jpg</image>
|
||||||
</screenshot>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
|
|
||||||
<url type="homepage">https://github.com/gen2brain/cbconvert</url>
|
<url type="homepage">https://github.com/gen2brain/cbconvert</url>
|
||||||
<url type="bugtracker">https://github.com/gen2brain/cbconvert/issues</url>
|
<url type="bugtracker">https://github.com/gen2brain/cbconvert/issues</url>
|
||||||
|
|
||||||
|
<content_rating type="oars-1.1"/>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="1.1.0" date="2024-11-06" type="stable">
|
||||||
|
<description>
|
||||||
|
<ul>
|
||||||
|
<li>Use jpegli for smaller files</li>
|
||||||
|
<li>Remove ImageMagick dependency</li>
|
||||||
|
<li>Wayland support</li>
|
||||||
|
<li>Support for DOCX and PPTX</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
<url type="details">https://github.com/gen2brain/cbconvert/releases/tag/v1.1.0</url>
|
||||||
|
</release>
|
||||||
|
<release version="1.0.4" date="2024-02-08" type="stable">
|
||||||
|
<description>
|
||||||
|
<ul>
|
||||||
|
<li>Update modules and dependencies</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
<url type="details">https://github.com/gen2brain/cbconvert/releases/tag/v1.0.4</url>
|
||||||
|
</release>
|
||||||
|
<release version="1.0.3" date="2023-09-14" type="stable">
|
||||||
|
<description>
|
||||||
|
<ul>
|
||||||
|
<li>Add content rating</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
<url type="details">https://github.com/gen2brain/cbconvert/releases/tag/v1.0.3</url>
|
||||||
|
</release>
|
||||||
|
<release version="1.0.2" date="2023-09-14" type="stable">
|
||||||
|
<description>
|
||||||
|
<ul>
|
||||||
|
<li>Change flatpak exec/command name to cbconvert</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
<url type="details">https://github.com/gen2brain/cbconvert/releases/tag/v1.0.2</url>
|
||||||
|
</release>
|
||||||
<release version="1.0.1" date="2023-09-14" type="stable">
|
<release version="1.0.1" date="2023-09-14" type="stable">
|
||||||
<description>
|
<description>
|
||||||
<ul>
|
<ul>
|
||||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,4 +1,4 @@
|
|||||||
[Thumbnailer Entry]
|
[Thumbnailer Entry]
|
||||||
TryExec=cbconvert
|
TryExec=cbconvert
|
||||||
Exec=cbconvert thumbnail --quiet --width %s --outfile %o %i
|
Exec=cbconvert thumbnail --quiet --width %s --outfile %o %i
|
||||||
MimeType=application/pdf;application/x-cb7;application/x-cbt;application/epub+zip;application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-mobipocket-ebook;application/vnd.ms-xpsdocument;
|
MimeType=application/pdf;application/x-cb7;application/x-cbt;application/epub+zip;application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-mobipocket-ebook;application/vnd.ms-xpsdocument;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
# github.com/anthonynsimon/bild v0.14.0
|
||||||
|
## explicit; go 1.21
|
||||||
|
github.com/anthonynsimon/bild/adjust
|
||||||
|
github.com/anthonynsimon/bild/clone
|
||||||
|
github.com/anthonynsimon/bild/math/f64
|
||||||
|
github.com/anthonynsimon/bild/parallel
|
||||||
|
github.com/anthonynsimon/bild/transform
|
||||||
|
github.com/anthonynsimon/bild/util
|
||||||
|
# github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d
|
||||||
|
## explicit; go 1.13
|
||||||
|
github.com/dsoprea/go-exif/v2
|
||||||
|
github.com/dsoprea/go-exif/v2/common
|
||||||
|
github.com/dsoprea/go-exif/v2/undefined
|
||||||
|
# github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd
|
||||||
|
## explicit; go 1.13
|
||||||
|
github.com/dsoprea/go-logging
|
||||||
|
# github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d
|
||||||
|
## explicit; go 1.13
|
||||||
|
github.com/dsoprea/go-png-image-structure
|
||||||
|
# github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349
|
||||||
|
## explicit; go 1.12
|
||||||
|
github.com/dsoprea/go-utility/image
|
||||||
|
# github.com/dustin/go-humanize v1.0.1
|
||||||
|
## explicit; go 1.16
|
||||||
|
github.com/dustin/go-humanize
|
||||||
|
# github.com/ebitengine/purego v0.8.1
|
||||||
|
## explicit; go 1.18
|
||||||
|
github.com/ebitengine/purego
|
||||||
|
github.com/ebitengine/purego/internal/cgo
|
||||||
|
github.com/ebitengine/purego/internal/fakecgo
|
||||||
|
github.com/ebitengine/purego/internal/strings
|
||||||
|
# github.com/fvbommel/sortorder v1.1.0
|
||||||
|
## explicit; go 1.13
|
||||||
|
github.com/fvbommel/sortorder
|
||||||
|
# github.com/gen2brain/avif v0.4.1
|
||||||
|
## explicit; go 1.21
|
||||||
|
github.com/gen2brain/avif
|
||||||
|
# github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca
|
||||||
|
## explicit; go 1.23
|
||||||
|
github.com/gen2brain/cbconvert
|
||||||
|
# github.com/gen2brain/go-fitz v1.24.14
|
||||||
|
## explicit; go 1.22
|
||||||
|
github.com/gen2brain/go-fitz
|
||||||
|
github.com/gen2brain/go-fitz/include/mupdf
|
||||||
|
github.com/gen2brain/go-fitz/include/mupdf/fitz
|
||||||
|
github.com/gen2brain/go-fitz/libs
|
||||||
|
# github.com/gen2brain/go-unarr v0.2.4
|
||||||
|
## explicit; go 1.21
|
||||||
|
github.com/gen2brain/go-unarr
|
||||||
|
github.com/gen2brain/go-unarr/unarrc
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/bzip2
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr/_7z
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr/common
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr/lzmasdk
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr/rar
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr/tar
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/unarr/zip
|
||||||
|
github.com/gen2brain/go-unarr/unarrc/external/zlib
|
||||||
|
# github.com/gen2brain/iup-go/iup v0.0.0-20241106050025-0f971ac33ed4
|
||||||
|
## explicit; go 1.22
|
||||||
|
github.com/gen2brain/iup-go/iup
|
||||||
|
github.com/gen2brain/iup-go/iup/external
|
||||||
|
github.com/gen2brain/iup-go/iup/external/include
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src/cocoa
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src/gtk
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src/mot
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src/win
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src/win/wdl
|
||||||
|
github.com/gen2brain/iup-go/iup/external/src/win/wdl/dummy
|
||||||
|
github.com/gen2brain/iup-go/iup/external/srcgl
|
||||||
|
github.com/gen2brain/iup-go/iup/manifest
|
||||||
|
# github.com/gen2brain/jpegli v0.3.3
|
||||||
|
## explicit; go 1.22
|
||||||
|
github.com/gen2brain/jpegli
|
||||||
|
# github.com/gen2brain/jpegxl v0.4.2
|
||||||
|
## explicit; go 1.22
|
||||||
|
github.com/gen2brain/jpegxl
|
||||||
|
# github.com/gen2brain/webp v0.5.1
|
||||||
|
## explicit; go 1.22
|
||||||
|
github.com/gen2brain/webp
|
||||||
|
# github.com/go-errors/errors v1.5.1
|
||||||
|
## explicit; go 1.14
|
||||||
|
github.com/go-errors/errors
|
||||||
|
# github.com/godbus/dbus/v5 v5.1.0
|
||||||
|
## explicit; go 1.12
|
||||||
|
github.com/godbus/dbus/v5
|
||||||
|
# github.com/golang/geo v0.0.0-20230421003525-6adc56603217
|
||||||
|
## explicit; go 1.18
|
||||||
|
github.com/golang/geo/r1
|
||||||
|
github.com/golang/geo/r2
|
||||||
|
github.com/golang/geo/r3
|
||||||
|
github.com/golang/geo/s1
|
||||||
|
github.com/golang/geo/s2
|
||||||
|
# github.com/google/uuid v1.6.0
|
||||||
|
## explicit
|
||||||
|
github.com/google/uuid
|
||||||
|
# github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25
|
||||||
|
## explicit
|
||||||
|
github.com/jsummers/gobmp
|
||||||
|
# github.com/jupiterrider/ffi v0.2.1
|
||||||
|
## explicit; go 1.18
|
||||||
|
github.com/jupiterrider/ffi
|
||||||
|
# github.com/tetratelabs/wazero v1.8.1
|
||||||
|
## explicit; go 1.21
|
||||||
|
github.com/tetratelabs/wazero
|
||||||
|
github.com/tetratelabs/wazero/api
|
||||||
|
github.com/tetratelabs/wazero/experimental
|
||||||
|
github.com/tetratelabs/wazero/experimental/sys
|
||||||
|
github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1
|
||||||
|
github.com/tetratelabs/wazero/internal/descriptor
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/interpreter
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/backend
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/arm64
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/backend/regalloc
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/frontend
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/ssa
|
||||||
|
github.com/tetratelabs/wazero/internal/engine/wazevo/wazevoapi
|
||||||
|
github.com/tetratelabs/wazero/internal/expctxkeys
|
||||||
|
github.com/tetratelabs/wazero/internal/filecache
|
||||||
|
github.com/tetratelabs/wazero/internal/fsapi
|
||||||
|
github.com/tetratelabs/wazero/internal/ieee754
|
||||||
|
github.com/tetratelabs/wazero/internal/internalapi
|
||||||
|
github.com/tetratelabs/wazero/internal/leb128
|
||||||
|
github.com/tetratelabs/wazero/internal/moremath
|
||||||
|
github.com/tetratelabs/wazero/internal/platform
|
||||||
|
github.com/tetratelabs/wazero/internal/sock
|
||||||
|
github.com/tetratelabs/wazero/internal/sys
|
||||||
|
github.com/tetratelabs/wazero/internal/sysfs
|
||||||
|
github.com/tetratelabs/wazero/internal/u32
|
||||||
|
github.com/tetratelabs/wazero/internal/u64
|
||||||
|
github.com/tetratelabs/wazero/internal/version
|
||||||
|
github.com/tetratelabs/wazero/internal/wasip1
|
||||||
|
github.com/tetratelabs/wazero/internal/wasm
|
||||||
|
github.com/tetratelabs/wazero/internal/wasm/binary
|
||||||
|
github.com/tetratelabs/wazero/internal/wasmdebug
|
||||||
|
github.com/tetratelabs/wazero/internal/wasmruntime
|
||||||
|
github.com/tetratelabs/wazero/sys
|
||||||
|
# golang.org/x/image v0.21.0
|
||||||
|
## explicit; go 1.18
|
||||||
|
golang.org/x/image/ccitt
|
||||||
|
golang.org/x/image/tiff
|
||||||
|
golang.org/x/image/tiff/lzw
|
||||||
|
# golang.org/x/net v0.30.0
|
||||||
|
## explicit; go 1.18
|
||||||
|
golang.org/x/net/context
|
||||||
|
# golang.org/x/sync v0.8.0
|
||||||
|
## explicit; go 1.18
|
||||||
|
golang.org/x/sync/errgroup
|
||||||
|
# gopkg.in/yaml.v2 v2.4.0
|
||||||
|
## explicit; go 1.15
|
||||||
|
gopkg.in/yaml.v2
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<string>icon</string>
|
<string>icon</string>
|
||||||
|
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.github.gen2brain.cbconvert</string>
|
<string>io.github.gen2brain.cbconvert</string>
|
||||||
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
|
|||||||
@@ -1,22 +1,36 @@
|
|||||||
module github.com/gen2brain/cbconvert/cmd/cbconvert-gui
|
module github.com/gen2brain/cbconvert/cmd/cbconvert-gui
|
||||||
|
|
||||||
go 1.21
|
go 1.23
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gen2brain/cbconvert v1.0.0
|
github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca
|
||||||
github.com/gen2brain/iup-go/iup v0.0.0-20230906093706-8b037fe6a7bd
|
github.com/gen2brain/iup-go/iup v0.0.0-20241106050025-0f971ac33ed4
|
||||||
github.com/godbus/dbus/v5 v5.1.0
|
github.com/godbus/dbus/v5 v5.1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/chai2010/webp v1.1.1 // indirect
|
github.com/anthonynsimon/bild v0.14.0 // indirect
|
||||||
github.com/disintegration/imaging v1.6.2 // indirect
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d // indirect
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d // indirect
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 // indirect
|
||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
|
github.com/ebitengine/purego v0.8.1 // indirect
|
||||||
github.com/fvbommel/sortorder v1.1.0 // indirect
|
github.com/fvbommel/sortorder v1.1.0 // indirect
|
||||||
github.com/gen2brain/go-fitz v1.23.1 // indirect
|
github.com/gen2brain/avif v0.4.1 // indirect
|
||||||
github.com/gen2brain/go-unarr v0.1.7 // indirect
|
github.com/gen2brain/go-fitz v1.24.14 // indirect
|
||||||
github.com/google/uuid v1.3.1 // indirect
|
github.com/gen2brain/go-unarr v0.2.4 // indirect
|
||||||
golang.org/x/image v0.12.0 // indirect
|
github.com/gen2brain/jpegli v0.3.3 // indirect
|
||||||
golang.org/x/sync v0.3.0 // indirect
|
github.com/gen2brain/jpegxl v0.4.2 // indirect
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3 // indirect
|
github.com/gen2brain/webp v0.5.1 // indirect
|
||||||
|
github.com/go-errors/errors v1.5.1 // indirect
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect
|
||||||
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
|
||||||
|
github.com/jupiterrider/ffi v0.2.1 // indirect
|
||||||
|
github.com/tetratelabs/wazero v1.8.1 // indirect
|
||||||
|
golang.org/x/image v0.21.0 // indirect
|
||||||
|
golang.org/x/net v0.30.0 // indirect
|
||||||
|
golang.org/x/sync v0.8.0 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,58 +1,81 @@
|
|||||||
github.com/chai2010/webp v1.1.1 h1:jTRmEccAJ4MGrhFOrPMpNGIJ/eybIgwKpcACsrTEapk=
|
github.com/anthonynsimon/bild v0.14.0 h1:IFRkmKdNdqmexXHfEU7rPlAmdUZ8BDZEGtGHDnGWync=
|
||||||
github.com/chai2010/webp v1.1.1/go.mod h1:0XVwvZWdjjdxpUEIf7b9g9VkHFnInUSYujwqTLEuldU=
|
github.com/anthonynsimon/bild v0.14.0/go.mod h1:hcvEAyBjTW69qkKJTfpcDQ83sSZHxwOunsseDfeQhUs=
|
||||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
github.com/dsoprea/go-exif/v2 v2.0.0-20200321225314-640175a69fe4/go.mod h1:Lm2lMM2zx8p4a34ZemkaUV95AnMl4ZvLbCUbwOvLC2E=
|
||||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
github.com/dsoprea/go-exif/v2 v2.0.0-20200604193436-ca8584a0e1c4/go.mod h1:9EXlPeHfblFFnwu5UOqmP2eoZfJyAZ2Ri/Vki33ajO0=
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d h1:yeH8wrJa3+8uKKDAdURHUK1ds2UvKhMqX2MiOdVeKPs=
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d/go.mod h1:oKrjk2kb3rAR5NbtSTLUMvMSbc+k8ZosI3MaVH47noc=
|
||||||
|
github.com/dsoprea/go-exif/v3 v3.0.0-20200717053412-08f1b6708903/go.mod h1:0nsO1ce0mh5czxGeLo4+OCZ/C6Eo6ZlMWsz7rH/Gxv8=
|
||||||
|
github.com/dsoprea/go-exif/v3 v3.0.0-20210512043655-120bcdb2a55e/go.mod h1:cg5SNYKHMmzxsr9X6ZeLh/nfBRHHp5PngtEPcujONtk=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200517223158-a10564966e9d/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd h1:l+vLbuxptsC6VQyQsfD7NnEC8BZuFpz45PgY+pH8YTg=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d h1:8+qI8ant/vZkNSsbwSjIR6XJfWcDVTg/qx/3pRUUZNA=
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d/go.mod h1:yTR3tKgyk20phAFg6IE9ulMA5NjEDD2wyx+okRFLVtw=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20200711062821-fab8125e9bdf/go.mod h1:95+K3z2L0mqsVYd6yveIv1lmtT3tcQQ3dVakPySffW8=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 h1:/py11NlxDaOxkT9OKN+gXgT+QOH5xj1ZRoyusfRIlo4=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349/go.mod h1:KVK+/Hul09ujXAGq+42UBgCTnXkiJZRnLYdURGjQUwo=
|
||||||
|
github.com/dsoprea/go-utility/v2 v2.0.0-20200717064901-2fccff4aa15e/go.mod h1:uAzdkPTub5Y9yQwXe8W4m2XuP0tK4a9Q/dantD0+uaU=
|
||||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
|
github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE=
|
||||||
|
github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
|
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
|
||||||
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
||||||
github.com/gen2brain/cbconvert v1.0.0 h1:6szCltgrC/Vq+XuknuGKjS6E1J5zRLmqCnHXnvALCvY=
|
github.com/gen2brain/avif v0.4.1 h1:fjwv5SDNYHdI1gbW6MJn3Yaxs1ldUEfAIAH8Ahee538=
|
||||||
github.com/gen2brain/cbconvert v1.0.0/go.mod h1:3zoSNHGpunxvS5cXpge9XwU585Zxsr4ly13dryeQCGk=
|
github.com/gen2brain/avif v0.4.1/go.mod h1:oePci7KPleKZ8X/2rjZ3FlVm2JFYjPwXiQpNgq9wrzs=
|
||||||
github.com/gen2brain/go-fitz v1.23.1 h1:x69/szWZXpI3jZ57mMqCg7WqqvtYnQG0lXts3L6M1Fc=
|
github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca h1:qYA+cXWUG/Dx+wG2yQ4iuw/s5ROGdXAdo5aIUHrOq4U=
|
||||||
github.com/gen2brain/go-fitz v1.23.1/go.mod h1:HU04vc+RisUh/kvEd2pB0LAxmK1oyXdN4ftyshUr9rQ=
|
github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca/go.mod h1:pQ9kQXsCZQqy7LraruUkBl7CpKNHFpWayxqQ+qliE8Y=
|
||||||
github.com/gen2brain/go-unarr v0.1.7 h1:mEE7bPShJIsmAX67t6BW2ibpEUO7j5WK152KgNM9NbQ=
|
github.com/gen2brain/go-fitz v1.24.14 h1:09weRkjVtLYNGo7l0J7DyOwBExbwi8SJ9h8YPhw9WEo=
|
||||||
github.com/gen2brain/go-unarr v0.1.7/go.mod h1:MK9a3hddpaIxjEtrE1f/LA5yJ7gA34cS7Oyr325sY9s=
|
github.com/gen2brain/go-fitz v1.24.14/go.mod h1:0KaZeQgASc20Yp5R/pFzyy7SmP01XcoHKNF842U2/S4=
|
||||||
github.com/gen2brain/iup-go/iup v0.0.0-20230906093706-8b037fe6a7bd h1:k1EaRqSEu/2eahOBY44uYZevryE1HQBz0t7RYCufnHI=
|
github.com/gen2brain/go-unarr v0.2.4 h1:Iu2kqtGfkLBSQoTFwMkSCmp0g3GrEM/XMVWzo9TQr/Y=
|
||||||
github.com/gen2brain/iup-go/iup v0.0.0-20230906093706-8b037fe6a7bd/go.mod h1:HeMeojpQFldBWCMmU5dkmU640AdEcS+SPyEVLMJjjrw=
|
github.com/gen2brain/go-unarr v0.2.4/go.mod h1:0kdy3HtjKBcEaewifXZguHCvt4qD9V8iJCx4FPEOWT8=
|
||||||
|
github.com/gen2brain/iup-go/iup v0.0.0-20241106050025-0f971ac33ed4 h1:ElkeiufJ5qqFbhxLH0TP7FhLOm37mXezIOk5iJgV27Q=
|
||||||
|
github.com/gen2brain/iup-go/iup v0.0.0-20241106050025-0f971ac33ed4/go.mod h1:F026AOq3tZrMCqTMa3K32xLh7fyTdc9+KMTMUX6EtX0=
|
||||||
|
github.com/gen2brain/jpegli v0.3.3 h1:ryCOQpmGuVk6FA+QBe9st6cW48jsRdVOPiNrAJ50m+k=
|
||||||
|
github.com/gen2brain/jpegli v0.3.3/go.mod h1:6Dbgr+ni1IUBqGVOKHn8lY+6DvwSGfAfC7pPQiSK6uA=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2 h1:Ff0jAWtCRdc9yjPc9jkyak6Ji/A89Jg0KI+D7qOEtRI=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2/go.mod h1:zIIDnzh7WqG+z66zyzLWQ0M4AS5xi//pyJLgu32GB1o=
|
||||||
|
github.com/gen2brain/webp v0.5.1 h1:ly9olTGveZEpq3soJuCmex9fxLJ0ipHcQRRSRit5EUE=
|
||||||
|
github.com/gen2brain/webp v0.5.1/go.mod h1:Nb3xO5sy6MeUAHhru9H3GT7nlOQO5dKRNNlE92CZrJw=
|
||||||
|
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||||
|
github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||||
|
github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||||
|
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
|
||||||
|
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
|
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 h1:HKlyj6in2JV6wVkmQ4XmG/EIm+SCYlPZ+V4GWit7Z+I=
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217/go.mod h1:8wI0hitZ3a1IxZfeH3/5I97CI8i5cLGsYe7xNhQGs9U=
|
||||||
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
|
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 h1:YLvr1eE6cdCqjOe972w/cYF+FjW34v27+9Vo5106B4M=
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
|
||||||
|
github.com/jupiterrider/ffi v0.2.1 h1:08GJVDqz4eoQq7cKT1T0kwb9MB58XEAGjgxDvz80yBs=
|
||||||
|
github.com/jupiterrider/ffi v0.2.1/go.mod h1:tJ7Q8p/3blFjdWt5qJU4W5oDE0xloImvrViE+0td0Rk=
|
||||||
|
github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550=
|
||||||
|
github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
|
||||||
golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
|
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
|
golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
|
||||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3 h1:9plKFE/Us913jBN6KohtLG9FNW8LPvfpjiGAORIiEHg=
|
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA=
|
|
||||||
|
|||||||
@@ -5,12 +5,15 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"errors"
|
"errors"
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"image/gif"
|
"image/gif"
|
||||||
"image/png"
|
"image/png"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"runtime/debug"
|
"runtime/debug"
|
||||||
|
"slices"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -20,8 +23,8 @@ import (
|
|||||||
|
|
||||||
//go:generate rsrc --ico dist/windows/icon.ico --arch amd64 -o main_windows_amd64.syso
|
//go:generate rsrc --ico dist/windows/icon.ico --arch amd64 -o main_windows_amd64.syso
|
||||||
|
|
||||||
//go:embed assets/icon.png
|
//go:embed assets/logo.png
|
||||||
var appIcon []byte
|
var appLogo []byte
|
||||||
|
|
||||||
//go:embed assets/loading.gif
|
//go:embed assets/loading.gif
|
||||||
var appLoading []byte
|
var appLoading []byte
|
||||||
@@ -34,8 +37,6 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
_ = os.Setenv("GDK_BACKEND", "x11")
|
|
||||||
|
|
||||||
if appVersion != "" {
|
if appVersion != "" {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -63,16 +64,18 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
parseFlags()
|
||||||
|
|
||||||
iup.Open()
|
iup.Open()
|
||||||
defer iup.Close()
|
defer iup.Close()
|
||||||
|
|
||||||
iup.SetGlobal("UTF8MODE", "YES")
|
iup.SetGlobal("UTF8MODE", "YES")
|
||||||
iup.SetGlobal("UTF8MODE_FILE", "YES")
|
iup.SetGlobal("UTF8MODE_FILE", "YES")
|
||||||
|
|
||||||
img, _ := png.Decode(bytes.NewReader(appIcon))
|
img, _ := png.Decode(bytes.NewReader(appLogo))
|
||||||
iup.ImageFromImage(img).SetHandle("icon")
|
iup.ImageFromImage(img).SetHandle("logo")
|
||||||
|
|
||||||
dlg := iup.Dialog(layout()).SetAttributes(fmt.Sprintf(`TITLE="CBconvert %s", ICON=icon`, appVersion)).SetHandle("dlg")
|
dlg := iup.Dialog(layout()).SetAttributes(fmt.Sprintf(`TITLE="CBconvert %s", ICON=logo`, appVersion)).SetHandle("dlg")
|
||||||
|
|
||||||
dlg.SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
dlg.SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
||||||
sp := strings.Split(s, ": ")
|
sp := strings.Split(s, ": ")
|
||||||
@@ -84,7 +87,7 @@ func main() {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
dlg.SetCallback("RESIZE_CB", iup.ResizeFunc(func(ih iup.Ihandle, width, height int) int {
|
dlg.SetCallback("RESIZE_CB", iup.ResizeFunc(func(ih iup.Ihandle, width, height int) int {
|
||||||
iup.GetHandle("Preview").SetAttribute("IMAGE", "")
|
iup.GetHandle("Preview").SetAttribute("IMAGE", "logo")
|
||||||
iup.Refresh(ih)
|
iup.Refresh(ih)
|
||||||
|
|
||||||
previewPost()
|
previewPost()
|
||||||
@@ -99,6 +102,27 @@ func main() {
|
|||||||
iup.MainLoop()
|
iup.MainLoop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func parseFlags() {
|
||||||
|
flag.Usage = func() {
|
||||||
|
fmt.Fprintf(os.Stderr, "Usage: %s <command> [<flags>]\n\n", filepath.Base(os.Args[0]))
|
||||||
|
fmt.Fprintf(os.Stderr, "\nCommands:\n")
|
||||||
|
fmt.Fprintf(os.Stderr, "\n version\n \tPrint version\n\n")
|
||||||
|
}
|
||||||
|
|
||||||
|
flag.NewFlagSet("version", flag.ExitOnError)
|
||||||
|
flag.Parse()
|
||||||
|
|
||||||
|
if flag.NArg() >= 1 {
|
||||||
|
if flag.Arg(0) == "version" {
|
||||||
|
fmt.Println(filepath.Base(os.Args[0]), appVersion)
|
||||||
|
os.Exit(0)
|
||||||
|
} else {
|
||||||
|
flag.Usage()
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func options() cbconvert.Options {
|
func options() cbconvert.Options {
|
||||||
var opts cbconvert.Options
|
var opts cbconvert.Options
|
||||||
opts.Recursive = iup.GetHandle("Recursive").GetAttribute("VALUE") == "ON"
|
opts.Recursive = iup.GetHandle("Recursive").GetAttribute("VALUE") == "ON"
|
||||||
@@ -120,11 +144,6 @@ func options() cbconvert.Options {
|
|||||||
opts.Brightness = iup.GetHandle("Brightness").GetInt("VALUE")
|
opts.Brightness = iup.GetHandle("Brightness").GetInt("VALUE")
|
||||||
opts.Contrast = iup.GetHandle("Contrast").GetInt("VALUE")
|
opts.Contrast = iup.GetHandle("Contrast").GetInt("VALUE")
|
||||||
opts.Rotate = iup.GetHandle("Rotate").GetInt("VALUESTRING")
|
opts.Rotate = iup.GetHandle("Rotate").GetInt("VALUESTRING")
|
||||||
opts.LevelsInMin = iup.GetHandle("LevelsInMin").GetInt("VALUE")
|
|
||||||
opts.LevelsInMax = iup.GetHandle("LevelsInMax").GetInt("VALUE")
|
|
||||||
opts.LevelsOutMin = iup.GetHandle("LevelsOutMin").GetInt("VALUE")
|
|
||||||
opts.LevelsOutMax = iup.GetHandle("LevelsOutMax").GetInt("VALUE")
|
|
||||||
opts.LevelsGamma = iup.GetHandle("LevelsGamma").GetDouble("VALUE")
|
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
}
|
}
|
||||||
@@ -137,7 +156,7 @@ func setActive() {
|
|||||||
iup.GetHandle("Remove").SetAttribute("ACTIVE", "NO")
|
iup.GetHandle("Remove").SetAttribute("ACTIVE", "NO")
|
||||||
iup.GetHandle("RemoveAll").SetAttribute("ACTIVE", "NO")
|
iup.GetHandle("RemoveAll").SetAttribute("ACTIVE", "NO")
|
||||||
|
|
||||||
iup.GetHandle("Preview").SetAttribute("IMAGE", "")
|
iup.GetHandle("Preview").SetAttribute("IMAGE", "logo")
|
||||||
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", "")
|
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", "")
|
||||||
} else {
|
} else {
|
||||||
if index != -1 {
|
if index != -1 {
|
||||||
@@ -265,16 +284,16 @@ func previewPost() {
|
|||||||
go func(opts cbconvert.Options) {
|
go func(opts cbconvert.Options) {
|
||||||
conv := cbconvert.New(opts)
|
conv := cbconvert.New(opts)
|
||||||
|
|
||||||
conv.Initialize()
|
var s string
|
||||||
defer conv.Terminate()
|
|
||||||
|
|
||||||
file := files[index]
|
file := files[index]
|
||||||
|
|
||||||
img, err := conv.Preview(file.Path, file.Stat, width, height)
|
img, err := conv.Preview(file.Path, file.Stat, width, height)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
s = err.Error()
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
iup.PostMessage(iup.GetHandle("Preview"), "", 0, img)
|
iup.PostMessage(iup.GetHandle("Preview"), s, 0, img)
|
||||||
}(opts)
|
}(opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,14 +315,23 @@ func preview() iup.Ihandle {
|
|||||||
SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
||||||
img := p.(cbconvert.Image)
|
img := p.(cbconvert.Image)
|
||||||
|
|
||||||
if img.Image != nil {
|
iup.GetHandle("Loading").SetAttributes("VISIBLE=NO, STOP=YES")
|
||||||
|
|
||||||
|
if img.Image != nil && len(s) == 0 {
|
||||||
iup.Destroy(iup.GetHandle("cover"))
|
iup.Destroy(iup.GetHandle("cover"))
|
||||||
iup.ImageFromImage(img.Image).SetHandle("cover")
|
iup.ImageFromImage(img.Image).SetHandle("cover")
|
||||||
ih.SetAttribute("IMAGE", "cover")
|
|
||||||
}
|
|
||||||
|
|
||||||
iup.GetHandle("Loading").SetAttributes("VISIBLE=NO, STOP=YES")
|
ih.SetAttribute("IMAGE", "cover")
|
||||||
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", fmt.Sprintf("%s (%dx%d)", img.SizeHuman, img.Width, img.Height))
|
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", fmt.Sprintf("%s (%dx%d)", img.SizeHuman, img.Width, img.Height))
|
||||||
|
} else {
|
||||||
|
ih.SetAttribute("IMAGE", "logo")
|
||||||
|
iup.GetHandle("PreviewInfo").SetAttribute("TITLE", "")
|
||||||
|
|
||||||
|
sp := strings.Split(s, ": ")
|
||||||
|
if len(sp) > 1 {
|
||||||
|
iup.MessageError(ih, fmt.Sprintf("%s\n\n%s", sp[0], strings.Join(sp[1:], ": ")))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return iup.DEFAULT
|
return iup.DEFAULT
|
||||||
})),
|
})),
|
||||||
@@ -320,6 +348,8 @@ func tabs() iup.Ihandle {
|
|||||||
SetAttributes(`TIP="Do not convert images that have RGB colorspace"`),
|
SetAttributes(`TIP="Do not convert images that have RGB colorspace"`),
|
||||||
iup.Toggle(" Exclude Cover").SetHandle("NoCover").
|
iup.Toggle(" Exclude Cover").SetHandle("NoCover").
|
||||||
SetAttributes(`TIP="Do not convert the cover image"`),
|
SetAttributes(`TIP="Do not convert the cover image"`),
|
||||||
|
iup.Toggle(" Remove Non-Image Files from the Archive").SetHandle("NoNonImage").
|
||||||
|
SetAttribute("TIP", "Remove .nfo, .xml, .txt files from the archive"),
|
||||||
iup.Toggle(" Do not Transform or Convert Images").SetHandle("NoConvert").
|
iup.Toggle(" Do not Transform or Convert Images").SetHandle("NoConvert").
|
||||||
SetAttributes(`TIP="Copy images from archive or directory without modifications"`).
|
SetAttributes(`TIP="Copy images from archive or directory without modifications"`).
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
||||||
@@ -344,6 +374,7 @@ func tabs() iup.Ihandle {
|
|||||||
|
|
||||||
return iup.DEFAULT
|
return iup.DEFAULT
|
||||||
})),
|
})),
|
||||||
|
iup.Space().SetAttribute("SIZE", "5x0"),
|
||||||
iup.Button("Browse...").SetAttributes("PADDING=DEFAULTBUTTONPADDING").
|
iup.Button("Browse...").SetAttributes("PADDING=DEFAULTBUTTONPADDING").
|
||||||
SetCallback("ACTION", iup.ActionFunc(onOutputDirectory)),
|
SetCallback("ACTION", iup.ActionFunc(onOutputDirectory)),
|
||||||
),
|
),
|
||||||
@@ -352,10 +383,6 @@ func tabs() iup.Ihandle {
|
|||||||
iup.Text().SetAttributes("VISIBLECOLUMNS=16, MINSIZE=100x").SetHandle("Suffix").
|
iup.Text().SetAttributes("VISIBLECOLUMNS=16, MINSIZE=100x").SetHandle("Suffix").
|
||||||
SetAttribute("TIP", "Add suffix to filename, i.e. filename_suffix.cbz"),
|
SetAttribute("TIP", "Add suffix to filename, i.e. filename_suffix.cbz"),
|
||||||
),
|
),
|
||||||
iup.Vbox(
|
|
||||||
iup.Toggle(" Remove Non-Image Files from the Archive").SetHandle("NoNonImage").
|
|
||||||
SetAttribute("TIP", "Remove .nfo, .xml, .txt files from the archive"),
|
|
||||||
),
|
|
||||||
iup.Vbox(
|
iup.Vbox(
|
||||||
iup.Label("Archive Format:"),
|
iup.Label("Archive Format:"),
|
||||||
iup.List().SetAttributes(map[string]string{
|
iup.List().SetAttributes(map[string]string{
|
||||||
@@ -539,94 +566,6 @@ func tabs() iup.Ihandle {
|
|||||||
return iup.DEFAULT
|
return iup.DEFAULT
|
||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
iup.Vbox(
|
|
||||||
iup.Label("Input Levels:"),
|
|
||||||
iup.Hbox(
|
|
||||||
iup.Text().SetAttributes(`SPIN=YES, SPINMAX=255, VALUE=0, VISIBLECOLUMNS=3, MASK="/d*"`).
|
|
||||||
SetHandle("LevelsInMin").SetAttribute("TIP", "Min").
|
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
|
||||||
ih.SetAttribute("MYVALUE", ih.GetInt("VALUE"))
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})).
|
|
||||||
SetCallback("KILLFOCUS_CB", iup.KillFocusFunc(func(ih iup.Ihandle) int {
|
|
||||||
if ih.GetAttribute("MYVALUE") != "" {
|
|
||||||
previewPost()
|
|
||||||
}
|
|
||||||
ih.SetAttribute("MYVALUE", "")
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})),
|
|
||||||
iup.Fill(),
|
|
||||||
iup.Val("").SetAttributes(`VALUE=1.0, SHOWTICKS=10`).
|
|
||||||
SetHandle("LevelsGamma").SetAttribute("TIP", "Gamma").
|
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
|
||||||
ih.SetAttribute("MYVALUE", ih.GetInt("VALUE"))
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})).
|
|
||||||
SetCallback("KILLFOCUS_CB", iup.KillFocusFunc(func(ih iup.Ihandle) int {
|
|
||||||
if ih.GetAttribute("MYVALUE") != "" {
|
|
||||||
previewPost()
|
|
||||||
}
|
|
||||||
ih.SetAttribute("MYVALUE", "")
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})),
|
|
||||||
iup.Fill(),
|
|
||||||
iup.Text().SetAttributes(`SPIN=YES, SPINMAX=255, VALUE=255, VISIBLECOLUMNS=3, MASK="/d*"`).
|
|
||||||
SetHandle("LevelsInMax").SetAttribute("TIP", "Max").
|
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
|
||||||
ih.SetAttribute("MYVALUE", ih.GetInt("VALUE"))
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})).
|
|
||||||
SetCallback("KILLFOCUS_CB", iup.KillFocusFunc(func(ih iup.Ihandle) int {
|
|
||||||
if ih.GetAttribute("MYVALUE") != "" {
|
|
||||||
previewPost()
|
|
||||||
}
|
|
||||||
ih.SetAttribute("MYVALUE", "")
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})),
|
|
||||||
).SetAttributes("ALIGNMENT=ACENTER, MAXSIZE=340x"),
|
|
||||||
),
|
|
||||||
iup.Vbox(
|
|
||||||
iup.Label("Output Levels:"),
|
|
||||||
iup.Hbox(
|
|
||||||
iup.Text().SetAttributes(`SPIN=YES, SPINMAX=255, VALUE=0, VISIBLECOLUMNS=3, MASK="/d*"`).
|
|
||||||
SetHandle("LevelsOutMin").SetAttribute("TIP", "Min").
|
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
|
||||||
ih.SetAttribute("MYVALUE", ih.GetInt("VALUE"))
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})).
|
|
||||||
SetCallback("KILLFOCUS_CB", iup.KillFocusFunc(func(ih iup.Ihandle) int {
|
|
||||||
if ih.GetAttribute("MYVALUE") != "" {
|
|
||||||
previewPost()
|
|
||||||
}
|
|
||||||
ih.SetAttribute("MYVALUE", "")
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})),
|
|
||||||
iup.Fill(),
|
|
||||||
iup.Text().SetAttributes(`SPIN=YES, SPINMAX=255, VALUE=255, VISIBLECOLUMNS=3, MASK="/d*"`).
|
|
||||||
SetHandle("LevelsOutMax").SetAttribute("TIP", "Max").
|
|
||||||
SetCallback("VALUECHANGED_CB", iup.ValueChangedFunc(func(ih iup.Ihandle) int {
|
|
||||||
ih.SetAttribute("MYVALUE", ih.GetInt("VALUE"))
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})).
|
|
||||||
SetCallback("KILLFOCUS_CB", iup.KillFocusFunc(func(ih iup.Ihandle) int {
|
|
||||||
if ih.GetAttribute("MYVALUE") != "" {
|
|
||||||
previewPost()
|
|
||||||
}
|
|
||||||
ih.SetAttribute("MYVALUE", "")
|
|
||||||
|
|
||||||
return iup.DEFAULT
|
|
||||||
})),
|
|
||||||
).SetAttributes("ALIGNMENT=ACENTER, MAXSIZE=340x"),
|
|
||||||
),
|
|
||||||
).SetHandle("VboxTransform").SetAttributes("MARGIN=5x5, GAP=5")
|
).SetHandle("VboxTransform").SetAttributes("MARGIN=5x5, GAP=5")
|
||||||
|
|
||||||
return iup.Tabs(
|
return iup.Tabs(
|
||||||
@@ -634,7 +573,7 @@ func tabs() iup.Ihandle {
|
|||||||
vboxOutput.SetAttributes("TABTITLE=Output"),
|
vboxOutput.SetAttributes("TABTITLE=Output"),
|
||||||
vboxImage.SetAttributes("TABTITLE=Image"),
|
vboxImage.SetAttributes("TABTITLE=Image"),
|
||||||
vboxTransform.SetAttributes("TABTITLE=Transform"),
|
vboxTransform.SetAttributes("TABTITLE=Transform"),
|
||||||
).SetHandle("Tabs").SetAttributes("MINSIZE=320x400, EXPAND=HORIZONTAL")
|
).SetHandle("Tabs").SetAttributes("MINSIZE=320x400, EXPAND=HORIZONTAL, MULTILINE=YES")
|
||||||
}
|
}
|
||||||
|
|
||||||
func buttons() iup.Ihandle {
|
func buttons() iup.Ihandle {
|
||||||
@@ -680,7 +619,7 @@ func status() iup.Ihandle {
|
|||||||
SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
SetCallback("POSTMESSAGE_CB", iup.PostMessageFunc(func(ih iup.Ihandle, s string, i int, p any) int {
|
||||||
switch s {
|
switch s {
|
||||||
case "convert":
|
case "convert":
|
||||||
conv := p.(*cbconvert.Convertor)
|
conv := p.(*cbconvert.Converter)
|
||||||
ih.SetAttributes("VALUE=0, VISIBLE=YES")
|
ih.SetAttributes("VALUE=0, VISIBLE=YES")
|
||||||
ih.SetAttribute("MAX", conv.Ncontents)
|
ih.SetAttribute("MAX", conv.Ncontents)
|
||||||
|
|
||||||
@@ -694,7 +633,7 @@ func status() iup.Ihandle {
|
|||||||
|
|
||||||
iup.Refresh(iup.GetHandle("StatusBar"))
|
iup.Refresh(iup.GetHandle("StatusBar"))
|
||||||
case "start":
|
case "start":
|
||||||
conv := p.(*cbconvert.Convertor)
|
conv := p.(*cbconvert.Converter)
|
||||||
ih.SetAttributes("VALUE=0, VISIBLE=YES")
|
ih.SetAttributes("VALUE=0, VISIBLE=YES")
|
||||||
ih.SetAttribute("MAX", conv.Nfiles)
|
ih.SetAttribute("MAX", conv.Nfiles)
|
||||||
|
|
||||||
@@ -704,13 +643,13 @@ func status() iup.Ihandle {
|
|||||||
|
|
||||||
iup.GetHandle("LabelStatus2").SetAttributes("VISIBLE=YES")
|
iup.GetHandle("LabelStatus2").SetAttributes("VISIBLE=YES")
|
||||||
case "progress":
|
case "progress":
|
||||||
conv := p.(*cbconvert.Convertor)
|
conv := p.(*cbconvert.Converter)
|
||||||
ih.SetAttribute("VALUE", conv.CurrContent)
|
ih.SetAttribute("VALUE", conv.CurrContent)
|
||||||
iup.GetHandle("LabelStatus2").SetAttribute("TITLE", fmt.Sprintf("(%03d/%03d)", conv.CurrContent, conv.Ncontents))
|
iup.GetHandle("LabelStatus2").SetAttribute("TITLE", fmt.Sprintf("(%03d/%03d)", conv.CurrContent, conv.Ncontents))
|
||||||
|
|
||||||
iup.Refresh(iup.GetHandle("StatusBar"))
|
iup.Refresh(iup.GetHandle("StatusBar"))
|
||||||
case "progress2":
|
case "progress2":
|
||||||
conv := p.(*cbconvert.Convertor)
|
conv := p.(*cbconvert.Converter)
|
||||||
ih.SetAttribute("VALUE", conv.CurrFile)
|
ih.SetAttribute("VALUE", conv.CurrFile)
|
||||||
iup.GetHandle("LabelStatus2").SetAttribute("TITLE", fmt.Sprintf("(%03d/%03d)", conv.CurrFile, conv.Nfiles))
|
iup.GetHandle("LabelStatus2").SetAttribute("TITLE", fmt.Sprintf("(%03d/%03d)", conv.CurrFile, conv.Nfiles))
|
||||||
|
|
||||||
@@ -816,7 +755,11 @@ func onRemove(ih iup.Ihandle) int {
|
|||||||
return iup.IGNORE
|
return iup.IGNORE
|
||||||
}
|
}
|
||||||
|
|
||||||
files = append(files[:index], files[index+1:]...)
|
if len(files) == 1 {
|
||||||
|
files = make([]cbconvert.File, 0)
|
||||||
|
} else {
|
||||||
|
files = slices.Delete(files, index, index)
|
||||||
|
}
|
||||||
|
|
||||||
iup.GetHandle("List").SetAttribute("REMOVEITEM", iup.GetHandle("List").GetAttribute("VALUE"))
|
iup.GetHandle("List").SetAttribute("REMOVEITEM", iup.GetHandle("List").GetAttribute("VALUE"))
|
||||||
setActive()
|
setActive()
|
||||||
@@ -857,10 +800,7 @@ func onThumbnail(ih iup.Ihandle) int {
|
|||||||
|
|
||||||
iup.PostMessage(iup.GetHandle("ProgressBar"), "start", 0, conv)
|
iup.PostMessage(iup.GetHandle("ProgressBar"), "start", 0, conv)
|
||||||
|
|
||||||
go func(c *cbconvert.Convertor) {
|
go func(c *cbconvert.Converter) {
|
||||||
c.Initialize()
|
|
||||||
defer c.Terminate()
|
|
||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if canceled {
|
if canceled {
|
||||||
break
|
break
|
||||||
@@ -903,10 +843,7 @@ func onCover(ih iup.Ihandle) int {
|
|||||||
|
|
||||||
iup.PostMessage(iup.GetHandle("ProgressBar"), "start", 0, conv)
|
iup.PostMessage(iup.GetHandle("ProgressBar"), "start", 0, conv)
|
||||||
|
|
||||||
go func(c *cbconvert.Convertor) {
|
go func(c *cbconvert.Converter) {
|
||||||
c.Initialize()
|
|
||||||
defer c.Terminate()
|
|
||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if canceled {
|
if canceled {
|
||||||
break
|
break
|
||||||
@@ -952,10 +889,7 @@ func onConvert(ih iup.Ihandle) int {
|
|||||||
return iup.DEFAULT
|
return iup.DEFAULT
|
||||||
}))
|
}))
|
||||||
|
|
||||||
go func(c *cbconvert.Convertor) {
|
go func(c *cbconvert.Converter) {
|
||||||
c.Initialize()
|
|
||||||
defer c.Terminate()
|
|
||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if err := c.Convert(file.Path, file.Stat); err != nil {
|
if err := c.Convert(file.Path, file.Stat); err != nil {
|
||||||
if errors.Is(err, context.Canceled) {
|
if errors.Is(err, context.Canceled) {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ func fileDlg(title string, multiple, directory bool) ([]string, error) {
|
|||||||
dlg.SetAttributes(map[string]string{
|
dlg.SetAttributes(map[string]string{
|
||||||
"DIALOGTYPE": "OPEN",
|
"DIALOGTYPE": "OPEN",
|
||||||
"MULTIPLEFILES": mf,
|
"MULTIPLEFILES": mf,
|
||||||
"EXTFILTER": "Comic Files|*.rar;*.zip;*.7z;*.tar;*.cbr;*.cbz;*.cb7;*.cbt;*.pdf;*.epub;*.mobi;*.xps|",
|
"EXTFILTER": "Comic Files|*.rar;*.zip;*.7z;*.tar;*.cbr;*.cbz;*.cb7;*.cbt;*.pdf;*.epub;*.mobi;*.docx;*.pptx|",
|
||||||
"FILTER": "*.cb*", // for Motif
|
"FILTER": "*.cb*", // for Motif
|
||||||
"TITLE": title,
|
"TITLE": title,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ func fileDlg(title string, multiple, directory bool) ([]string, error) {
|
|||||||
Item{0, "*.pdf"},
|
Item{0, "*.pdf"},
|
||||||
Item{0, "*.epub"},
|
Item{0, "*.epub"},
|
||||||
Item{0, "*.mobi"},
|
Item{0, "*.mobi"},
|
||||||
Item{0, "*.xps"},
|
Item{0, "*.docx"},
|
||||||
|
Item{0, "*.pptx"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,76 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
GLIBC_x86_64="/usr/x86_64-pc-linux-gnu-static"
|
|
||||||
MINGW_x86_64="/usr/x86_64-w64-mingw32"
|
|
||||||
MACOS_x86_64="/usr/x86_64-apple-darwin"
|
|
||||||
MACOS_aarch64="/usr/aarch64-apple-darwin"
|
|
||||||
|
|
||||||
VERSION="$(git --git-dir ../../.git describe --tags --abbrev=0 2>/dev/null || echo '1.0.0')"
|
|
||||||
|
|
||||||
BUILDDIR="cbconvert-gui-${VERSION}"
|
|
||||||
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
CC=x86_64-pc-linux-gnu-gcc \
|
|
||||||
PKG_CONFIG="x86_64-pc-linux-gnu-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$GLIBC_x86_64/usr/lib64/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$GLIBC_x86_64/usr/lib64/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$GLIBC_x86_64/usr/include" \
|
|
||||||
CGO_LDFLAGS="-L$GLIBC_x86_64/usr/lib64" \
|
|
||||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -x -o "${BUILDDIR}"/cbconvert-gui -ldflags "-s -w -X main.appVersion=${VERSION}" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && tar -czf "${BUILDDIR}-linux-x86_64.tar.gz" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
CC=x86_64-pc-linux-gnu-gcc \
|
|
||||||
PKG_CONFIG="x86_64-pc-linux-gnu-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$GLIBC_x86_64/usr/lib64/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$GLIBC_x86_64/usr/lib64/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$GLIBC_x86_64/usr/include" \
|
|
||||||
CGO_LDFLAGS="-L$GLIBC_x86_64/usr/lib64 -lxcb -lICE -lXdmcp -lXau -lSM" \
|
|
||||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig motif' -v -o "${BUILDDIR}"/cbconvert-gui-motif -ldflags "-s -w -linkmode external -X main.appVersion=${VERSION} '-extldflags=-static'" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && tar -czf "${BUILDDIR}-linux-x86_64-motif.tar.gz" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
CC=x86_64-w64-mingw32-gcc \
|
|
||||||
PKG_CONFIG="/usr/bin/x86_64-w64-mingw32-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$MINGW_x86_64/usr/lib/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$MINGW_x86_64/usr/lib/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$MINGW_x86_64/usr/include" \
|
|
||||||
CGO_LDFLAGS="-L$MINGW_x86_64/usr/lib" \
|
|
||||||
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/cbconvert-gui.exe -ldflags "-s -w -X main.appVersion=${VERSION} -H=windowsgui '-extldflags=-static -Wl,--allow-multiple-definition'" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && zip -rq "${BUILDDIR}-windows-x86_64.zip" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
cp -r dist/macos/CBconvert.app "${BUILDDIR}"
|
|
||||||
PATH=${PATH}:${MACOS_x86_64}/bin \
|
|
||||||
CC=x86_64-apple-darwin21.1-clang \
|
|
||||||
PKG_CONFIG="x86_64-apple-darwin21.1-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$MACOS_x86_64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$MACOS_x86_64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$MACOS_x86_64/usr/include -I$MACOS_x86_64/macports/pkgs/opt/local/include" \
|
|
||||||
CGO_LDFLAGS="-L$MACOS_x86_64/SDK/MacOSX12.1.sdk/usr/lib -L$MACOS_x86_64/macports/pkgs/opt/local/lib -mmacosx-version-min=10.15" \
|
|
||||||
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/CBconvert.app/Contents/MacOS/cbconvert-gui -ldflags "-linkmode external -s -w -X main.appVersion=${VERSION}" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && zip -rq "${BUILDDIR}-darwin-x86_64.zip" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
cp -r dist/macos/CBconvert.app "${BUILDDIR}"
|
|
||||||
PATH=${PATH}:${MACOS_aarch64}/bin \
|
|
||||||
CC=aarch64-apple-darwin21.1-clang \
|
|
||||||
PKG_CONFIG="aarch64-apple-darwin21.1-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$MACOS_aarch64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$MACOS_aarch64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$MACOS_aarch64/usr/include -I$MACOS_aarch64/macports/pkgs/opt/local/include" \
|
|
||||||
CGO_LDFLAGS="-L$MACOS_aarch64/SDK/MacOSX12.1.sdk/usr/lib -L$MACOS_aarch64/macports/pkgs/opt/local/lib -mmacosx-version-min=10.15" \
|
|
||||||
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/CBconvert.app/Contents/MacOS/cbconvert-gui -ldflags "-linkmode external -s -w -X main.appVersion=${VERSION}" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && zip -rq "${BUILDDIR}-darwin-aarch64.zip" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
@@ -4,10 +4,7 @@ Windows
|
|||||||
<img src="windows-01.jpg" width="700" title="Windows" alt="Windows" />
|
<img src="windows-01.jpg" width="700" title="Windows" alt="Windows" />
|
||||||
|
|
||||||
Linux
|
Linux
|
||||||
<img src="linux-02.jpg" width="700" title="Linux" alt="Linux" />
|
<img src="linux-01.jpg" width="700" title="Linux" alt="Linux" />
|
||||||
|
|
||||||
macOS
|
macOS
|
||||||
<img src="macos-01.jpg" width="700" title="macOS" alt="macOS" />
|
<img src="macos-01.jpg" width="700" title="macOS" alt="macOS" />
|
||||||
|
|
||||||
Linux Motif
|
|
||||||
<img src="motif-01.jpg" width="700" title="Linux Motif" alt="Linux Motif" />
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 300 KiB |
|
Before Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 206 KiB |
@@ -1,26 +1,39 @@
|
|||||||
module github.com/gen2brain/cbconvert/cmd/cbconvert
|
module github.com/gen2brain/cbconvert/cmd/cbconvert
|
||||||
|
|
||||||
go 1.21
|
go 1.23
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gen2brain/cbconvert v1.0.0
|
github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca
|
||||||
github.com/schollz/progressbar/v3 v3.13.1
|
github.com/schollz/progressbar/v3 v3.13.1
|
||||||
github.com/spf13/pflag v1.0.5
|
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/chai2010/webp v1.1.1 // indirect
|
github.com/anthonynsimon/bild v0.14.0 // indirect
|
||||||
github.com/disintegration/imaging v1.6.2 // indirect
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d // indirect
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d // indirect
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 // indirect
|
||||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
|
github.com/ebitengine/purego v0.8.1 // indirect
|
||||||
github.com/fvbommel/sortorder v1.1.0 // indirect
|
github.com/fvbommel/sortorder v1.1.0 // indirect
|
||||||
github.com/gen2brain/go-fitz v1.23.1 // indirect
|
github.com/gen2brain/avif v0.4.1 // indirect
|
||||||
github.com/gen2brain/go-unarr v0.1.7 // indirect
|
github.com/gen2brain/go-fitz v1.24.14 // indirect
|
||||||
|
github.com/gen2brain/go-unarr v0.2.4 // indirect
|
||||||
|
github.com/gen2brain/jpegli v0.3.3 // indirect
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2 // indirect
|
||||||
|
github.com/gen2brain/webp v0.5.1 // indirect
|
||||||
|
github.com/go-errors/errors v1.5.1 // indirect
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
|
||||||
|
github.com/jupiterrider/ffi v0.2.1 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||||
github.com/rivo/uniseg v0.3.4 // indirect
|
github.com/rivo/uniseg v0.3.4 // indirect
|
||||||
golang.org/x/image v0.12.0 // indirect
|
github.com/tetratelabs/wazero v1.8.1 // indirect
|
||||||
golang.org/x/sync v0.3.0 // indirect
|
golang.org/x/image v0.21.0 // indirect
|
||||||
golang.org/x/sys v0.6.0 // indirect
|
golang.org/x/net v0.30.0 // indirect
|
||||||
golang.org/x/term v0.6.0 // indirect
|
golang.org/x/sync v0.8.0 // indirect
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3 // indirect
|
golang.org/x/sys v0.26.0 // indirect
|
||||||
|
golang.org/x/term v0.25.0 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,20 +1,58 @@
|
|||||||
github.com/chai2010/webp v1.1.1 h1:jTRmEccAJ4MGrhFOrPMpNGIJ/eybIgwKpcACsrTEapk=
|
github.com/anthonynsimon/bild v0.14.0 h1:IFRkmKdNdqmexXHfEU7rPlAmdUZ8BDZEGtGHDnGWync=
|
||||||
github.com/chai2010/webp v1.1.1/go.mod h1:0XVwvZWdjjdxpUEIf7b9g9VkHFnInUSYujwqTLEuldU=
|
github.com/anthonynsimon/bild v0.14.0/go.mod h1:hcvEAyBjTW69qkKJTfpcDQ83sSZHxwOunsseDfeQhUs=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
github.com/dsoprea/go-exif/v2 v2.0.0-20200321225314-640175a69fe4/go.mod h1:Lm2lMM2zx8p4a34ZemkaUV95AnMl4ZvLbCUbwOvLC2E=
|
||||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
github.com/dsoprea/go-exif/v2 v2.0.0-20200604193436-ca8584a0e1c4/go.mod h1:9EXlPeHfblFFnwu5UOqmP2eoZfJyAZ2Ri/Vki33ajO0=
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d h1:yeH8wrJa3+8uKKDAdURHUK1ds2UvKhMqX2MiOdVeKPs=
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d/go.mod h1:oKrjk2kb3rAR5NbtSTLUMvMSbc+k8ZosI3MaVH47noc=
|
||||||
|
github.com/dsoprea/go-exif/v3 v3.0.0-20200717053412-08f1b6708903/go.mod h1:0nsO1ce0mh5czxGeLo4+OCZ/C6Eo6ZlMWsz7rH/Gxv8=
|
||||||
|
github.com/dsoprea/go-exif/v3 v3.0.0-20210512043655-120bcdb2a55e/go.mod h1:cg5SNYKHMmzxsr9X6ZeLh/nfBRHHp5PngtEPcujONtk=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200517223158-a10564966e9d/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd h1:l+vLbuxptsC6VQyQsfD7NnEC8BZuFpz45PgY+pH8YTg=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d h1:8+qI8ant/vZkNSsbwSjIR6XJfWcDVTg/qx/3pRUUZNA=
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d/go.mod h1:yTR3tKgyk20phAFg6IE9ulMA5NjEDD2wyx+okRFLVtw=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20200711062821-fab8125e9bdf/go.mod h1:95+K3z2L0mqsVYd6yveIv1lmtT3tcQQ3dVakPySffW8=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 h1:/py11NlxDaOxkT9OKN+gXgT+QOH5xj1ZRoyusfRIlo4=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349/go.mod h1:KVK+/Hul09ujXAGq+42UBgCTnXkiJZRnLYdURGjQUwo=
|
||||||
|
github.com/dsoprea/go-utility/v2 v2.0.0-20200717064901-2fccff4aa15e/go.mod h1:uAzdkPTub5Y9yQwXe8W4m2XuP0tK4a9Q/dantD0+uaU=
|
||||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
|
github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE=
|
||||||
|
github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
|
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
|
||||||
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
||||||
github.com/gen2brain/cbconvert v1.0.0 h1:6szCltgrC/Vq+XuknuGKjS6E1J5zRLmqCnHXnvALCvY=
|
github.com/gen2brain/avif v0.4.1 h1:fjwv5SDNYHdI1gbW6MJn3Yaxs1ldUEfAIAH8Ahee538=
|
||||||
github.com/gen2brain/cbconvert v1.0.0/go.mod h1:3zoSNHGpunxvS5cXpge9XwU585Zxsr4ly13dryeQCGk=
|
github.com/gen2brain/avif v0.4.1/go.mod h1:oePci7KPleKZ8X/2rjZ3FlVm2JFYjPwXiQpNgq9wrzs=
|
||||||
github.com/gen2brain/go-fitz v1.23.1 h1:x69/szWZXpI3jZ57mMqCg7WqqvtYnQG0lXts3L6M1Fc=
|
github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca h1:qYA+cXWUG/Dx+wG2yQ4iuw/s5ROGdXAdo5aIUHrOq4U=
|
||||||
github.com/gen2brain/go-fitz v1.23.1/go.mod h1:HU04vc+RisUh/kvEd2pB0LAxmK1oyXdN4ftyshUr9rQ=
|
github.com/gen2brain/cbconvert v1.0.5-0.20241106192421-4d845afa43ca/go.mod h1:pQ9kQXsCZQqy7LraruUkBl7CpKNHFpWayxqQ+qliE8Y=
|
||||||
github.com/gen2brain/go-unarr v0.1.7 h1:mEE7bPShJIsmAX67t6BW2ibpEUO7j5WK152KgNM9NbQ=
|
github.com/gen2brain/go-fitz v1.24.14 h1:09weRkjVtLYNGo7l0J7DyOwBExbwi8SJ9h8YPhw9WEo=
|
||||||
github.com/gen2brain/go-unarr v0.1.7/go.mod h1:MK9a3hddpaIxjEtrE1f/LA5yJ7gA34cS7Oyr325sY9s=
|
github.com/gen2brain/go-fitz v1.24.14/go.mod h1:0KaZeQgASc20Yp5R/pFzyy7SmP01XcoHKNF842U2/S4=
|
||||||
|
github.com/gen2brain/go-unarr v0.2.4 h1:Iu2kqtGfkLBSQoTFwMkSCmp0g3GrEM/XMVWzo9TQr/Y=
|
||||||
|
github.com/gen2brain/go-unarr v0.2.4/go.mod h1:0kdy3HtjKBcEaewifXZguHCvt4qD9V8iJCx4FPEOWT8=
|
||||||
|
github.com/gen2brain/jpegli v0.3.3 h1:ryCOQpmGuVk6FA+QBe9st6cW48jsRdVOPiNrAJ50m+k=
|
||||||
|
github.com/gen2brain/jpegli v0.3.3/go.mod h1:6Dbgr+ni1IUBqGVOKHn8lY+6DvwSGfAfC7pPQiSK6uA=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2 h1:Ff0jAWtCRdc9yjPc9jkyak6Ji/A89Jg0KI+D7qOEtRI=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2/go.mod h1:zIIDnzh7WqG+z66zyzLWQ0M4AS5xi//pyJLgu32GB1o=
|
||||||
|
github.com/gen2brain/webp v0.5.1 h1:ly9olTGveZEpq3soJuCmex9fxLJ0ipHcQRRSRit5EUE=
|
||||||
|
github.com/gen2brain/webp v0.5.1/go.mod h1:Nb3xO5sy6MeUAHhru9H3GT7nlOQO5dKRNNlE92CZrJw=
|
||||||
|
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||||
|
github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||||
|
github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||||
|
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
|
||||||
|
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||||
|
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||||
|
github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 h1:HKlyj6in2JV6wVkmQ4XmG/EIm+SCYlPZ+V4GWit7Z+I=
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217/go.mod h1:8wI0hitZ3a1IxZfeH3/5I97CI8i5cLGsYe7xNhQGs9U=
|
||||||
|
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 h1:YLvr1eE6cdCqjOe972w/cYF+FjW34v27+9Vo5106B4M=
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
|
||||||
|
github.com/jupiterrider/ffi v0.2.1 h1:08GJVDqz4eoQq7cKT1T0kwb9MB58XEAGjgxDvz80yBs=
|
||||||
|
github.com/jupiterrider/ffi v0.2.1/go.mod h1:tJ7Q8p/3blFjdWt5qJU4W5oDE0xloImvrViE+0td0Rk=
|
||||||
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
|
||||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||||
@@ -29,51 +67,36 @@ github.com/rivo/uniseg v0.3.4 h1:3Z3Eu6FGHZWSfNKJTOUiPatWwfc7DzJRU04jFUqJODw=
|
|||||||
github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
github.com/rivo/uniseg v0.3.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE=
|
github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE=
|
||||||
github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ=
|
github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ=
|
||||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550=
|
||||||
|
github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
|
||||||
golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
|
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
|
golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
|
||||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
|
||||||
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
|
|
||||||
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
|
||||||
|
golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24=
|
||||||
|
golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3 h1:9plKFE/Us913jBN6KohtLG9FNW8LPvfpjiGAORIiEHg=
|
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA=
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -12,7 +13,6 @@ import (
|
|||||||
|
|
||||||
"github.com/gen2brain/cbconvert"
|
"github.com/gen2brain/cbconvert"
|
||||||
pb "github.com/schollz/progressbar/v3"
|
pb "github.com/schollz/progressbar/v3"
|
||||||
flag "github.com/spf13/pflag"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var appVersion string
|
var appVersion string
|
||||||
@@ -72,9 +72,6 @@ func main() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
conv.Initialize()
|
|
||||||
defer conv.Terminate()
|
|
||||||
|
|
||||||
files, err := conv.Files(args)
|
files, err := conv.Files(args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
@@ -164,7 +161,6 @@ func parseFlags() (cbconvert.Options, []string) {
|
|||||||
var args []string
|
var args []string
|
||||||
|
|
||||||
convert := flag.NewFlagSet("convert", flag.ExitOnError)
|
convert := flag.NewFlagSet("convert", flag.ExitOnError)
|
||||||
convert.SortFlags = false
|
|
||||||
convert.IntVar(&opts.Width, "width", 0, "Image width")
|
convert.IntVar(&opts.Width, "width", 0, "Image width")
|
||||||
convert.IntVar(&opts.Height, "height", 0, "Image height")
|
convert.IntVar(&opts.Height, "height", 0, "Image height")
|
||||||
convert.BoolVar(&opts.Fit, "fit", false, "Best fit for required width and height")
|
convert.BoolVar(&opts.Fit, "fit", false, "Best fit for required width and height")
|
||||||
@@ -181,18 +177,12 @@ func parseFlags() (cbconvert.Options, []string) {
|
|||||||
convert.IntVar(&opts.Brightness, "brightness", 0, "Adjust the brightness of the images, must be in the range (-100, 100)")
|
convert.IntVar(&opts.Brightness, "brightness", 0, "Adjust the brightness of the images, must be in the range (-100, 100)")
|
||||||
convert.IntVar(&opts.Contrast, "contrast", 0, "Adjust the contrast of the images, must be in the range (-100, 100)")
|
convert.IntVar(&opts.Contrast, "contrast", 0, "Adjust the contrast of the images, must be in the range (-100, 100)")
|
||||||
convert.StringVar(&opts.Suffix, "suffix", "", "Add suffix to file basename")
|
convert.StringVar(&opts.Suffix, "suffix", "", "Add suffix to file basename")
|
||||||
convert.IntVar(&opts.LevelsInMin, "levels-inmin", 0, "Shadow input value")
|
|
||||||
convert.Float64Var(&opts.LevelsGamma, "levels-gamma", 1.0, "Midpoint/Gamma")
|
|
||||||
convert.IntVar(&opts.LevelsInMax, "levels-inmax", 255, "Highlight input value")
|
|
||||||
convert.IntVar(&opts.LevelsOutMin, "levels-outmin", 0, "Shadow output value")
|
|
||||||
convert.IntVar(&opts.LevelsOutMax, "levels-outmax", 255, "Highlight output value")
|
|
||||||
convert.StringVar(&opts.OutDir, "outdir", ".", "Output directory")
|
convert.StringVar(&opts.OutDir, "outdir", ".", "Output directory")
|
||||||
convert.IntVar(&opts.Size, "size", 0, "Process only files larger than size (in MB)")
|
convert.IntVar(&opts.Size, "size", 0, "Process only files larger than size (in MB)")
|
||||||
convert.BoolVar(&opts.Recursive, "recursive", false, "Process subdirectories recursively")
|
convert.BoolVar(&opts.Recursive, "recursive", false, "Process subdirectories recursively")
|
||||||
convert.BoolVar(&opts.Quiet, "quiet", false, "Hide console output")
|
convert.BoolVar(&opts.Quiet, "quiet", false, "Hide console output")
|
||||||
|
|
||||||
cover := flag.NewFlagSet("cover", flag.ExitOnError)
|
cover := flag.NewFlagSet("cover", flag.ExitOnError)
|
||||||
cover.SortFlags = false
|
|
||||||
cover.IntVar(&opts.Width, "width", 0, "Image width")
|
cover.IntVar(&opts.Width, "width", 0, "Image width")
|
||||||
cover.IntVar(&opts.Height, "height", 0, "Image height")
|
cover.IntVar(&opts.Height, "height", 0, "Image height")
|
||||||
cover.BoolVar(&opts.Fit, "fit", false, "Best fit for required width and height")
|
cover.BoolVar(&opts.Fit, "fit", false, "Best fit for required width and height")
|
||||||
@@ -205,7 +195,6 @@ func parseFlags() (cbconvert.Options, []string) {
|
|||||||
cover.BoolVar(&opts.Quiet, "quiet", false, "Hide console output")
|
cover.BoolVar(&opts.Quiet, "quiet", false, "Hide console output")
|
||||||
|
|
||||||
thumbnail := flag.NewFlagSet("thumbnail", flag.ExitOnError)
|
thumbnail := flag.NewFlagSet("thumbnail", flag.ExitOnError)
|
||||||
thumbnail.SortFlags = false
|
|
||||||
thumbnail.IntVar(&opts.Width, "width", 0, "Image width")
|
thumbnail.IntVar(&opts.Width, "width", 0, "Image width")
|
||||||
thumbnail.IntVar(&opts.Height, "height", 0, "Image height")
|
thumbnail.IntVar(&opts.Height, "height", 0, "Image height")
|
||||||
thumbnail.BoolVar(&opts.Fit, "fit", false, "Best fit for required width and height")
|
thumbnail.BoolVar(&opts.Fit, "fit", false, "Best fit for required width and height")
|
||||||
@@ -217,7 +206,6 @@ func parseFlags() (cbconvert.Options, []string) {
|
|||||||
thumbnail.BoolVar(&opts.Quiet, "quiet", false, "Hide console output")
|
thumbnail.BoolVar(&opts.Quiet, "quiet", false, "Hide console output")
|
||||||
|
|
||||||
meta := flag.NewFlagSet("meta", flag.ExitOnError)
|
meta := flag.NewFlagSet("meta", flag.ExitOnError)
|
||||||
meta.SortFlags = false
|
|
||||||
meta.BoolVar(&opts.Cover, "cover", false, "Print cover name")
|
meta.BoolVar(&opts.Cover, "cover", false, "Print cover name")
|
||||||
meta.BoolVar(&opts.Comment, "comment", false, "Print zip comment")
|
meta.BoolVar(&opts.Comment, "comment", false, "Print zip comment")
|
||||||
meta.StringVar(&opts.CommentBody, "comment-body", "", "Set zip comment")
|
meta.StringVar(&opts.CommentBody, "comment-body", "", "Set zip comment")
|
||||||
@@ -230,25 +218,34 @@ func parseFlags() (cbconvert.Options, []string) {
|
|||||||
fmt.Fprintf(os.Stderr, "Usage: %s <command> [<flags>] [file1 dir1 ... fileOrDirN]\n\n", filepath.Base(os.Args[0]))
|
fmt.Fprintf(os.Stderr, "Usage: %s <command> [<flags>] [file1 dir1 ... fileOrDirN]\n\n", filepath.Base(os.Args[0]))
|
||||||
fmt.Fprintf(os.Stderr, "\nCommands:\n")
|
fmt.Fprintf(os.Stderr, "\nCommands:\n")
|
||||||
fmt.Fprintf(os.Stderr, "\n convert\n \tConvert archive or document\n\n")
|
fmt.Fprintf(os.Stderr, "\n convert\n \tConvert archive or document\n\n")
|
||||||
convert.VisitAll(func(f *flag.Flag) {
|
order := []string{"width", "height", "fit", "format", "archive", "quality", "filter", "no-cover", "no-rgb",
|
||||||
|
"no-nonimage", "no-convert", "grayscale", "rotate", "brightness", "contrast", "suffix", "outdir", "size", "recursive", "quiet"}
|
||||||
|
for _, name := range order {
|
||||||
|
f := convert.Lookup(name)
|
||||||
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
||||||
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
||||||
})
|
}
|
||||||
fmt.Fprintf(os.Stderr, "\n cover\n \tExtract cover\n\n")
|
fmt.Fprintf(os.Stderr, "\n cover\n \tExtract cover\n\n")
|
||||||
cover.VisitAll(func(f *flag.Flag) {
|
order = []string{"width", "height", "fit", "format", "quality", "filter", "outdir", "size", "recursive", "quiet"}
|
||||||
|
for _, name := range order {
|
||||||
|
f := cover.Lookup(name)
|
||||||
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
||||||
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
||||||
})
|
}
|
||||||
fmt.Fprintf(os.Stderr, "\n thumbnail\n \tExtract cover thumbnail (freedesktop spec.)\n\n")
|
fmt.Fprintf(os.Stderr, "\n thumbnail\n \tExtract cover thumbnail (freedesktop spec.)\n\n")
|
||||||
thumbnail.VisitAll(func(f *flag.Flag) {
|
order = []string{"width", "height", "fit", "filter", "outdir", "outfile", "size", "recursive", "quiet"}
|
||||||
|
for _, name := range order {
|
||||||
|
f := thumbnail.Lookup(name)
|
||||||
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
||||||
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
||||||
})
|
}
|
||||||
fmt.Fprintf(os.Stderr, "\n meta\n \tCBZ metadata\n\n")
|
fmt.Fprintf(os.Stderr, "\n meta\n \tCBZ metadata\n\n")
|
||||||
meta.VisitAll(func(f *flag.Flag) {
|
order = []string{"cover", "comment", "comment-body", "file-add", "file-remove"}
|
||||||
|
for _, name := range order {
|
||||||
|
f := meta.Lookup(name)
|
||||||
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
fmt.Fprintf(os.Stderr, " --%s\n \t", f.Name)
|
||||||
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
fmt.Fprintf(os.Stderr, "%v (default %q)\n", f.Usage, f.DefValue)
|
||||||
})
|
}
|
||||||
fmt.Fprintf(os.Stderr, "\n version\n \tPrint version\n\n")
|
fmt.Fprintf(os.Stderr, "\n version\n \tPrint version\n\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
GLIBC_x86_64="/usr/x86_64-pc-linux-gnu-static"
|
|
||||||
MINGW_x86_64="/usr/x86_64-w64-mingw32"
|
|
||||||
MACOS_x86_64="/usr/x86_64-apple-darwin"
|
|
||||||
MACOS_aarch64="/usr/aarch64-apple-darwin"
|
|
||||||
|
|
||||||
VERSION="$(git --git-dir ../../.git describe --tags --abbrev=0 2>/dev/null || echo '1.0.0')"
|
|
||||||
|
|
||||||
BUILDDIR="cbconvert-${VERSION}"
|
|
||||||
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
CC=x86_64-pc-linux-gnu-gcc \
|
|
||||||
PKG_CONFIG="x86_64-pc-linux-gnu-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$GLIBC_x86_64/usr/lib64/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$GLIBC_x86_64/usr/lib64/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$GLIBC_x86_64/usr/include" \
|
|
||||||
CGO_LDFLAGS="-L$GLIBC_x86_64/usr/lib64" \
|
|
||||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/cbconvert -ldflags "-linkmode external -s -w -X main.appVersion=${VERSION} '-extldflags=-static'" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && tar -czf "${BUILDDIR}-linux-x86_64.tar.gz" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
CC=x86_64-w64-mingw32-gcc \
|
|
||||||
PKG_CONFIG="/usr/bin/x86_64-w64-mingw32-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$MINGW_x86_64/usr/lib/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$MINGW_x86_64/usr/lib/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$MINGW_x86_64/usr/include" \
|
|
||||||
CGO_LDFLAGS="-L$MINGW_x86_64/usr/lib -ljxl -ljxl_dec -ljxl_profiler -ljxl_threads" \
|
|
||||||
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/cbconvert.exe -ldflags "-s -w -X main.appVersion=${VERSION} '-extldflags=-static -Wl,--allow-multiple-definition'" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && zip -rq "${BUILDDIR}-windows-x86_64.zip" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
PATH=${PATH}:${MACOS_x86_64}/bin \
|
|
||||||
CC=x86_64-apple-darwin21.1-clang \
|
|
||||||
PKG_CONFIG="x86_64-apple-darwin21.1-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$MACOS_x86_64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$MACOS_x86_64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$MACOS_x86_64/usr/include -I$MACOS_x86_64/macports/pkgs/opt/local/include" \
|
|
||||||
CGO_LDFLAGS="-L$MACOS_x86_64/SDK/MacOSX12.1.sdk/usr/lib -L$MACOS_x86_64/macports/pkgs/opt/local/lib -mmacosx-version-min=10.15" \
|
|
||||||
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/cbconvert -ldflags "-linkmode external -s -w -X main.appVersion=${VERSION}" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && zip -rq "${BUILDDIR}-darwin-x86_64.zip" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
|
|
||||||
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
|
|
||||||
mkdir -p "${BUILDDIR}"
|
|
||||||
PATH=${PATH}:${MACOS_aarch64}/bin \
|
|
||||||
CC=aarch64-apple-darwin21.1-clang \
|
|
||||||
PKG_CONFIG="aarch64-apple-darwin21.1-pkg-config" \
|
|
||||||
PKG_CONFIG_PATH="$MACOS_aarch64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
PKG_CONFIG_LIBDIR="$MACOS_aarch64/SDK/MacOSX12.1.sdk/usr/lib/pkgconfig" \
|
|
||||||
CGO_CFLAGS="-I$MACOS_aarch64/usr/include -I$MACOS_aarch64/macports/pkgs/opt/local/include" \
|
|
||||||
CGO_LDFLAGS="-L$MACOS_aarch64/SDK/MacOSX12.1.sdk/usr/lib -L$MACOS_aarch64/macports/pkgs/opt/local/lib -mmacosx-version-min=10.15" \
|
|
||||||
CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 \
|
|
||||||
go build -trimpath -tags 'extlib pkgconfig' -v -o "${BUILDDIR}"/cbconvert -ldflags "-linkmode external -s -w -X main.appVersion=${VERSION}" && \
|
|
||||||
cp ../../README.md ../../AUTHORS ../../COPYING "${BUILDDIR}" && zip -rq "${BUILDDIR}-darwin-aarch64.zip" "${BUILDDIR}"
|
|
||||||
rm -rf "${BUILDDIR}"
|
|
||||||
@@ -1,15 +1,32 @@
|
|||||||
module github.com/gen2brain/cbconvert
|
module github.com/gen2brain/cbconvert
|
||||||
|
|
||||||
go 1.21
|
go 1.23
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/chai2010/webp v1.1.1
|
github.com/anthonynsimon/bild v0.14.0
|
||||||
github.com/disintegration/imaging v1.6.2
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d
|
||||||
github.com/dustin/go-humanize v1.0.1
|
github.com/dustin/go-humanize v1.0.1
|
||||||
github.com/fvbommel/sortorder v1.1.0
|
github.com/fvbommel/sortorder v1.1.0
|
||||||
github.com/gen2brain/go-fitz v1.23.1
|
github.com/gen2brain/avif v0.4.1
|
||||||
github.com/gen2brain/go-unarr v0.1.7
|
github.com/gen2brain/go-fitz v1.24.14
|
||||||
golang.org/x/image v0.12.0
|
github.com/gen2brain/go-unarr v0.2.3
|
||||||
golang.org/x/sync v0.3.0
|
github.com/gen2brain/jpegli v0.3.3
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3
|
github.com/gen2brain/jpegxl v0.4.2
|
||||||
|
github.com/gen2brain/webp v0.5.1
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25
|
||||||
|
golang.org/x/image v0.21.0
|
||||||
|
golang.org/x/sync v0.8.0
|
||||||
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d // indirect
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd // indirect
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 // indirect
|
||||||
|
github.com/ebitengine/purego v0.8.1 // indirect
|
||||||
|
github.com/go-errors/errors v1.5.1 // indirect
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 // indirect
|
||||||
|
github.com/jupiterrider/ffi v0.2.1 // indirect
|
||||||
|
github.com/tetratelabs/wazero v1.8.1 // indirect
|
||||||
|
golang.org/x/net v0.30.0 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,50 +1,79 @@
|
|||||||
github.com/chai2010/webp v1.1.1 h1:jTRmEccAJ4MGrhFOrPMpNGIJ/eybIgwKpcACsrTEapk=
|
github.com/anthonynsimon/bild v0.14.0 h1:IFRkmKdNdqmexXHfEU7rPlAmdUZ8BDZEGtGHDnGWync=
|
||||||
github.com/chai2010/webp v1.1.1/go.mod h1:0XVwvZWdjjdxpUEIf7b9g9VkHFnInUSYujwqTLEuldU=
|
github.com/anthonynsimon/bild v0.14.0/go.mod h1:hcvEAyBjTW69qkKJTfpcDQ83sSZHxwOunsseDfeQhUs=
|
||||||
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
|
github.com/dsoprea/go-exif/v2 v2.0.0-20200321225314-640175a69fe4/go.mod h1:Lm2lMM2zx8p4a34ZemkaUV95AnMl4ZvLbCUbwOvLC2E=
|
||||||
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
|
github.com/dsoprea/go-exif/v2 v2.0.0-20200604193436-ca8584a0e1c4/go.mod h1:9EXlPeHfblFFnwu5UOqmP2eoZfJyAZ2Ri/Vki33ajO0=
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d h1:yeH8wrJa3+8uKKDAdURHUK1ds2UvKhMqX2MiOdVeKPs=
|
||||||
|
github.com/dsoprea/go-exif/v2 v2.0.0-20230826092837-6579e82b732d/go.mod h1:oKrjk2kb3rAR5NbtSTLUMvMSbc+k8ZosI3MaVH47noc=
|
||||||
|
github.com/dsoprea/go-exif/v3 v3.0.0-20200717053412-08f1b6708903/go.mod h1:0nsO1ce0mh5czxGeLo4+OCZ/C6Eo6ZlMWsz7rH/Gxv8=
|
||||||
|
github.com/dsoprea/go-exif/v3 v3.0.0-20210512043655-120bcdb2a55e/go.mod h1:cg5SNYKHMmzxsr9X6ZeLh/nfBRHHp5PngtEPcujONtk=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20190624164917-c4f10aab7696/go.mod h1:Nm/x2ZUNRW6Fe5C3LxdY1PyZY5wmDv/s5dkPJ/VB3iA=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200517223158-a10564966e9d/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd h1:l+vLbuxptsC6VQyQsfD7NnEC8BZuFpz45PgY+pH8YTg=
|
||||||
|
github.com/dsoprea/go-logging v0.0.0-20200710184922-b02d349568dd/go.mod h1:7I+3Pe2o/YSU88W0hWlm9S22W7XI1JFNJ86U0zPKMf8=
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d h1:8+qI8ant/vZkNSsbwSjIR6XJfWcDVTg/qx/3pRUUZNA=
|
||||||
|
github.com/dsoprea/go-png-image-structure v0.0.0-20210512210324-29b889a6093d/go.mod h1:yTR3tKgyk20phAFg6IE9ulMA5NjEDD2wyx+okRFLVtw=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20200711062821-fab8125e9bdf/go.mod h1:95+K3z2L0mqsVYd6yveIv1lmtT3tcQQ3dVakPySffW8=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349 h1:/py11NlxDaOxkT9OKN+gXgT+QOH5xj1ZRoyusfRIlo4=
|
||||||
|
github.com/dsoprea/go-utility v0.0.0-20221003172846-a3e1774ef349/go.mod h1:KVK+/Hul09ujXAGq+42UBgCTnXkiJZRnLYdURGjQUwo=
|
||||||
|
github.com/dsoprea/go-utility/v2 v2.0.0-20200717064901-2fccff4aa15e/go.mod h1:uAzdkPTub5Y9yQwXe8W4m2XuP0tK4a9Q/dantD0+uaU=
|
||||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
|
github.com/ebitengine/purego v0.8.1 h1:sdRKd6plj7KYW33EH5As6YKfe8m9zbN9JMrOjNVF/BE=
|
||||||
|
github.com/ebitengine/purego v0.8.1/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
|
||||||
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
|
github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw=
|
||||||
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
|
||||||
github.com/gen2brain/go-fitz v1.23.1 h1:x69/szWZXpI3jZ57mMqCg7WqqvtYnQG0lXts3L6M1Fc=
|
github.com/gen2brain/avif v0.4.0 h1:JuwAX2rVrkAzQrZx9lpIKx/ovCO35gCUquarfJ6uhHc=
|
||||||
github.com/gen2brain/go-fitz v1.23.1/go.mod h1:HU04vc+RisUh/kvEd2pB0LAxmK1oyXdN4ftyshUr9rQ=
|
github.com/gen2brain/avif v0.4.0/go.mod h1:oePci7KPleKZ8X/2rjZ3FlVm2JFYjPwXiQpNgq9wrzs=
|
||||||
github.com/gen2brain/go-unarr v0.1.7 h1:mEE7bPShJIsmAX67t6BW2ibpEUO7j5WK152KgNM9NbQ=
|
github.com/gen2brain/avif v0.4.1 h1:fjwv5SDNYHdI1gbW6MJn3Yaxs1ldUEfAIAH8Ahee538=
|
||||||
github.com/gen2brain/go-unarr v0.1.7/go.mod h1:MK9a3hddpaIxjEtrE1f/LA5yJ7gA34cS7Oyr325sY9s=
|
github.com/gen2brain/avif v0.4.1/go.mod h1:oePci7KPleKZ8X/2rjZ3FlVm2JFYjPwXiQpNgq9wrzs=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/gen2brain/go-fitz v1.24.14 h1:09weRkjVtLYNGo7l0J7DyOwBExbwi8SJ9h8YPhw9WEo=
|
||||||
|
github.com/gen2brain/go-fitz v1.24.14/go.mod h1:0KaZeQgASc20Yp5R/pFzyy7SmP01XcoHKNF842U2/S4=
|
||||||
|
github.com/gen2brain/go-unarr v0.2.3 h1:VwZg0P6Dc/8Uh51McjVhzUMg4wHwwbiyqjEFsFELc0c=
|
||||||
|
github.com/gen2brain/go-unarr v0.2.3/go.mod h1:hoHheVuf0KT8/hfvkEL7GMwj2h7fq0lF72NdyySdr3c=
|
||||||
|
github.com/gen2brain/jpegli v0.3.3 h1:ryCOQpmGuVk6FA+QBe9st6cW48jsRdVOPiNrAJ50m+k=
|
||||||
|
github.com/gen2brain/jpegli v0.3.3/go.mod h1:6Dbgr+ni1IUBqGVOKHn8lY+6DvwSGfAfC7pPQiSK6uA=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.1 h1:jWaVp5GkXLJXjRvC+g0R9+uo+xoWiS7DYKxJ3n5gHL4=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.1/go.mod h1:zIIDnzh7WqG+z66zyzLWQ0M4AS5xi//pyJLgu32GB1o=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2 h1:Ff0jAWtCRdc9yjPc9jkyak6Ji/A89Jg0KI+D7qOEtRI=
|
||||||
|
github.com/gen2brain/jpegxl v0.4.2/go.mod h1:zIIDnzh7WqG+z66zyzLWQ0M4AS5xi//pyJLgu32GB1o=
|
||||||
|
github.com/gen2brain/webp v0.5.0 h1:nn3o0BtKltoFKX9rlDZG/Y/aWqNzUZVyXdB815yVNfU=
|
||||||
|
github.com/gen2brain/webp v0.5.0/go.mod h1:Nb3xO5sy6MeUAHhru9H3GT7nlOQO5dKRNNlE92CZrJw=
|
||||||
|
github.com/gen2brain/webp v0.5.1 h1:ly9olTGveZEpq3soJuCmex9fxLJ0ipHcQRRSRit5EUE=
|
||||||
|
github.com/gen2brain/webp v0.5.1/go.mod h1:Nb3xO5sy6MeUAHhru9H3GT7nlOQO5dKRNNlE92CZrJw=
|
||||||
|
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||||
|
github.com/go-errors/errors v1.0.2/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||||
|
github.com/go-errors/errors v1.1.1/go.mod h1:psDX2osz5VnTOnFWbDeWwS7yejl+uV3FEWEp4lssFEs=
|
||||||
|
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
|
||||||
|
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||||
|
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||||
|
github.com/golang/geo v0.0.0-20200319012246-673a6f80352d/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217 h1:HKlyj6in2JV6wVkmQ4XmG/EIm+SCYlPZ+V4GWit7Z+I=
|
||||||
|
github.com/golang/geo v0.0.0-20230421003525-6adc56603217/go.mod h1:8wI0hitZ3a1IxZfeH3/5I97CI8i5cLGsYe7xNhQGs9U=
|
||||||
|
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 h1:YLvr1eE6cdCqjOe972w/cYF+FjW34v27+9Vo5106B4M=
|
||||||
|
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=
|
||||||
|
github.com/jupiterrider/ffi v0.2.1 h1:08GJVDqz4eoQq7cKT1T0kwb9MB58XEAGjgxDvz80yBs=
|
||||||
|
github.com/jupiterrider/ffi v0.2.1/go.mod h1:tJ7Q8p/3blFjdWt5qJU4W5oDE0xloImvrViE+0td0Rk=
|
||||||
|
github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550=
|
||||||
|
github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
|
||||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
|
||||||
golang.org/x/image v0.12.0 h1:w13vZbU4o5rKOFFR8y7M+c4A5jXDC0uXTdHYRP8X2DQ=
|
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/image v0.12.0/go.mod h1:Lu90jvHG7GfemOIcldsh9A2hS01ocl6oNO7ype5mEnk=
|
golang.org/x/net v0.0.0-20200320220750-118fecf932d8/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
|
||||||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3 h1:9plKFE/Us913jBN6KohtLG9FNW8LPvfpjiGAORIiEHg=
|
|
||||||
gopkg.in/gographics/imagick.v3 v3.4.3/go.mod h1:+Q9nyA2xRZXrDyTtJ/eko+8V/5E7bWYs08ndkZp8UmA=
|
|
||||||
|
|||||||