Skip to content

Commit

Permalink
Bump version to 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jveillet committed Nov 6, 2023
1 parent 014cf0e commit 3f86d36
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ It is a cli tool written in Go that can be called from the main project to gener
This project was born out of the frustration of doing a similar thing with a node script, that was using a lot of dependecies, constantly
updated and breaking my build.

By moving rewriting this tool with Go, I can generate a binary and let it run for YEARS without touching it.
By rewriting this tool with Go, I can generate a binary and let it run for YEARS without touching it.

## Prerequisites

* go >= 1.20
* go >= 1.21

Fonts are available in the `fonts/` directory (Arial by default).
Image templates are in the `templates/` directory.
Fonts are available in the `config/fonts/` directory (Arial by default).
Image templates are in the `config/templates/` directory.

## Installation

Expand All @@ -27,13 +27,13 @@ git clone https://github.com/jveillet/demainilpleut-opengraph.git
Build the binary.

```bash
go build -o dist/opengraph
go build -o opengraph
```

Building without cgo (disables calling C code (import "C"))

```bash
CGO_ENABLED=0 go build -o dist/opengraph
CGO_ENABLED=0 go build -o opengraph
```

Or run via source.
Expand All @@ -47,7 +47,7 @@ go run main.go
Create a .env file at the root of the project, then add the two needed variables.

```bash
touch .env && OG_IMG_PATH=templates >> .env && OG_FONTS_PATH=fonts >> .env
touch .env && OG_IMG_PATH=config/templates >> .env && OG_FONTS_PATH=config/fonts >> .env
```

## Usage
Expand All @@ -60,7 +60,7 @@ USAGE:
Opengraph [global options] command [command options] [arguments...]
VERSION:
1.0.2
1.2.0
COMMANDS:
generate, g Generate an OpenGraph image
Expand Down Expand Up @@ -89,6 +89,20 @@ OPTIONS:
--help, -h show help
```
**Example:**
Via source
```bash
go run main.go generate -a johndoe -d 1970-01-01 -f ./dist/out.png -l tag1,tag2,tag3 -t "The quick brown fox jumps over the lazy dog"
```
Via binary
```bash
./opengraph generate -a johndoe -d 1970-01-01 -f ./dist/out.png -l tag1,tag2,tag3 -t "The quick brown fox jumps over the lazy dog"
```
## Can I use this ?
Well, it is specifically tailored to run for demainilpleut.dev, so it might not be usefull to you.
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "print Opengraph version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("opengraph version 1.1.0")
fmt.Println("opengraph version 1.2.0")
},
}

Expand Down

0 comments on commit 3f86d36

Please sign in to comment.