29extern const std::string git_info_str;
30extern const std::string git_commit_hash;
31extern const std::string compile_arg;
32extern const std::string version_string;
33extern const bool is_git;
36extern const char *shamrock_compiler_id_string;
38const u32 term_width = 64;
41inline std::string shamrock_title_bar_big =
"\n\
42 █████████ █████ █████ █████████ ██████ ██████ ███████████ ███████ █████████ █████ ████\n\
43 ███░░░░░███░░███ ░░███ ███░░░░░███ ░░██████ ██████ ░░███░░░░░███ ███░░░░░███ ███░░░░░███░░███ ███░ \n\
44░███ ░░░ ░███ ░███ ░███ ░███ ░███░█████░███ ░███ ░███ ███ ░░███ ███ ░░░ ░███ ███ \n\
45░░█████████ ░███████████ ░███████████ ░███░░███ ░███ ░██████████ ░███ ░███░███ ░███████ \n\
46 ░░░░░░░░███ ░███░░░░░███ ░███░░░░░███ ░███ ░░░ ░███ ░███░░░░░███ ░███ ░███░███ ░███░░███ \n\
47 ███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░███ ░░███ ███ ░░███ ███ ░███ ░░███ \n\
48░░█████████ █████ █████ █████ █████ █████ █████ █████ █████ ░░░███████░ ░░█████████ █████ ░░████\n\
49 ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░░░ ░░░░░░░░░ ░░░░░ ░░░░ \n\
53inline std::string get_date_hour_string() {
54 auto now = std::chrono::system_clock::now();
55 auto in_time_t = std::chrono::system_clock::to_time_t(now);
57 ss << std::put_time(std::localtime(&in_time_t),
"%Y-%m-%d %H:%M:%S");
61inline void print_title_bar() {
62 logger::raw_ln(shamrock_title_bar_big);
64 shambase::term_colors::col8b_cyan()
65 +
"Copyright (c) 2021-2026 Timothée David--Cléris (tim.shamrock@proton.me)"
66 + shambase::term_colors::reset());
68 shambase::term_colors::col8b_cyan() +
"SPDX-License-Identifier"
69 + shambase::term_colors::reset() +
" : CeCILL Free Software License Agreement v2.1");
71 shambase::term_colors::col8b_cyan() +
"Start time" + shambase::term_colors::reset() +
" : "
72 + get_date_hour_string());
74 logger::print_faint_row();
77 "\n" + shambase::term_colors::col8b_cyan() +
"Shamrock version "
78 + shambase::term_colors::reset() +
": " + version_string +
"\n");
82 shambase::term_colors::col8b_cyan() +
"Git infos " + shambase::term_colors::reset()
std::uint32_t u32
32 bit unsigned integer
std::string trunc_str(std::string s, u32 max_len)
Truncate a string to a specified length, adding an ellipsis if necessary.