ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
metadata.c
Go to the documentation of this file.
1
13#include <ascii-chat/log/logging.h>
14#include <ascii-chat/platform/terminal.h>
15#include <ascii-chat/video/palette.h>
16#include <ascii-chat/options/options.h>
17
18// ============================================================================
19// Log Level Metadata
20// ============================================================================
21
22const char *g_log_level_values[] = {"dev", "debug", "info", "warn", "error", "fatal", NULL};
23const int g_log_level_integers[] = {LOG_DEV, LOG_DEBUG, LOG_INFO, LOG_WARN, LOG_ERROR, LOG_FATAL};
24const char *g_log_level_descs[] = {"Development (most verbose, includes function traces)",
25 "Debug (includes internal state tracking)",
26 "Informational (key lifecycle events)",
27 "Warnings (unusual conditions)",
28 "Errors only",
29 "Fatal errors only",
30 NULL};
31
32// ============================================================================
33// Color Setting Metadata (--color flag values)
34// ============================================================================
35
36const char *g_color_setting_values[] = {"auto", "true", "false", NULL};
37const int g_color_setting_integers[] = {COLOR_SETTING_AUTO, COLOR_SETTING_TRUE, COLOR_SETTING_FALSE};
38const char *g_color_setting_descs[] = {"Smart detection (colors if TTY and not piping/CLAUDECODE)",
39 "Force colors ON (override TTY/pipe/CLAUDECODE)",
40 "Force colors OFF (disable all colors)", NULL};
41
42// ============================================================================
43// UTF-8 Setting Metadata (--utf8 flag values)
44// ============================================================================
45
46const char *g_utf8_setting_values[] = {"auto", "true", "false", NULL};
47const int g_utf8_setting_integers[] = {UTF8_SETTING_AUTO, UTF8_SETTING_TRUE, UTF8_SETTING_FALSE};
48const char *g_utf8_setting_descs[] = {"Auto-detect UTF-8 support from terminal capabilities",
49 "Force UTF-8 ON (always use UTF-8 regardless of terminal)",
50 "Force UTF-8 OFF (disable UTF-8 support)", NULL};
51
52// ============================================================================
53// Color Mode Metadata
54// ============================================================================
55
56const char *g_color_mode_values[] = {"auto", "none", "16", "256", "truecolor", NULL};
57const int g_color_mode_integers[] = {TERM_COLOR_AUTO, TERM_COLOR_NONE, TERM_COLOR_16, TERM_COLOR_256,
58 TERM_COLOR_TRUECOLOR};
59const char *g_color_mode_descs[] = {"Auto-detect from terminal",
60 "Monochrome only",
61 "16 colors (ANSI)",
62 "256 colors (xterm)",
63 "24-bit truecolor (modern terminals)",
64 NULL};
65
66// ============================================================================
67// Color Filter Metadata
68// ============================================================================
69
70const char *g_color_filter_values[] = {"none", "black", "white", "green", "magenta", "fuchsia", "orange",
71 "teal", "cyan", "pink", "red", "yellow", NULL};
72const int g_color_filter_integers[] = {COLOR_FILTER_NONE, COLOR_FILTER_BLACK, COLOR_FILTER_WHITE,
73 COLOR_FILTER_GREEN, COLOR_FILTER_MAGENTA, COLOR_FILTER_FUCHSIA,
74 COLOR_FILTER_ORANGE, COLOR_FILTER_TEAL, COLOR_FILTER_CYAN,
75 COLOR_FILTER_PINK, COLOR_FILTER_RED, COLOR_FILTER_YELLOW};
76const char *g_color_filter_descs[] = {"No filtering (default)",
77 "Dark content on white background",
78 "White content on black background",
79 "Green color tint (#00FF41)",
80 "Magenta color tint (#FF00FF)",
81 "Fuchsia color tint (#FF00AA)",
82 "Orange color tint (#FF8800)",
83 "Teal color tint (#00DDDD)",
84 "Cyan color tint (#00FFFF)",
85 "Pink color tint (#FFB6C1)",
86 "Red color tint (#FF3333)",
87 "Yellow color tint (#FFEB99)",
88 NULL};
89
90// ============================================================================
91// Palette Metadata
92// ============================================================================
93
94const char *g_palette_values[] = {"standard", "blocks", "digital", "minimal", "cool", "custom", NULL};
95const int g_palette_integers[] = {PALETTE_STANDARD, PALETTE_BLOCKS, PALETTE_DIGITAL,
96 PALETTE_MINIMAL, PALETTE_COOL, PALETTE_CUSTOM};
97const char *g_palette_descs[] = {"Standard ASCII palette",
98 "Block characters (full/half/quarter blocks)",
99 "Digital/computer style",
100 "Minimal palette (light aesthetic)",
101 "Cool/modern style",
102 "Custom user-defined characters",
103 NULL};
104
105// ============================================================================
106// Render Mode Metadata
107// ============================================================================
108
109const char *g_render_values[] = {"foreground", "fg", "background", "bg", "half-block", NULL};
110const int g_render_integers[] = {RENDER_MODE_FOREGROUND, RENDER_MODE_FOREGROUND, // fg is alias for foreground
111 RENDER_MODE_BACKGROUND, RENDER_MODE_BACKGROUND, // bg is alias for background
112 RENDER_MODE_HALF_BLOCK};
113const char *g_render_descs[] = {"Render using foreground characters only",
114 "Render using foreground characters only (alias)",
115 "Render using background colors only",
116 "Render using background colors only (alias)",
117 "Use half-block characters for 2x vertical resolution",
118 NULL};
119
120// ============================================================================
121// Audio Source Metadata
122// ============================================================================
123
124const char *g_audio_source_values[] = {"auto", "mic", "media", "both", NULL};
125const int g_audio_source_integers[] = {AUDIO_SOURCE_AUTO, AUDIO_SOURCE_MIC, AUDIO_SOURCE_MEDIA, AUDIO_SOURCE_BOTH};
126const char *g_audio_source_descs[] = {"Smart selection (media-only when playing files, mic-only otherwise)",
127 "Microphone only (no media audio)", "Media audio only (no microphone)",
128 "Both microphone and media audio simultaneously", NULL};
129
130// ============================================================================
131// Log Format Output Type Metadata (--log-format flag values)
132// ============================================================================
133
134// ============================================================================
135// Example Arrays (null-terminated)
136// ============================================================================
137
138const char *g_compression_examples[] = {"1", "3", "9", NULL};
139const char *g_fps_examples[] = {"30", "60", "144", NULL};
140const char *g_width_examples[] = {"80", "120", "160", NULL};
141const char *g_height_examples[] = {"24", "40", "60", NULL};
142const char *g_maxclients_examples[] = {"2", "4", "8", NULL};
143const char *g_reconnect_examples[] = {"0", "5", "10", NULL};
144const char *g_webcam_examples[] = {"0", "1", "2", NULL};
145const char *g_mic_examples[] = {"-1", "0", "1", NULL};
146const char *g_speakers_examples[] = {"-1", "0", "1", NULL};
147const char *g_seek_examples[] = {"0", "60", "3:45", NULL};
const int g_palette_integers[]
Definition metadata.c:95
const char * g_log_level_descs[]
Definition metadata.c:24
const char * g_height_examples[]
Definition metadata.c:141
const int g_color_setting_integers[]
Definition metadata.c:37
const char * g_color_filter_descs[]
Definition metadata.c:76
const char * g_compression_examples[]
Definition metadata.c:138
const char * g_audio_source_descs[]
Definition metadata.c:126
const char * g_palette_descs[]
Definition metadata.c:97
const char * g_color_filter_values[]
Definition metadata.c:70
const int g_log_level_integers[]
Definition metadata.c:23
const char * g_seek_examples[]
Definition metadata.c:147
const char * g_color_mode_values[]
Definition metadata.c:56
const char * g_render_descs[]
Definition metadata.c:113
const int g_render_integers[]
Definition metadata.c:110
const char * g_speakers_examples[]
Definition metadata.c:146
const char * g_reconnect_examples[]
Definition metadata.c:143
const char * g_log_level_values[]
Definition metadata.c:22
const char * g_fps_examples[]
Definition metadata.c:139
const char * g_width_examples[]
Definition metadata.c:140
const char * g_palette_values[]
Definition metadata.c:94
const char * g_color_setting_descs[]
Definition metadata.c:38
const char * g_utf8_setting_values[]
Definition metadata.c:46
const int g_utf8_setting_integers[]
Definition metadata.c:47
const char * g_utf8_setting_descs[]
Definition metadata.c:48
const int g_color_filter_integers[]
Definition metadata.c:72
const char * g_color_setting_values[]
Definition metadata.c:36
const char * g_color_mode_descs[]
Definition metadata.c:59
const char * g_maxclients_examples[]
Definition metadata.c:142
const char * g_audio_source_values[]
Definition metadata.c:124
const char * g_render_values[]
Definition metadata.c:109
const int g_color_mode_integers[]
Definition metadata.c:57
const char * g_webcam_examples[]
Definition metadata.c:144
const char * g_mic_examples[]
Definition metadata.c:145
const int g_audio_source_integers[]
Definition metadata.c:125