Wed, 19 Feb 2025 18:32:17 +0100
fix date filters
fixes #599
0 | 1 | /* Copyright 2025 Mike Becker. All rights reserved. |
2 | * | |
3 | * Redistribution and use in source and binary forms, with or without | |
4 | * modification, are permitted provided that the following conditions are met: | |
5 | * | |
6 | * 1. Redistributions of source code must retain the above copyright | |
7 | * notice, this list of conditions and the following disclaimer. | |
8 | * | |
9 | * 2. Redistributions in binary form must reproduce the above copyright | |
10 | * notice, this list of conditions and the following disclaimer in the | |
11 | * documentation and/or other materials provided with the distribution. | |
12 | * | |
13 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
16 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
17 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
18 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
19 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
20 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
21 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
22 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
23 | */ | |
24 | ||
1 | 25 | #include "settings.h" |
3 | 26 | #include "repositories.h" |
4
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
27 | #include "process.h" |
5 | 28 | #include "heatmap.h" |
29 | #include "html.h" | |
1 | 30 | |
5 | 31 | #include <chrono> |
1 | 32 | #include <cstdlib> |
33 | #include <cstdio> | |
34 | #include <cstring> | |
35 | #include <cerrno> | |
36 | ||
13 | 37 | using namespace std::chrono; |
5 | 38 | |
34
cc9d74d5eb46
add configure option for static linking
Mike Becker <universe@uap-core.de>
parents:
29
diff
changeset
|
39 | static constexpr auto program_version = "1.0.1 (beta)"; |
29 | 40 | |
1 | 41 | static void print_help() { |
42 | fputs( | |
23
b4979c194dc8
replace working title with official project title
Mike Becker <universe@uap-core.de>
parents:
21
diff
changeset
|
43 | "Usage: repoheat [OPTION]... [PATH]...\n\n" |
1 | 44 | "Options:\n" |
14 | 45 | " -a, --author <name> Only report this author\n" |
46 | " (repeat option to report multiple authors)\n" | |
47 | " -A, --authormap <file> Apply an author mapping file\n" | |
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
48 | " -d, --depth <num> The search depth (default: 1, max: 255)\n" |
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
49 | " -f, --fragment Output as fragment\n" |
14 | 50 | " -h, --help Print this help message\n" |
27
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
24
diff
changeset
|
51 | " -p, --pull Try to pull the repositories\n" |
14 | 52 | " -s, --separate Output a separate heat map for each repository\n" |
29 | 53 | " -V, --version Output the version of this program and exit\n" |
14 | 54 | " -y, --year <year> The year for which to create the heat map\n" |
55 | " --hg <path> Path to hg binary (default: /usr/bin/hg)\n" | |
56 | " --git <path> Path to git binary (default: /usr/bin/git)\n\n" | |
1 | 57 | "Scans all specified paths recursively for Mercurial and Git repositories and\n" |
58 | "creates a commit heat map for the specified \033[1myear\033[22m or the current year.\n" | |
59 | "By default, the recursion \033[1mdepth\033[22m is one, meaning that this tool assumes that\n" | |
60 | "each \033[1mpath\033[22m is either a repository or contains repositories as subdirectories.\n" | |
61 | "You can change the \033[1mdepth\033[22m to support other directory structures.\n\n" | |
27
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
24
diff
changeset
|
62 | "When you specify the \033[1m--pull\033[22m option, this tool will execute the pull command\n" |
1 | 63 | "(and for hg the update command) before retrieving the commit log, assuming\n" |
9
98312f94dbdd
skip authorization requests when pulling
Mike Becker <universe@uap-core.de>
parents:
8
diff
changeset
|
64 | "to be on the default branch with \033[4mno uncommitted changes\033[24m. If pulling leads to\n" |
98312f94dbdd
skip authorization requests when pulling
Mike Becker <universe@uap-core.de>
parents:
8
diff
changeset
|
65 | "an error, an error message is written to stderr and the process continues\n" |
98312f94dbdd
skip authorization requests when pulling
Mike Becker <universe@uap-core.de>
parents:
8
diff
changeset
|
66 | "with the repository in its current state. This is also the case when pulling\n" |
27
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
24
diff
changeset
|
67 | "would require authorization.\n\n" |
14 | 68 | "By default, this tool reports commits from all authors. If you want to include\n" |
69 | "only specific authors in the report, you can use the \033[1m--author\033[22m option with as\n" | |
70 | "many authors as you like. You can specify either the full author strings with\n" | |
71 | "name and mail address, just the mail address, or even just the local-part of\n" | |
72 | "the mail address. In case your repository contains commits from an author who\n" | |
73 | "used different names or mail addresses, you can use the \033[1m--authormap\033[22m option\n" | |
74 | "to specify a file that contains pairs of author strings, like in the following\n" | |
75 | "example:\n\n" | |
76 | " Full Name <full.name@example.org> = New Name <new.name@example.org>\n" | |
16 | 77 | " just.mail@example.org = Jus Mail <just.mail@example.org>\n" |
78 | " jane = Jane Doe <jane.doe@example.org>\n\n" | |
14 | 79 | "The different variants of full string, only mail address, and only local-part\n" |
16 | 80 | "should \033[4monly\033[24m be used on the left-hand side. When you use the \033[1m--author\033[22m option at\n" |
81 | "the same time, you only need to specify the new author names.\n\n" | |
14 | 82 | "Finally, this tool prints an HTML page to stdout. A separate heap map is\n" |
3 | 83 | "generated for each author showing commits across all repositories, unless the\n" |
84 | "\033[1m--separate\033[22m option is specified in which case each repository is displayed with\n" | |
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
85 | "its own heat map. By using the \033[1m--fragment\033[22m option, the tool only outputs a\n" |
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
86 | "single HTML div container without any header or footer that can be embedded in\n" |
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
87 | "your custom web page.\n" |
1 | 88 | , stderr); |
89 | } | |
90 | ||
3 | 91 | static bool chk_arg(const char *arg, const char *opt1, const char *opt2) { |
1 | 92 | return strcmp(arg, opt1) == 0 || (opt2 != nullptr && strcmp(arg, opt2) == 0); |
93 | } | |
94 | ||
95 | template<typename T> | |
96 | static bool parse_unsigned(const char *str, T *result, unsigned long max) { | |
97 | char *endptr; | |
98 | errno = 0; | |
99 | unsigned long d = strtoul(str, &endptr, 10); | |
100 | if (*endptr != '\0' || errno == ERANGE) return true; | |
101 | if (d < max) { | |
102 | *result = d; | |
103 | return false; | |
104 | } else { | |
105 | return true; | |
106 | } | |
107 | } | |
108 | ||
109 | static int parse_args(fm::settings &settings, int argc, char *argv[]) { | |
110 | for (int i = 1; i < argc; i++) { | |
111 | if (chk_arg(argv[i], "-h", "--help")) { | |
112 | print_help(); | |
29 | 113 | return 1; |
1 | 114 | } else if (chk_arg(argv[i], "-d", "--depth")) { |
115 | if (i + 1 >= argc || parse_unsigned(argv[++i], &settings.depth, 256)) { | |
116 | fputs("missing or invalid depth\n", stderr); | |
117 | return -1; | |
118 | } | |
119 | } else if (chk_arg(argv[i], "-y", "--year")) { | |
120 | if (i + 1 >= argc || parse_unsigned(argv[++i], &settings.year, 9999)) { | |
121 | fputs("missing or invalid year\n", stderr); | |
122 | return -1; | |
123 | } | |
14 | 124 | } else if (chk_arg(argv[i], "-a", "--author")) { |
125 | if (i + 1 < argc) { | |
126 | settings.authors.emplace_back(argv[++i]); | |
127 | } else { | |
128 | fputs("missing author name\n", stderr); | |
129 | return -1; | |
130 | } | |
27
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
24
diff
changeset
|
131 | } else if (chk_arg(argv[i], "-p", "--pull")) { |
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
24
diff
changeset
|
132 | settings.update_repos = true; |
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
133 | } else if (chk_arg(argv[i], "-f", "--fragment")) { |
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
134 | settings.fragment = true; |
1 | 135 | } else if (chk_arg(argv[i], "-s", "--separate")) { |
136 | settings.separate = true; | |
16 | 137 | } else if (chk_arg(argv[i], "-A", "--authormap")) { |
138 | if (i + 1 < argc) { | |
139 | if (settings.parse_authormap(argv[++i])) { | |
140 | fputs("parsing authormap failed\n", stderr); | |
141 | return -1; | |
142 | } | |
143 | } else { | |
144 | fputs("missing filename for authormap\n", stderr); | |
145 | return -1; | |
146 | } | |
29 | 147 | } else if (chk_arg(argv[i], "-V", "--version")) { |
148 | printf("repoheat version %s\n", program_version); | |
149 | return 1; | |
1 | 150 | } else if (chk_arg(argv[i], "--hg", nullptr)) { |
151 | if (i + 1 < argc) { | |
152 | settings.hg.assign(argv[++i]); | |
153 | } else { | |
154 | fputs("--hg is expecting a path\n", stderr); | |
155 | return -1; | |
156 | } | |
157 | } else if (chk_arg(argv[i], "--git", nullptr)) { | |
158 | if (i + 1 < argc) { | |
159 | settings.git.assign(argv[++i]); | |
160 | } else { | |
161 | fputs("--git is expecting a path\n", stderr); | |
162 | return -1; | |
163 | } | |
164 | } else if (argv[i][0] == '-') { | |
165 | fprintf(stderr, "Unknown option: %s\n", argv[i]); | |
166 | return -1; | |
167 | } else { | |
168 | settings.paths.emplace_back(argv[i]); | |
169 | } | |
170 | } | |
171 | ||
172 | if (settings.paths.empty()) { | |
173 | settings.paths.emplace_back("./"); | |
174 | } | |
175 | ||
0 | 176 | return 0; |
177 | } | |
178 | ||
1 | 179 | int main(int argc, char *argv[]) { |
4
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
180 | // parse settings |
1 | 181 | fm::settings settings; |
29 | 182 | if (int result = parse_args(settings, argc, argv); result != 0) { |
183 | return result < 0 ? EXIT_FAILURE : EXIT_SUCCESS; | |
1 | 184 | } |
185 | ||
4
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
186 | // check hg and git |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
187 | fm::process proc; |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
188 | proc.setbin(settings.hg); |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
189 | if (proc.exec({"--version"})) { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
190 | fprintf(stderr, "Testing hg binary '%s' failed!\n", settings.hg.c_str()); |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
191 | return EXIT_FAILURE; |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
192 | } |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
193 | proc.setbin(settings.git); |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
194 | if (proc.exec({"--version"})) { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
195 | fprintf(stderr, "Testing git binary '%s' failed!\n", settings.git.c_str()); |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
196 | return EXIT_FAILURE; |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
197 | } |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
198 | |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
199 | // scan for repos |
3 | 200 | fm::repositories repos; |
201 | for (auto &&path: settings.paths) { | |
202 | repos.scan(path, settings.depth); | |
203 | } | |
4
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
204 | |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
205 | // update repos, if not disabled |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
206 | if (settings.update_repos) { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
207 | for (auto &&repo : repos.list()) { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
208 | proc.chdir(repo.path); |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
209 | if (repo.type == fm::HG) { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
210 | proc.setbin(settings.hg); |
9
98312f94dbdd
skip authorization requests when pulling
Mike Becker <universe@uap-core.de>
parents:
8
diff
changeset
|
211 | if (proc.exec({"pull", "-y"})) { |
21
bc8b76ca9ee9
fix possible misleading error output
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
212 | fprintf(stderr, "Pulling repo '%s' failed - continue without pull.\n", repo.path.c_str()); |
4
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
213 | } else if (proc.exec({"update"})) { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
214 | fprintf(stderr, "Updating repo '%s' failed!\nMaybe there are local changes?\n", repo.path.c_str()); |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
215 | } |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
216 | } else { |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
217 | proc.setbin(settings.git); |
9
98312f94dbdd
skip authorization requests when pulling
Mike Becker <universe@uap-core.de>
parents:
8
diff
changeset
|
218 | if (proc.exec({"pull", "-q"})) { |
21
bc8b76ca9ee9
fix possible misleading error output
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
219 | fprintf(stderr, "Pulling repo '%s' failed - continue without pull.\n", repo.path.c_str()); |
4
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
220 | } |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
221 | } |
82680ce258d6
add automatic pull/udate of repositories
Mike Becker <universe@uap-core.de>
parents:
3
diff
changeset
|
222 | } |
3 | 223 | } |
5 | 224 | |
225 | // determine our reporting range | |
13 | 226 | year report_year{ |
227 | settings.year == fm::settings_current_year | |
228 | ? year_month_day{floor<days>(system_clock::now())}.year() | |
229 | : year{settings.year} | |
230 | }; | |
231 | year_month_day report_begin{report_year, January, 1d}; | |
232 | year_month_day report_end{report_year, December, 31d}; | |
5 | 233 | |
234 | // read the commit logs | |
235 | fm::heatmap heatmap; | |
236 | for (auto &&repo : repos.list()) { | |
237 | if (settings.separate) { | |
238 | heatmap.set_repo(repo.path); | |
239 | } | |
240 | proc.chdir(repo.path); | |
241 | if (repo.type == fm::HG) { | |
242 | proc.setbin(settings.hg); | |
243 | if (proc.exec_log({"log", | |
36 | 244 | "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year), |
5 | 245 | "--template", "{author}#{date|shortdate}\n"})) { |
246 | fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); | |
247 | return EXIT_FAILURE; | |
248 | } | |
16 | 249 | heatmap.add(settings, proc.output()); |
5 | 250 | } else { |
251 | proc.setbin(settings.git); | |
8
6a2e20a4a8ff
fix log not being captured from git
Mike Becker <universe@uap-core.de>
parents:
7
diff
changeset
|
252 | if (proc.exec_log({"log", |
36 | 253 | "--since", std::format("{0}-01-01 00:00:00", report_year), |
254 | "--until", std::format("{0}-12-31 23:59:59", report_year), | |
5 | 255 | "--format=tformat:%an <%ae>#%cs"})) { |
256 | fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str()); | |
257 | return EXIT_FAILURE; | |
258 | } | |
16 | 259 | heatmap.add(settings, proc.output()); |
5 | 260 | } |
261 | } | |
262 | ||
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
263 | html::open(settings.fragment); |
5 | 264 | for (const auto &[repo, authors] : heatmap.data()) { |
24
2a4e97fc5ce5
fix repo h1 generated even when no author has commits - fixes #585
Mike Becker <universe@uap-core.de>
parents:
23
diff
changeset
|
265 | bool h1_rendered = false; |
5 | 266 | for (const auto &[author, entries] : authors) { |
14 | 267 | if (settings.exclude_author(author)) continue; |
24
2a4e97fc5ce5
fix repo h1 generated even when no author has commits - fixes #585
Mike Becker <universe@uap-core.de>
parents:
23
diff
changeset
|
268 | if (!h1_rendered) { |
2a4e97fc5ce5
fix repo h1 generated even when no author has commits - fixes #585
Mike Becker <universe@uap-core.de>
parents:
23
diff
changeset
|
269 | html::h1(repo); |
2a4e97fc5ce5
fix repo h1 generated even when no author has commits - fixes #585
Mike Becker <universe@uap-core.de>
parents:
23
diff
changeset
|
270 | h1_rendered = true; |
2a4e97fc5ce5
fix repo h1 generated even when no author has commits - fixes #585
Mike Becker <universe@uap-core.de>
parents:
23
diff
changeset
|
271 | } |
5 | 272 | html::h2(author); |
13 | 273 | html::table_begin(report_year); |
5 | 274 | |
275 | // initialize counters | |
276 | unsigned column = 0, row = 0; | |
3 | 277 | |
5 | 278 | // initialize first day (which must be a Monday, possibly the year before) |
13 | 279 | sys_days day_to_check = January / Monday[1] / report_year; |
19
2c128952f198
fix accidentally breaking the start of year
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
280 | if (year_month_day{day_to_check}.day() != 1d) { |
2c128952f198
fix accidentally breaking the start of year
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
281 | day_to_check -= days{7}; |
2c128952f198
fix accidentally breaking the start of year
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
282 | } |
5 | 283 | |
284 | // remember the starting point | |
285 | auto start = day_to_check; | |
286 | ||
287 | // now add all entries for Monday, Tuesdays, etc. always starting back in january | |
288 | while (true) { | |
289 | html::row_begin(row); | |
290 | ||
291 | // check if we need to add blank cells | |
292 | while (day_to_check < report_begin) { | |
293 | html::cell_out_of_range(); | |
13 | 294 | day_to_check += days{7}; |
5 | 295 | column++; |
296 | } | |
297 | ||
298 | while (day_to_check <= report_end) { | |
299 | // get the entry from the heatmap | |
300 | auto find_result = entries.find(day_to_check); | |
301 | if (find_result == entries.end()) { | |
7 | 302 | html::cell(day_to_check, 0); |
5 | 303 | } else { |
7 | 304 | html::cell(day_to_check, find_result->second); |
5 | 305 | } |
306 | // advance seven days and one column | |
13 | 307 | day_to_check += days{7}; |
5 | 308 | column++; |
309 | } | |
310 | // fill remaining columns with blank cells | |
311 | for (unsigned i = column ; i < html::columns ; i++) { | |
312 | html::cell_out_of_range(); | |
313 | } | |
314 | ||
315 | // terminate the row | |
316 | html::row_end(); | |
317 | ||
318 | // if we have seen all seven weekdays, that's it | |
319 | if (++row == 7) break; | |
320 | ||
321 | // otherwise, advance the starting point by one day, reset, and begin a new row | |
13 | 322 | start += days{1}; |
5 | 323 | day_to_check = start; |
324 | column =0; | |
325 | } | |
326 | ||
327 | html::table_end(); | |
328 | } | |
329 | } | |
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
19
diff
changeset
|
330 | html::close(settings.fragment); |
3 | 331 | |
1 | 332 | return EXIT_SUCCESS; |
333 | } |