-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.go
More file actions
129 lines (112 loc) · 3.62 KB
/
Copy pathversion.go
File metadata and controls
129 lines (112 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/* -----------------------------------------------------------------
* L o r d O f S c r i p t s (tm)
* Copyright (C)2025 Dídimo Grimaldo T.
* go-carousel
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Linux Desktop Wallpaper Carousel.
*-----------------------------------------------------------------*/
package carousel
import (
"fmt"
//_ "embed"
"github.com/lordofscripts/goapp/app"
)
/* ----------------------------------------------------------------
* G l o b a l s
*-----------------------------------------------------------------*/
const (
NAME string = "Go Carousel"
_DESC string = "A desktop wallpaper carousel with scheduling options"
MANUAL_VERSION string = "1.1.0"
)
const (
// Useful Unicode Characters
CHR_COPYRIGHT = '\u00a9' // ©
CHR_REGISTERD = '\u00ae' // ®
CHR_GUILLEMET_L = '\u00ab' // «
CHR_GUILLEMET_R = '\u00bb' // »
CHR_TRADEMARK = '\u2122' // ™
CHR_SAMARITAN = '\u214f' // ⅏
CHR_PLACEOFINTEREST = '\u2318' // ⌘
CHR_HIGHVOLTAGE = '\u26a1' // ⚡
CHR_TRIDENT = rune(0x1f531) // 🔱
CHR_SPLATTER = rune(0x1fadf)
CHR_WARNING = '\u26a0' // ⚠
CHR_EXCLAMATION = '\u2757'
CHR_SKULL = '\u2620' // ☠
CHR_HONEYBEE = rune(0x1f41d) // 🐝
CO1 = "odlamirG omidiD 6202-5202)C("
CO2 = "stpircS fO droL 6202-5202)C("
CO3 = "gnitirwnitsol"
)
var (
vcsVersion string // automatically injected with linker
vcsCommit string
vcsDate string
vcsBuildNum string
//NOT USEDgo:embed version.txt
)
var (
// NOTE: Change these values accordingly
ModuleVersion app.PackageVersion = app.NewReleaseCandidateVersion(NAME, _DESC, MANUAL_VERSION, 2)
)
/* ----------------------------------------------------------------
* T y p e s
*-----------------------------------------------------------------*/
/* ----------------------------------------------------------------
* M e t h o d s
*-----------------------------------------------------------------*/
func BuildMeta() string {
ver := vcsVersion
if len(vcsVersion) == 0 {
ver = "v" + MANUAL_VERSION
}
return fmt.Sprintf("\t\t%s-%s %s", ver, vcsBuildNum, vcsDate)
}
/* ----------------------------------------------------------------
* F u n c t i o n s
*-----------------------------------------------------------------*/
// Funny LordOfScripts logo
func Logo() string {
const (
whiteStar rune = '\u269d' // ⚝
unisex rune = '\u26a5' // ⚥
hotSpring rune = '\u2668' // ♨
leftConv rune = '\u269e' // ⚞
rightConv rune = '\u269f' // ⚟
eye rune = '\u25d5' // ◕
mouth rune = '\u035c' // ͜ ‿ \u203f
skull rune = '\u2620' // ☠
)
return fmt.Sprintf("%c%c%c %c%c", leftConv, eye, mouth, eye, rightConv)
//fmt.Sprintf("(%c%c %c)", eye, mouth, eye)
}
func Reverse(s string) string {
runes := []rune(s)
for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
runes[i], runes[j] = runes[j], runes[i]
}
return string(runes)
}
/*
This commented part is used by the Makefile target that extracts it
to a temporary file, compiles it and uses it to print out the full
Module Version that includes attributes like Alpha,Beta,RC which the
plain old "make version" didn't
//>>>BEGIN Versioner
package main
import (
"os"
"fmt"
"strings"
"github.com/lordofscripts/carousel"
)
func main() {
if len(os.Args) == 2 && strings.EqualFold(os.Args[1], "short") {
fmt.Println(carousel.ModuleVersion.Short())
} else {
fmt.Println(carousel.ModuleVersion)
}
}
//>>>END Versioner
*/