Conversion

Conversion

WEBP

To WEBP

cwebp input.jpg -o output.webp

From WEBP

dwebp input.webp -o output.png

AVIF

To AVIF

avifenc input.jpg output.avif

From AVIF

avifdec input.avif output.jpg

Convert JPG to PNG

magick input.jpg output.png

ISO

Convert .bin & .cue files to .iso

bchunk img.bin img.cue img

Convert .nrg to .iso

nrg2iso img.nrg img.iso

SQLite

Convert CSV to SQLite DB

Assuming you have a CSV file named data.csv:

shell
$ sqlite3 data.db

In the SQLite3 interactive session that opens, pass these commands:

sqlite> .mode csv;
sqlite> .import data.csv data; -- Here, "data" stands for the table name.

Exit the SQLite3 interactive session with Ctrl+c, and you have an SQLite3 DB.

Convert TSV to SQLite DB

TSV == tab-separated values.
That means the header too is tab-separated! (I guess it’s implied, but I wrote the header comma-separated style.)

Plus if you use Vim and if you have enabled expandtab, run set noexpandtab to disable conversion of tabs to spaces.

Assuming you have a TSV named data.tsv:

shell
$ sqlite3 data.db

In the SQLite3 interactive session that opens, pass these commands:

sqlite> .mode tabs; -- Notice the tabs mode instead of csv.
sqlite> .import data.csv data; -- Here, "data" stands for the table name.

Exit the SQLite3 interactive session with Ctrl+c, and you have an SQLite3 DB.

WOFF2

To WOFF2

woff2_compress input.ttf

From WOFF2

woff2_decompress input.woff2