Tue, 25 Feb 2025 18:46:17 +0100
add total commits counters
fixes #605
1 | 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 | ||
25 | ||
26 | #ifndef SETTINGS_H | |
27 | #define SETTINGS_H | |
28 | ||
29 | #include <string> | |
30 | #include <vector> | |
16 | 31 | #include <unordered_map> |
1 | 32 | |
33 | namespace fm { | |
34 | ||
5 | 35 | constexpr static short settings_current_year = 0; |
1 | 36 | |
37 | struct settings { | |
38 | std::string hg{"/usr/bin/hg"}; | |
39 | std::string git{"/usr/bin/git"}; | |
40 | std::vector<std::string> paths; | |
14 | 41 | std::vector<std::string> authors; |
16 | 42 | std::unordered_map<std::string, std::string> authormap; |
43 | ||
1 | 44 | unsigned char depth = 1; |
27
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
45 | bool update_repos = false; |
1 | 46 | bool separate = false; |
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
47 | bool fragment = false; |
5 | 48 | unsigned short year = settings_current_year; |
14 | 49 | |
16 | 50 | int parse_authormap(const std::string& path); |
14 | 51 | [[nodiscard]] bool exclude_author(const std::string &author) const; |
16 | 52 | |
53 | std::string map_author(std::string_view author) const; | |
1 | 54 | }; |
55 | ||
56 | } | |
57 | ||
58 | #endif //SETTINGS_H |