Skip to content
Permalink
Browse files

impl build script, created binaries and updated README

  • Loading branch information...
marcobeierer committed Jul 3, 2019
1 parent 6935ce7 commit 51ada958071cdd22b6fc18abf07cb47412403838
Showing with 28 additions and 4 deletions.
  1. +15 −3 README.md
  2. BIN bin/windows/amd64/sitemapgenerator.exe
  3. +12 −0 build.sh
  4. +1 −1 main.go
  5. BIN sitemapgenerator-cli
@@ -1,11 +1,16 @@
# Sitemap Generator CLI
A command line interface for my XML sitemap generator written in Go (golang).
A command line interface for my XML Sitemap Generator written in Go (golang).

## Installation
go get -u github.com/webguerilla/sitemapgenerator-cli
cd $GOPATH/github.com/webguerilla/sitemapgenerator-cli

### From Source
go get -u github.com/marcobeierer/sitemapgenerator-cli
cd $GOPATH/github.com/marcobeierer/sitemapgenerator-cli
go install

### Precompiled
You can find precompiled binaries for 64 bit Linux, MacOS and Windows systems in the `bin` folder of this repository.

## Usage
sitemapgenerator [flags] url

@@ -14,9 +19,16 @@ The sitemap is written to the standard output. It is thus possible to redirect t
### Supported Flags
- tokenpath
- Path to the token file
- max\_fetchers
- Number of the maximal concurrent connections.
- reference\_count\_threshold
- With the reference count threshold you can define that images and videos that are embedded on more than the selected number of HTML pages are excluded from the sitemap.

### Example
sitemapgenerator -tokenpath token.txt https://www.marcobeierer.com > sitemap.xml

## Online Sitemap Generator
The sitemap generator is also available as online tool on [my website](https://www.marcobeierer.com/tools/sitemap-generator).

## Where do I get a Token?
You can use the Sitemap Generator for websites with up to 500 URL for free. If your website has more URLs, you can [purchase a token on my website](https://www.marcobeierer.com/purchase).
Binary file not shown.
@@ -0,0 +1,12 @@
#!/bin/bash
set -e -u

version="$1"

if [ "$version" = "" ]; then
version="dev"
fi

env GOOS=linux GOARCH=amd64 go build -a -v -o ./bin/linux/amd64/sitemapgenerator -ldflags "-X main.version=$version"
env GOOS=darwin GOARCH=amd64 go build -a -v -o ./bin/darwin/amd64/sitemapgenerator -ldflags "-X main.version=$version"
env GOOS=windows GOARCH=amd64 go build -a -v -o ./bin/windows/amd64/sitemapgenerator.exe -ldflags "-X main.version=$version"
@@ -20,7 +20,7 @@ func main() {

tokenPath := flag.String("tokenpath", "", "path to the token file")
referenceCountThreshold := flag.Int64("reference_count_threshold", -1, "With the reference count threshold you can define that images and videos that are embedded on more than the selected number of HTML pages are excluded from the sitemap.")
maxFetchers := flag.Int64("max_fetchers", 3, "Number of the maximal concurrent connections. Default is 3.")
maxFetchers := flag.Int64("max_fetchers", 3, "Number of the maximal concurrent connections.")

flag.Parse()

BIN +6.69 MB sitemapgenerator-cli
Binary file not shown.

0 comments on commit 51ada95

Please sign in to comment.
You can’t perform that action at this time.