diff --git a/README.md b/README.md index 11bf183..d8f527c 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,34 @@ A command line interface for [GeoStyler](https://geostyler.org) to convert between various formats for styling of geographic data. -## tl;dr +## Download and usage + +The recommended way to use the GeoStyler CLI is by downloading the binary for your OS. + +- [Linux x64](https://github.com/geostyler/geostyler-cli/releases/latest/download/geostyler-cli-linux.zip) +- [Windows x64](https://github.com/geostyler/geostyler-cli/releases/latest/download/geostyler-cli-win.exe.zip) +- [MacOS x64](https://github.com/geostyler/geostyler-cli/releases/latest/download/geostyler-cli-macos-x64.zip) +- [MacOS arm64](https://github.com/geostyler/geostyler-cli/releases/latest/download/geostyler-cli-macos-arm64.zip) + +You can also find the available versions in the assets section of the releases: + +https://github.com/geostyler/geostyler-cli/releases/latest + +Unzip the binary and simply run: + +```sh +./geostyler-cli --help +``` + +Alternatively you can use the GeoStyler CLI with [bun.sh](https://bun.sh/): ``` -bunx geostyler-cli --output new-qgis-style.qml my-existing.sld +bunx geostyler-cli --help ``` ## Requirements -`geostyler-cli` can either be run as a standalone application or installed using [Node.js](https://nodejs.org/). +`geostyler-cli` can either be run as a standalone application or installed using [bun.sh](https://bun.sh/). ## Standalone application @@ -27,7 +46,7 @@ geostyler-cli --output new-qgis-style.qml my-existing.sld ## Usage without installation ⚡ `Bun` includes [bunx](https://bun.sh/docs/cli/bunx), this -allows you to run commands from an npm package without having to install it. +allows you to run a package without having to install it. ``` bunx geostyler-cli -s sld -t qgis -o output.qml input.sld @@ -84,9 +103,9 @@ Mandatory if the the target is a directory. In your clone of the repo, in the root directory: ```bash -bun install # get dependencies -bun run build # build from possibly changed source -# now you can call your build like this: +# install dependencies +bun install +# run the CLI bun run start -- -s sld -t qgis -o output.qml testdata/point_simplepoint.sld ``` diff --git a/bun.lockb b/bun.lockb index 3b49631..9a4b284 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package-binaries.js b/package-binaries.js index 6e04941..129eb60 100644 --- a/package-binaries.js +++ b/package-binaries.js @@ -4,7 +4,12 @@ import AdmZip from 'adm-zip'; // Define the folder path and the list of file names const folderPath = './binaries/'; -const fileNames = ['geostyler-cli-win.exe', 'geostyler-cli-linux', 'geostyler-cli-macos']; +const fileNames = [ + 'geostyler-cli-win.exe', + 'geostyler-cli-linux', + 'geostyler-cli-macos-x64', + 'geostyler-cli-macos-arm64' +]; function renameFile(oldPath, newPath) { return new Promise((resolve, reject) => { diff --git a/package.json b/package.json index 4497567..ca447ce 100644 --- a/package.json +++ b/package.json @@ -18,10 +18,11 @@ "start": "bun src/index.ts", "lint": "eslint . && tsc --noEmit --project tsconfig.json", "test": "node test.js", - "build-binaries": "bun run build-windows && bun run build-linux && bun run build-macos", + "build-binaries": "bun run build-windows && bun run build-linux && bun run build-macos-x64 && bun run build-macos-arm64", "build-windows": "bun build --compile --target=bun-windows-x64 ./src/index.ts --outfile ./binaries/geostyler-cli-win", "build-linux": "bun build --compile --target=bun-linux-x64 ./src/index.ts --outfile ./binaries/geostyler-cli-linux", - "build-macos": "bun build --compile --target=bun-darwin-x64 ./src/index.ts --outfile ./binaries/geostyler-cli-macos", + "build-macos-x64": "bun build --compile --target=bun-darwin-x64 ./src/index.ts --outfile ./binaries/geostyler-cli-macos-x64", + "build-macos-arm64": "bun build --compile --target=bun-darwin--arm64 ./src/index.ts --outfile ./binaries/geostyler-cli-macos-arm64", "package-binaries": "bun run build-binaries && node package-binaries.js", "prepublishOnly": "bun run build", "postpublish": "bun run package-binaries" diff --git a/src/version.ts b/src/version.ts deleted file mode 100644 index 8b90a51..0000000 --- a/src/version.ts +++ /dev/null @@ -1 +0,0 @@ -export default '4.0.0';