Skip to content

Commit ae92128

Browse files
committed
Migrate some TODOs into tatr tasks
1 parent d412847 commit ae92128

13 files changed

Lines changed: 83 additions & 15 deletions

File tree

‎lexer.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import (
99

1010
type Millis int64
1111

12-
// TODO: we really need more precise error reported for timestamp tokens.
13-
// Like the diagnostics should point out at specific characters that are
14-
// incorrect.
12+
// TASK(20260910-114855): We really need more precise error reported for timestamp tokens.
1513

1614
func parseSsAndMs(s string) (ss int64, ms Millis, err error) {
1715
switch comps := strings.Split(s, "."); len(comps) {

‎markut.go‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func (context EvalContext) containsChunkWithName(filePath string) bool {
341341

342342
// IMPORTANT! chatLog is assumed to be sorted by TimeOffset.
343343
func sliceChatLog(chatLog []ChatMessageGroup, start, end Millis) []ChatMessageGroup {
344-
// TODO: use Binary Search for a speed up on big chat logs when the performance becomes a problem
344+
// TASK(20260910-114950): Use Binary Search in sliceChatLog for a speed up on big chat logs when the performance becomes a problem
345345
lower := 0
346346
for lower < len(chatLog) && chatLog[lower].TimeOffset < start {
347347
lower += 1
@@ -522,7 +522,7 @@ func (context *EvalContext) finishEval() bool {
522522
ok := true;
523523
for i := 0; i+1 < len(context.chapters); i += 1 {
524524
duration := context.chapters[i+1].Timestamp - context.chapters[i].Timestamp
525-
// TODO: angled brackets are not allowed on YouTube. Let's make `chapters` check for that too.
525+
// TASK(20260910-115009): Angled brackets are not allowed on YouTube. Let's make `markut-chapters` check for that.
526526
if duration < MinYouTubeChapterDuration {
527527
fmt.Printf("%s: ERROR: the chapter \"%s\" has duration %s which is shorter than the minimal allowed YouTube chapter duration which is %s (See https://support.google.com/youtube/answer/9884579)\n", context.chapters[i].Loc, context.chapters[i].Label, millisToTs(duration), millisToTs(MinYouTubeChapterDuration))
528528
fmt.Printf("%s: NOTE: the chapter ends here\n", context.chapters[i+1].Loc)
@@ -560,7 +560,7 @@ func (context *EvalContext) finishEval() bool {
560560

561561
func ffmpegPathToBin() (ffmpegPath string) {
562562
ffmpegPath = "ffmpeg"
563-
// TODO: replace FFMPEG_PREFIX envar in favor of a func `ffmpeg_prefix` that you have to call in $HOME/.markut
563+
// TASK(20260910-115027): Replace `FFMPEG_PREFIX` envar in favor of a func `ffmpeg_prefix` that you have to call in `$HOME/.markut`
564564
ffmpegPrefix, ok := os.LookupEnv("FFMPEG_PREFIX")
565565
if ok {
566566
ffmpegPath = path.Join(ffmpegPrefix, "bin", "ffmpeg")
@@ -573,7 +573,7 @@ func logCmd(name string, args ...string) {
573573
chunks = append(chunks, name)
574574
for _, arg := range args {
575575
if strings.Contains(arg, " ") {
576-
// TODO: use proper shell escaping instead of just wrapping with double quotes
576+
// TASK(20260910-115048): use proper shell escaping in logCmd instead of just wrapping with double quotes
577577
chunks = append(chunks, "\""+arg+"\"")
578578
} else {
579579
chunks = append(chunks, arg)
@@ -806,7 +806,7 @@ var Subcommands = map[string]Subcommand{
806806
startOffset = context.chunks[startChunk].Duration();
807807
}
808808
if startOffset > context.chunks[startChunk].Duration() {
809-
fmt.Printf("%s: TODO: overflowing start offset is not implemented yet\n", cut.startLoc)
809+
fmt.Printf("%s: TASK(20260910-115135): overflowing start offset is not implemented yet\n", cut.startLoc)
810810
return false
811811
}
812812
endChunk := cut.endChunk
@@ -816,12 +816,12 @@ var Subcommands = map[string]Subcommand{
816816
endOffset = context.chunks[endChunk].Duration();
817817
}
818818
if endOffset > context.chunks[endChunk].Duration() {
819-
fmt.Printf("%s: TODO: overflowing end offset is not implemented yet\n", cut.endLoc)
819+
fmt.Printf("%s: TASK(20260910-115139): overflowing end offset is not implemented yet\n", cut.endLoc)
820820
return false
821821
}
822822
if startChunk >= endChunk {
823-
fmt.Printf("%s: TODO: we don't handle overlapping start and end chunks\n", cut.endLoc);
824-
fmt.Printf("%s: TODO: start is here\n", cut.startLoc);
823+
fmt.Printf("%s: TASK(20260910-115143): we don't handle overlapping start and end chunks\n", cut.endLoc);
824+
fmt.Printf("%s: NOTE: start is here\n", cut.startLoc);
825825
return false;
826826
// I think this may happen like this
827827
// ```markut
@@ -2050,7 +2050,5 @@ func main() {
20502050
}
20512051
}
20522052

2053-
// TODO: Consider rewritting Markut in C with nob.h
2054-
// There is no reason for it to be written in go at this point. C+nob.h can do all the tricks.
2055-
// For the lexing part we can even use https://github.com/tsoding/alexer
2056-
// TODO: Embed git hash into the executable and display it on `markut version`
2053+
// TASK(20260910-114816): Consider rewritting Markut in a better language
2054+
// TASK(20260910-114828): Embed git hash into the executable and display it on `markut version`

‎tasks/20260910-114816/TASK.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Consider rewritting Markut in a better language
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope
6+
7+
Either Jai or C.

‎tasks/20260910-114828/TASK.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Embed git hash into the executable and display it on `markut version`
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope

‎tasks/20260910-114855/TASK.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# We really need more precise error reported for timestamp tokens.
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope
6+
7+
Like the diagnostics should point out at specific characters that are
8+
incorrect.

‎tasks/20260910-114950/TASK.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Use Binary Search in sliceChatLog for a speed up on big chat logs when the performance becomes a problem
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope,perf

‎tasks/20260910-115009/TASK.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Angled brackets are not allowed on YouTube. Let's make `markut-chapters` check for that.
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope

‎tasks/20260910-115027/TASK.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Replace `FFMPEG_PREFIX` envar in favor of a func `ffmpeg_prefix` that you have to call in `$HOME/.markut`
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope

‎tasks/20260910-115048/TASK.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# use proper shell escaping in logCmd instead of just wrapping with double quotes
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope

‎tasks/20260910-115135/TASK.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# overflowing start offset is not implemented yet\n", cut.startLoc)
2+
3+
- STATUS: OPEN
4+
- PRIORITY: 100
5+
- TAGS: scope

0 commit comments

Comments
 (0)