Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVolland committed Sep 16, 2024
1 parent 2937a4e commit f586c8e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Alternatively you can use the GeoStyler CLI with [bun.sh](https://bun.sh/):

Unzip the binary and simply run:

```sh
./geostyler-cli --help
```

```
bunx geostyler-cli --output new-qgis-style.qml my-existing.sld
```

## 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

Expand All @@ -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
Expand Down Expand Up @@ -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
```

Expand Down
Binary file modified bun.lockb
Binary file not shown.
7 changes: 6 additions & 1 deletion package-binaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/version.ts

This file was deleted.

0 comments on commit f586c8e

Please sign in to comment.