cmd

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright © 2024 Pavel Kadera info@pavelkadera.cz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2024 Pavel Kadera info@pavelkadera.cz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2024 Pavel Kadera info@pavelkadera.cz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2024 Pavel Kadera info@pavelkadera.cz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2024 Pavel Kadera info@pavelkadera.cz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2024 Pavel Kadera info@pavelkadera.cz

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const A1 = `
   Obrázek z fotobanky ` + BGreen + `smíte` + Clear + ` použít pro vlastní účely.
   
   Vlastními účely se rozumí použití obrázku pro soukromé, osobní nebo nevýdělečné účely.
   
   ` + BRed + `Výdělečné účely` + Clear + ` jsou například:
      - prodej výrobku s obrázkem,
      - vložení obrázku do reklamy,
      - vložení obrázku do knihy, která se prodává.

   ` + BGreen + `Osobní účely` + Clear + ` jsou například:
      - užití obrázku jako pozadí na monitoru,
      - použití na osobním webu nebo sociálních sítích,
      - tisk do fotoalba.
      `
View Source
const A2 = `
   Obrázek z fotobanky ` + BGreen + `smíte` + Clear + ` upravit.
   
   Úpravou se rozumí například:
      - oříznutí,
      - změna barev,
      - změna velikosti,
      - přidání textu nebo jiné grafiky
   `
View Source
const A3 = `
   Obrázek z fotobanky ` + BGreen + `smíte` + Clear + ` spojit s jiným dílem.

   Spojením s jiným dílem se rozumí například:
      - vložení obrázku do prezentace,
      - vložení obrázku do knihy,
      - vložení obrázku do webové stránky.
`
View Source
const A4 = `
   Obrázek z fotobanky ` + BGreen + `smíte` + Clear + ` použít v jakékoli zemi.

   Obrázek můžete použít v jakékoli zemi světa bez omezení. Licence není teritoriálně omezena.
`
View Source
const ABST_LIC = `
            PRAVIDLA UŽÍVÁNÍ OBRÁZKŮ Z FOTOBANKY
                  
   ` + BBlue + "A" + Clear + `. Obrázek z fotobanky ` + BGreen + `smíte` + Clear + `:
         ` + BPurple + "1" + Clear + `. použít pro vlastní účely,
         ` + BPurple + "2" + Clear + `. upravit,
         ` + BPurple + "3" + Clear + `. spojit s jiným dílem,
         ` + BPurple + "4" + Clear + `. použít v jakékoli zemi.

   ` + BBlue + "B" + Clear + `. Obrázek z fotobanky ` + BRed + `nesmíte` + Clear + ` použít komerčně.

   ` + BBlue + "C" + Clear + `. U obrázku z fotobanky ` + BYellow + `nemusíte` + Clear + ` uvádět autora.
   `
View Source
const B = `
   Obrázek z fotobanky ` + BRed + `nesmíte` + Clear + ` použít komerčně.

   ` + BRed + `Komerčním použitím ` + Clear + ` se rozumí například:
      - prodej výrobku s obrázkem,
      - vložení obrázku do reklamy,
      - vložení obrázku do knihy, která je určena k prodeji.
`
View Source
const BBlack = "\033[1;30m" // Black

Bold

View Source
const BBlue = "\033[1;34m" // Blue
View Source
const BCyan = "\033[1;36m" // Cyan
View Source
const BGreen = "\033[1;32m" // Green
View Source
const BIBlack = "\033[1;90m" // Black

Bold High Intensity

View Source
const BIBlue = "\033[1;94m" // Blue
View Source
const BICyan = "\033[1;96m" // Cyan
View Source
const BIGreen = "\033[1;92m" // Green
View Source
const BIPurple = "\033[1;95m" // Purple
View Source
const BIRed = "\033[1;91m" // Red
View Source
const BIWhite = "\033[1;97m" // White
View Source
const BIYellow = "\033[1;93m" // Yellow
View Source
const BPurple = "\033[1;35m" // Purple
View Source
const BRed = "\033[1;31m" // Red
View Source
const BWhite = "\033[1;37m" // White
View Source
const BYellow = "\033[1;33m" // Yellow
View Source
const Black = "\033[0;30m" // Black

Regular Colors

View Source
const Blue = "\033[0;34m" // Blue
View Source
const C = `
   U obrázku z fotobanky ` + BYellow + `nemusíte` + Clear + ` uvádět autora.

   Uvedení autora ` + BYellow + `není povinné` + Clear + `, ale je vítáno. Pokud si autora přejete podpořit,
   můžete uvést například v popisu obrázku nebo na webu, kde je obrázek zveřejněn.
   Stejně tak ` + BYellow + `není povinné` + Clear + ` uvádět jméno této fotobanky.
   ` + BRed + `Nesmíte` + Clear + ` však uvádět, že jste autorem obrázku, pokud tomu tak opravdu není.
`
View Source
const Clear = "\033[0m" // Text Reset

Reset

View Source
const Cyan = "\033[0;36m" // Cyan
View Source
const Green = "\033[0;32m" // Green
View Source
const IBlack = "\033[0;90m" // Black

High Intensity

View Source
const IBlue = "\033[0;94m" // Blue
View Source
const ICyan = "\033[0;96m" // Cyan
View Source
const IGreen = "\033[0;92m" // Green
View Source
const IPurple = "\033[0;95m" // Purple
View Source
const IRed = "\033[0;91m" // Red
View Source
const IWhite = "\033[0;97m" // White
View Source
const IYellow = "\033[0;93m" // Yellow
View Source
const LIC = `` /* 1001-byte string literal not displayed */
View Source
const On_Black = "\033[40m" // Black

Background

View Source
const On_Blue = "\033[44m" // Blue
View Source
const On_Cyan = "\033[46m" // Cyan
View Source
const On_Green = "\033[42m" // Green
View Source
const On_IBlack = "\033[0;100m" // Black

High Intensity backgrounds

View Source
const On_IBlue = "\033[0;104m" // Blue
View Source
const On_ICyan = "\033[0;106m" // Cyan
View Source
const On_IGreen = "\033[0;102m" // Green
View Source
const On_IPurple = "\033[0;105m" // Purple
View Source
const On_IRed = "\033[0;101m" // Red
View Source
const On_IWhite = "\033[0;107m" // White
View Source
const On_IYellow = "\033[0;103m" // Yellow
View Source
const On_Purple = "\033[45m" // Purple
View Source
const On_Red = "\033[41m" // Red
View Source
const On_White = "\033[47m" // White
View Source
const On_Yellow = "\033[43m" // Yellow
View Source
const Purple = "\033[0;35m" // Purple
View Source
const Red = "\033[0;31m" // Red
View Source
const UBlack = "\033[4;30m" // Black

Underline

View Source
const UBlue = "\033[4;34m" // Blue
View Source
const UCyan = "\033[4;36m" // Cyan
View Source
const UGreen = "\033[4;32m" // Green
View Source
const UPurple = "\033[4;35m" // Purple
View Source
const URed = "\033[4;31m" // Red
View Source
const UWhite = "\033[4;37m" // White
View Source
const UYellow = "\033[4;33m" // Yellow
View Source
const White = "\033[0;37m" // White
View Source
const Yellow = "\033[0;33m" // Yellow

Variables

View Source
var LICMAP = map[string]string{"A1": A1, "A2": A2, "A3": A3, "A4": A4, "B": B, "C": C}

Functions

func Col

func Col(i string, c string) string

Exaple use: Col("Hey", On_IRed)

func Execute

func Execute()

func PixelToLuminance

func PixelToLuminance(p Pixel) int

PixelToLuminance converts a Pixel to a luminance value

func PrintImg

func PrintImg(i string)

Prints image with given name. Uses short ASCII gradient.

func PrintLicence

func PrintLicence(i string)

Prints given string line by line. Does not check whether argument is multiline

Types

type Pixel

type Pixel struct {
	R int
	G int
	B int
	A int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL