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 1e9f8e7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
37 changes: 16 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,29 @@
A command line interface for [GeoStyler](https://geostyler.org) to convert
between various formats for styling of geographic data.

## tl;dr
## Download and usage

```
bunx geostyler-cli --output new-qgis-style.qml my-existing.sld
```
The recommended way to use the GeoStyler CLI is by downloading the binary for your OS.

## Requirements
- [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)

`geostyler-cli` can either be run as a standalone application or installed using [Node.js](https://nodejs.org/).
You can also find the available versions in the assets section of the releases:

## Standalone application
https://github.com/geostyler/geostyler-cli/releases/latest

Binaries are available for Linux, MacOS, and Windows on the
[Releases](https://github.com/geostyler/geostyler-cli/releases) page.
Download the zip file for your operating system, unzip, navigate to the folder
and run the `geostyler` command:
Unzip the binary and simply run:

```sh
./geostyler-cli --help
```
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.
Alternatively you can use the GeoStyler CLI with [bun.sh](https://bun.sh/):

```
bunx geostyler-cli -s sld -t qgis -o output.qml input.sld
bunx geostyler-cli --help
```

## Syntax and examples
Expand Down Expand Up @@ -84,9 +79,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 1e9f8e7

Please sign in to comment.