File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 110.52:
2- * Allow custom log timestamp to be a string.
32 * Support ISO 8601 timestamp format.
3+ * Allow custom log and caption file timestamps to be strings.
44 * Change regular expression library to PCRE2.
55 * Fixed filenames not being affected by --font-scale (Carl Colena).
66 * Fixed file key not being affected by --font-scale.
Original file line number Diff line number Diff line change @@ -391,7 +391,7 @@ Custom Log Format:
391391If you want to use Gource with something other than the supported systems,
392392there is a pipe ('|') delimited custom log format:
393393
394- timestamp - An ISO 8601 or unix timestamp of when the update occured .
394+ timestamp - An ISO 8601 or unix timestamp of when the update occurred .
395395 username - The name of the user who made the update.
396396 type - initial for the update type - (A)dded, (M)odified or (D)eleted.
397397 file - Path of the file updated.
@@ -402,7 +402,7 @@ Caption Log Format:
402402Gource can display captions along the timeline by specifying a caption file
403403(using --caption-file) in the pipe ('|') delimited format below:
404404
405- timestamp - A unix timestamp of when to display the caption.
405+ timestamp - An ISO 8601 or A unix timestamp of when to display the caption.
406406 caption - The caption
407407
408408Recording Videos:
Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ colour - A colour for the file in hex (FFFFFF) format. Optional.
370370Gource can display captions along the timeline by specifying a caption file (using \-\- caption\- file) in the pipe ('|') delimited format below:
371371
372372.ti 10
373- timestamp - A unix timestamp of when to display the caption.
373+ timestamp - An ISO 8601 or unix timestamp of when to display the caption.
374374.ti 10
375375caption - The caption
376376
Original file line number Diff line number Diff line change @@ -1062,7 +1062,7 @@ void Gource::seekTo(float percent) {
10621062 commitlog->seekTo (percent);
10631063}
10641064
1065- Regex caption_regex (" ^(?:\\ xEF\\ xBB\\ xBF)?([0-9 ]+)\\ |(.+)$" );
1065+ Regex caption_regex (" ^(?:\\ xEF\\ xBB\\ xBF)?([^| ]+)\\ |(.+)$" );
10661066
10671067void Gource::loadCaptions () {
10681068 if (!gGourceSettings .caption_file .size ()) return ;
@@ -1082,7 +1082,18 @@ void Gource::loadCaptions() {
10821082
10831083 if (!caption_regex.match (line, &matches)) continue ;
10841084
1085- time_t timestamp = atol (matches[0 ].c_str ());
1085+ time_t timestamp;
1086+
1087+ // Allow timestamp to be a string
1088+ if (matches[0 ].size () > 1 && matches[0 ].find (" -" , 1 ) != std::string::npos) {
1089+ if (!SDLAppSettings::parseDateTime (matches[0 ], timestamp))
1090+ continue ;
1091+ } else {
1092+ timestamp = (time_t ) atoll (matches[0 ].c_str ());
1093+ if (!timestamp && matches[0 ] != " 0" )
1094+ continue ;
1095+ }
1096+
10861097 std::string caption = RCommitLog::filter_utf8 (matches[1 ]);
10871098
10881099 // ignore older captions
Original file line number Diff line number Diff line change 1- 1277787465|Árvíztűrő tükörfúrógép removes a file
1+ 1277787455|Árvíztűrő tükörfúrógép adds a file
2+ 2010-06-29 16:57:45|Árvíztűrő tükörfúrógép removes a file
You can’t perform that action at this time.
0 commit comments