Skip to content

gostudent/aurora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aurora

Go Report Card OpenCode Codacy branch grade Aurora Travis Branch

A Package to create quote images

Installation

go get github.com/gostudent/aurora

Usage

To Generate Square Image by Using a Custom Gradient:

package main

import (
	"github.com/gostudent/aurora"
)

func main() {
	quote := []string{"It is better to", "be hated for what", "you are than to",
		"loved for what", "what you are not."}
	author := "André Gide"
	filename := "2"
	lg := []aurora.Color{{0, "#65799b", 1.0}, {25, "#5e2563", 1.0}, {75, "#66666", 1.0}, {100, "#fafafa", 1.0}}
	aurora.CreateSquare(filename, quote, author, lg)
}

Smiley face

To Generate Landscape Image by Using a Pre-defined Gradient

package main

import (
	"github.com/gostudent/aurora"
)

func main() {
	quote := []string{"It is better to", "be hated for what", "you are than to",
		"loved for what", "what you are not."}
	author := "André Gide"
	filename := "2"
	lg := aurora.Gradients[7].Colors
	aurora.CreateLand(filename, quote, author, lg)
}

Smiley face

To Generate Portrait Image by Using a Pre-defined Gradient

package main

import (
	"github.com/gostudent/aurora"
)

func main() {
	quote := []string{"Be yourself", "everyone else is", "already taken."}
	author := "Oscar Wilde"
	filename := "1"
	lg := aurora.Gradients[7].Colors
	aurora.CreatePort(filename, quote, author, lg)
}

Smiley face

To Generate Image with Custom Dimensions

package main

import (
	"github.com/gostudent/aurora"
)

func main() {
	quote := []string{"It is better to", "be hated for what", "you are than to",
		"loved for what", "what you are not."}
	author := "André Gide"
	filename := "2"
	lg := aurora.Gradients[7].Colors
	aurora.Create(filename, quote, author, 1000, 2000, lg)
}

Smiley face

Terminal App

How To

Main functionality of the application will be shown here.
Make sure you are in correct folder.

To see the help, run:

aurora -h

Options

   --quote value, -q value        quote that will go in the image (default: "Default quote template.")
   --author value, -a value       Author of the quote (default: "Anonymous")
   --filename value, -f value     name of the file (default: "quote")
   --orientation value, -o value  Orientation. 0 - Square (600 X 600) , 1 - Landscape  and  2 - Portrait (default: "0")
   --gradient value, -g value     Gradient : 0-22 integer input. (default: "0")
   --help, -h                     show help
   --version, -v                  print the version

Example Command

aurora -q "Every Man has in Himself the Most Dangerous Traitor of All." -a "Soren Kierkegaard" -f "example1" -o 1 -g 9

Example quote

About

Aurora is a package to create quote images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages