crun-cli
v1.4.0
C-based project scaffolding CLI
Loading...
Searching...
No Matches
patterns.h
Go to the documentation of this file.
1
11
12
// #########################################
13
// ### HEADERS & MACROS DECLARATION PART ###
14
// #########################################
15
16
#define CRUN_VERSION "v1.4.0-3"
17
#define CRUN_AUTHOR "ZouariOmar"
18
#define CRUN_REPOSITORY "https://github.com/zouari-oss"
19
20
#include "
color.h
"
21
22
#ifdef _WIN32
23
#define CRUN_HEADER system("cmd /c echo [Crun - " CRUN_VERSION "]");
24
#else
25
#define CRUN_HEADER \
26
system("echo \"" green "$(figlet -w $(tput cols) ' Crun - " CRUN_VERSION "')\"" def)
27
#endif
28
29
#define CRUN_BANNER \
30
printf("%s\t\t\t\t=================== Crun Project ===================\n\t\t\t\t================== " \
31
"By @" CRUN_AUTHOR " ==================\n\t\t\t\t==== Visit Us In: " CRUN_REPOSITORY " ====%s\n\n", \
32
bleu, def)
33
34
#define PROJECT_MENU_FIELD_LENGTH(i, field) snprintf(NULL, 0, "\t\t\t[%d] %s\n", i, field)
35
36
#define PROJECT_MENU_FIELD(buff, i, field) sprintf(buff, "\t\t\t[%d] %s\n", i, field)
37
38
#define PROJECT_MENU(fileds) \
39
printf("%s\t\t------------------------------------------------------------------------------------------\n" \
40
"%s\t\tStacks:\n" \
41
"%s%s" \
42
"\t\t\t[0] Exit\n" \
43
"%s\t\tVisit https://github.com/zouari-oss/crun-cli for more info\n" \
44
"%s\t\t------------------------------------------------------------------------------------------\n" \
45
"...%s", \
46
yellow, red, yellow, fileds, red, yellow, def)
47
48
#define VERSION_MSG \
49
printf("%scrun %s\n" \
50
"Copyright (C) 2026 zouari-oss, Inc.%s\n", \
51
yellow, CRUN_VERSION, def)
52
53
#define HELP_MSG \
54
printf("%scrun usage:%s\n" \
55
" crun Run interactive template selection flow\n" \
56
" crun --help | -h Show this help message\n" \
57
" crun --update Refresh local stacks metadata (crun_stacks.json)\n\n" \
58
"%sNotes:%s\n" \
59
" - Templates are cached under ~/.local/share/crun/ (Linux).\n" \
60
" - Audit logs are written to ~/.local/share/crun/audit.log.\n", \
61
yellow, def, yellow, def)
62
63
#define INSTALLATION_COMPLETE_MSG printf("%sInstallation Complete!\nHAPPY CODING :)\n%s", green, def)
color.h
ANSI Color header file.
project
common
patterns.h
Generated on
for crun-cli by
1.16.1