diff --git a/.gitignore b/.gitignore index 7fdb70b..b99fafc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ cm test/ website_update.sh site.png +*.sublime-project diff --git a/cm.sublime-workspace b/cm.sublime-workspace new file mode 100644 index 0000000..5bba41b --- /dev/null +++ b/cm.sublime-workspace @@ -0,0 +1,1878 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "ex", + "exit(code: int) -> !" + ], + [ + "pri", + "ctprint(args: ..any, sep := \" \") -> cstring" + ], + [ + "ar", + "arena_allocator" + ], + [ + "clone", + "clone_to_cstring(s: string, allocator := context.allocator, loc := #caller_location) -> (res: cstring, err: runtime.Allocator_Error)" + ], + [ + "let", + "letter_y" + ], + [ + "DrawText", + "DrawText(text: cstring, posX, posY: c.int, fontSize: c.int, color: Color)" + ], + [ + "retrieve_", + "retrieve_random_word()" + ], + [ + "str", + "strings" + ], + [ + "ran", + "random_int" + ], + [ + "int", + "int31(gen := context.random_generator) -> (val: i32)" + ], + [ + "are", + "arena_allocator(arena: ^Arena) -> mem.Allocator" + ], + [ + "M", + "Memory_Block" + ], + [ + "Ar", + "arena_init_growing(arena: ^Arena, reserved: uint = DEFAULT_ARENA_GROWING_MINIMUM_BLOCK_SIZE) -> (err: Allocator_Error)" + ], + [ + "A", + "Arena" + ], + [ + "lo", + "load_csv(filename: string, allocator := context.allocator) -> [][]string" + ], + [ + "csv", + "csv_data" + ], + [ + "cs", + "csv_error" + ], + [ + "epr", + "eprintfln(fmt: string, args: ..any, flush := true) -> int" + ], + [ + "de", + "delete" + ], + [ + "cont", + "context" + ], + [ + "read", + "reader_destroy(r: ^Reader)" + ], + [ + "print", + "printfln(fmt: string, args: ..any, flush := true) " + ], + [ + "s", + "sdl3" + ], + [ + "tur", + "turbineInfo" + ], + [ + "tuir", + "turbinesOutput" + ], + [ + "im", + "imp\tImport" + ] + ] + }, + "buffers": + [ + { + "file": "main.odin", + "settings": + { + "buffer_size": 2579, + "encoding": "UTF-8", + "line_ending": "Unix" + }, + "undo_stack": + [ + [ + 35, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "\n\nos." + } + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "CgAAAAYBAAAAAAAABwEAAAAAAAAAAAAABwEAAAAAAAAIAQAAAAAAAAAAAAAIAQAAAAAAAAkBAAAAAAAAAAAAAAkBAAAAAAAACgEAAAAAAAAAAAAACgEAAAAAAAALAQAAAAAAAAAAAAAKAQAAAAAAAAoBAAAAAAAAAQAAAC4JAQAAAAAAAAkBAAAAAAAAAQAAAHMIAQAAAAAAAAgBAAAAAAAAAQAAAG8HAQAAAAAAAAcBAAAAAAAAAQAAAAoGAQAAAAAAAAYBAAAAAAAAAQAAAAo", + "BQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAFAQAAAAAAAAUBAAAAAAAAAAAAAAAAAAA" + ], + [ + 63, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "\nos." + } + ], + [ + "insert_completion", + { + "completion": "lsp_select_completion {\"index\":14,\"session_name\":\"odin\"}", + "format": "command", + "keep_prefix": false, + "must_insert": true, + "trigger": "File_Type" + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "BQAAAAQBAAAAAAAABgEAAAAAAAAAAAAABgEAAAAAAAAHAQAAAAAAAAAAAAAHAQAAAAAAAAgBAAAAAAAAAAAAAAgBAAAAAAAACQEAAAAAAAAAAAAACQEAAAAAAAASAQAAAAAAAAAAAAA", + "BQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAD5AAAAAAAAAPkAAAAAAAAAAAAAAAAAAAA" + ], + [ + 64, + 1, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_delete", + "motion_args": + { + "to": "line" + }, + "motion_clip_to_line": false, + "motion_command": "expand_selection", + "motion_inclusive": false, + "motion_mode": 0 + }, + "AQAAAAUBAAAAAAAABQEAAAAAAAAOAAAACW9zLkZpbGVfVHlwZQo", + "BQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAARAQAAAAAAABEBAAAAAAAAAAAAAAAA8L8" + ] + ] + }, + { + "file": "parse.odin", + "settings": + { + "buffer_size": 2444, + "encoding": "UTF-8", + "line_ending": "Unix" + }, + "undo_stack": + [ + [ + 5, + 1, + "insert", + { + "characters": " e" + }, + "AgAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAA", + "BAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/" + ], + [ + 7, + 1, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_right_delete", + "motion_args": + { + }, + "motion_clip_to_line": false, + "motion_command": null, + "motion_inclusive": false, + "motion_mode": 0 + }, + "AQAAAAEAAAAAAAAAAQAAAAAAAAABAAAAZQ", + "BAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAABAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAPC/" + ], + [ + 9, + 1, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_right_delete", + "motion_args": + { + }, + "motion_clip_to_line": false, + "motion_command": null, + "motion_inclusive": false, + "motion_mode": 0 + }, + "AQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAIA", + "BAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8L8AAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwvwAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPC/" + ], + [ + 11, + 1, + "insert", + { + "characters": "<" + }, + "AgAAAEABAAAAAAAAQQEAAAAAAAAAAAAAQQEAAAAAAABCAQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAQAEAAAAAAABAAQAAAAAAAAAAAAAAAPC/" + ], + [ + 13, + 1, + "insert", + { + "characters": "'" + }, + "AQAAAEIBAAAAAAAAQwEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAQgEAAAAAAABCAQAAAAAAAAAAAAAAAPC/" + ], + [ + 14, + 1, + "left_delete", + null, + "AQAAAEIBAAAAAAAAQgEAAAAAAAABAAAAJw", + "AQAAAAAAAAABAAAAQwEAAAAAAABDAQAAAAAAAAAAAAAAAPC/" + ], + [ + 15, + 1, + "insert", + { + "characters": "\\" + }, + "AQAAAEIBAAAAAAAAQwEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAQgEAAAAAAABCAQAAAAAAAAAAAAAAAPC/" + ], + [ + 16, + 1, + "left_delete", + null, + "AQAAAEIBAAAAAAAAQgEAAAAAAAABAAAAXA", + "AQAAAAAAAAABAAAAQwEAAAAAAABDAQAAAAAAAAAAAAAAAPC/" + ], + [ + 17, + 1, + "insert", + { + "characters": "/title" + }, + "BgAAAEIBAAAAAAAAQwEAAAAAAAAAAAAAQwEAAAAAAABEAQAAAAAAAAAAAABEAQAAAAAAAEUBAAAAAAAAAAAAAEUBAAAAAAAARgEAAAAAAAAAAAAARgEAAAAAAABHAQAAAAAAAAAAAABHAQAAAAAAAEgBAAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAQgEAAAAAAABCAQAAAAAAAAAAAAAAAPC/" + ], + [ + 18, + 1, + "insert", + { + "characters": " " + }, + "AQAAAEgBAAAAAAAASQEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAASAEAAAAAAABIAQAAAAAAAAAAAAAAAPC/" + ], + [ + 19, + 1, + "left_delete", + null, + "AQAAAEgBAAAAAAAASAEAAAAAAAABAAAAIA", + "AQAAAAAAAAABAAAASQEAAAAAAABJAQAAAAAAAAAAAAAAAPC/" + ], + [ + 20, + 1, + "insert", + { + "characters": ">" + }, + "AQAAAEgBAAAAAAAASQEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAASAEAAAAAAABIAQAAAAAAAAAAAAAAAPC/" + ], + [ + 22, + 1, + "insert", + { + "characters": "Simon" + }, + "BQAAAEEBAAAAAAAAQgEAAAAAAAAAAAAAQgEAAAAAAABDAQAAAAAAAAAAAABDAQAAAAAAAEQBAAAAAAAAAAAAAEQBAAAAAAAARQEAAAAAAAAAAAAARQEAAAAAAABGAQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAQQEAAAAAAABBAQAAAAAAAAAAAAAAAPC/" + ], + [ + 23, + 1, + "insert", + { + "characters": " Kellet" + }, + "BwAAAEYBAAAAAAAARwEAAAAAAAAAAAAARwEAAAAAAABIAQAAAAAAAAAAAABIAQAAAAAAAEkBAAAAAAAAAAAAAEkBAAAAAAAASgEAAAAAAAAAAAAASgEAAAAAAABLAQAAAAAAAAAAAABLAQAAAAAAAEwBAAAAAAAAAAAAAEwBAAAAAAAATQEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAARgEAAAAAAABGAQAAAAAAAAAAAAAAAPC/" + ], + [ + 24, + 1, + "insert", + { + "characters": " " + }, + "AQAAAE0BAAAAAAAATgEAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAATQEAAAAAAABNAQAAAAAAAAAAAAAAAPC/" + ], + [ + 25, + 1, + "left_delete", + null, + "AQAAAE0BAAAAAAAATQEAAAAAAAABAAAAIA", + "AQAAAAAAAAABAAAATgEAAAAAAABOAQAAAAAAAAAAAAAAAPC/" + ], + [ + 50, + 1, + "sequence", + { + "commands": + [ + [ + "vi_eval", + { + "action_args": + { + "insert_command": "vi_delete" + }, + "action_command": "enter_insert_mode", + "motion_args": + { + "repeat": 1 + }, + "motion_clip_to_line": true, + "motion_command": "vi_extend_to_end_of_whitespace_or_word", + "motion_inclusive": true, + "motion_mode": 0 + } + ], + [ + "insert", + { + "characters": "the" + } + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "insert", + { + "characters": "the" + } + ], + [ + "insert", + { + "characters": " it" + } + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "insert", + { + "characters": "Git" + } + ], + [ + "insert", + { + "characters": " dir" + } + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "left_delete", + null + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "HAAAAFsEAAAAAAAAWwQAAAAAAAADAAAAZGlyWwQAAAAAAABcBAAAAAAAAAAAAABcBAAAAAAAAF0EAAAAAAAAAAAAAF0EAAAAAAAAXgQAAAAAAAAAAAAAXgQAAAAAAABfBAAAAAAAAAAAAABeBAAAAAAAAF4EAAAAAAAAAQAAACBdBAAAAAAAAF0EAAAAAAAAAQAAAGVcBAAAAAAAAFwEAAAAAAAAAQAAAGhbBAAAAAAAAFsEAAAAAAAAAQAAAHRaBAAAAAAAAFoEAAAAAAAAAQAAACBZBAAAAAAAAFkEAAAAAAAAAQAAAGFZBAAAAAAAAFoEAAAAAAAAAAAAAFoEAAAAAAAAWwQAAAAAAAAAAAAAWwQAAAAAAABcBAAAAAAAAAAAAABcBAAAAAAAAF0EAAAAAAAAAAAAAF0EAAAAAAAAXgQAAAAAAAAAAAAAXgQAAAAAAABfBAAAAAAAAAAAAABeBAAAAAAAAF4EAAAAAAAAAQAAAHRdBAAAAAAAAF0EAAAAAAAAAQAAAGldBAAAAAAAAF4EAAAAAAAAAAAAAF4EAAAAAAAAXwQAAAAAAAAAAAAAXwQAAAAAAABgBAAAAAAAAAAAAABgBAAAAAAAAGEEAAAAAAAAAAAAAGEEAAAAAAAAYgQAAAAAAAAAAAAAYgQAAAAAAABjBAAAAAAAAAAAAABjBAAAAAAAAGQEAAAAAAAAAAAAAGQEAAAAAAAAZQQAAAAAAAAAAAAAZAQAAAAAAABkBAAAAAAAAAEAAAAg", + "AQAAAAAAAAABAAAAWwQAAAAAAABbBAAAAAAAAAAAAAAAAPC/" + ], + [ + 53, + 1, + "insert", + { + "characters": "\n" + }, + "AQAAAMAEAAAAAAAAwQQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAwAQAAAAAAADABAAAAAAAAAAAAAAAAPC/" + ], + [ + 63, + 1, + "sequence", + { + "commands": + [ + [ + "reindent", + null + ], + [ + "insert", + { + "characters": "//" + } + ], + [ + "insert", + { + "characters": " Skip" + } + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "CQAAAMEEAAAAAAAAwwQAAAAAAAAAAAAAwwQAAAAAAADEBAAAAAAAAAAAAADEBAAAAAAAAMUEAAAAAAAAAAAAAMUEAAAAAAAAxgQAAAAAAAAAAAAAxgQAAAAAAADHBAAAAAAAAAAAAADHBAAAAAAAAMgEAAAAAAAAAAAAAMgEAAAAAAAAyQQAAAAAAAAAAAAAyQQAAAAAAADKBAAAAAAAAAAAAADKBAAAAAAAAMsEAAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAwQQAAAAAAADBBAAAAAAAAAAAAAAAAPC/" + ], + [ + 67, + 1, + "sequence", + { + "commands": + [ + [ + "insert", + { + "characters": " " + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "AQAAAFQEAAAAAAAAVQQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAVAQAAAAAAABUBAAAAAAAAAAAAAAAAPC/" + ], + [ + 72, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "files" + } + ], + [ + "insert", + { + "characters": " th" + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "CAAAAMwEAAAAAAAAzQQAAAAAAAAAAAAAzQQAAAAAAADOBAAAAAAAAAAAAADOBAAAAAAAAM8EAAAAAAAAAAAAAM8EAAAAAAAA0AQAAAAAAAAAAAAA0AQAAAAAAADRBAAAAAAAAAAAAADRBAAAAAAAANIEAAAAAAAAAAAAANIEAAAAAAAA0wQAAAAAAAAAAAAA0wQAAAAAAADUBAAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAxgQAAAAAAADGBAAAAAAAAAAAAAAAgFZA" + ], + [ + 84, + 1, + "sequence", + { + "commands": + [ + [ + "move", + { + "by": "characters", + "forward": true, + "register": "\"" + } + ], + [ + "insert", + { + "characters": "t" + } + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "insert", + { + "characters": "at" + } + ], + [ + "insert", + { + "characters": " are" + } + ], + [ + "insert", + { + "characters": " NOT" + } + ], + [ + "insert", + { + "characters": " .md" + } + ], + [ + "insert", + { + "characters": " files" + } + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "left_delete", + null + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "GgAAANQEAAAAAAAA1QQAAAAAAAAAAAAA1QQAAAAAAADWBAAAAAAAAAAAAADVBAAAAAAAANUEAAAAAAAAAQAAACDUBAAAAAAAANQEAAAAAAAAAQAAAHTUBAAAAAAAANUEAAAAAAAAAAAAANUEAAAAAAAA1gQAAAAAAAAAAAAA1gQAAAAAAADXBAAAAAAAAAAAAADXBAAAAAAAANgEAAAAAAAAAAAAANgEAAAAAAAA2QQAAAAAAAAAAAAA2QQAAAAAAADaBAAAAAAAAAAAAADaBAAAAAAAANsEAAAAAAAAAAAAANsEAAAAAAAA3AQAAAAAAAAAAAAA3AQAAAAAAADdBAAAAAAAAAAAAADdBAAAAAAAAN4EAAAAAAAAAAAAAN4EAAAAAAAA3wQAAAAAAAAAAAAA3wQAAAAAAADgBAAAAAAAAAAAAADgBAAAAAAAAOEEAAAAAAAAAAAAAOEEAAAAAAAA4gQAAAAAAAAAAAAA4gQAAAAAAADjBAAAAAAAAAAAAADjBAAAAAAAAOQEAAAAAAAAAAAAAOQEAAAAAAAA5QQAAAAAAAAAAAAA5QQAAAAAAADmBAAAAAAAAAAAAADmBAAAAAAAAOcEAAAAAAAAAAAAAOcEAAAAAAAA6AQAAAAAAAAAAAAA6AQAAAAAAADpBAAAAAAAAAAAAADoBAAAAAAAAOgEAAAAAAAAAQAAACA", + "AQAAAAAAAAABAAAA0wQAAAAAAADTBAAAAAAAAAAAAAAAAPC/" + ], + [ + 91, + 1, + "sequence", + { + "commands": + [ + [ + "vi_eval", + { + "action_args": + { + "insert_command": "vi_delete" + }, + "action_command": "enter_insert_mode", + "motion_args": + { + "extend": true, + "repeat": 1 + }, + "motion_clip_to_line": false, + "motion_command": "vi_move_to_hard_eol", + "motion_inclusive": true, + "motion_mode": 0 + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "AQAAACYFAAAAAAAAJgUAAAAAAAAGAAAALy9za2lw", + "AQAAAAAAAAABAAAAJgUAAAAAAAAmBQAAAAAAAAAAAAAAAPC/" + ], + [ + 101, + 1, + "sequence", + { + "commands": + [ + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "move", + { + "by": "characters", + "forward": false + } + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "left_delete", + null + ], + [ + "insert", + { + "characters": " " + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "CgAAACgFAAAAAAAAKAUAAAAAAAABAAAACScFAAAAAAAAJwUAAAAAAAABAAAACSYFAAAAAAAAJgUAAAAAAAABAAAACiUFAAAAAAAAJQUAAAAAAAABAAAAICUFAAAAAAAAJgUAAAAAAAAAAAAAHAUAAAAAAAAcBQAAAAAAAAEAAAAJGwUAAAAAAAAbBQAAAAAAAAEAAAAJGgUAAAAAAAAaBQAAAAAAAAEAAAAJGQUAAAAAAAAZBQAAAAAAAAEAAAAKGQUAAAAAAAAaBQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAKQUAAAAAAAApBQAAAAAAAAAAAAAAgGZA" + ], + [ + 110, + 1, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_delete", + "motion_args": + { + "to": "line" + }, + "motion_clip_to_line": false, + "motion_command": "expand_selection", + "motion_inclusive": false, + "motion_mode": 0 + }, + "AQAAAGAFAAAAAAAAYAUAAAAAAAABAAAACg", + "AQAAAAAAAAABAAAAYAUAAAAAAABgBQAAAAAAAAAAAAAAYH5A" + ], + [ + 113, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "\n" + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "AQAAAGIFAAAAAAAAZAUAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAYAUAAAAAAABgBQAAAAAAAAAAAAAAAPC/" + ], + [ + 121, + 1, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_delete", + "motion_args": + { + "to": "line" + }, + "motion_clip_to_line": false, + "motion_command": "expand_selection", + "motion_inclusive": false, + "motion_mode": 0 + }, + "AgAAAMQDAAAAAAAAxAMAAAAAAAASAAAACQkvL2hhbmRsZSBlcnJvcnMKUQUAAAAAAABRBQAAAAAAAAEAAAAJ", + "AQAAAAAAAAABAAAAxQMAAAAAAADFAwAAAAAAAAAAAAAAAEJA" + ], + [ + 230, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "\n\nos." + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "BQAAAJIAAAAAAAAAkwAAAAAAAAAAAAAAkwAAAAAAAACUAAAAAAAAAAAAAACUAAAAAAAAAJUAAAAAAAAAAAAAAJUAAAAAAAAAlgAAAAAAAAAAAAAAlgAAAAAAAACXAAAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAkQAAAAAAAACRAAAAAAAAAAAAAAAAAPC/" + ], + [ + 231, + 1, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_delete", + "motion_args": + { + "to": "line" + }, + "motion_clip_to_line": false, + "motion_command": "expand_selection", + "motion_inclusive": false, + "motion_mode": 0 + }, + "AQAAAJQAAAAAAAAAlAAAAAAAAAAEAAAAb3MuCg", + "AQAAAAAAAAABAAAAlgAAAAAAAACWAAAAAAAAAAAAAAAAAPC/" + ], + [ + 239, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "\nos." + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "BAAAAJIAAAAAAAAAkwAAAAAAAAAAAAAAkwAAAAAAAACUAAAAAAAAAAAAAACUAAAAAAAAAJUAAAAAAAAAAAAAAJUAAAAAAAAAlgAAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAAkQAAAAAAAACRAAAAAAAAAAAAAAAAAPC/" + ], + [ + 240, + 2, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_delete", + "motion_args": + { + "to": "line" + }, + "motion_clip_to_line": false, + "motion_command": "expand_selection", + "motion_inclusive": false, + "motion_mode": 0 + }, + "AgAAAJMAAAAAAAAAkwAAAAAAAAAEAAAAb3MuCpMAAAAAAAAAkwAAAAAAAAABAAAACg", + "AQAAAAAAAAABAAAAlQAAAAAAAACVAAAAAAAAAAAAAAAAAPC/" + ], + [ + 256, + 1, + "sequence", + { + "commands": + [ + [ + "move_to", + { + "register": "\"", + "to": "hardeol" + } + ], + [ + "insert", + { + "characters": "\n\nos." + } + ], + [ + "exit_insert_mode", + null + ] + ] + }, + "BQAAANMCAAAAAAAA1AIAAAAAAAAAAAAA1AIAAAAAAADVAgAAAAAAAAAAAADVAgAAAAAAANYCAAAAAAAAAAAAANYCAAAAAAAA1wIAAAAAAAAAAAAA1wIAAAAAAADYAgAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA0gIAAAAAAADSAgAAAAAAAAAAAAAAAAAA" + ], + [ + 257, + 2, + "vi_eval", + { + "action_args": + { + }, + "action_command": "vi_delete", + "motion_args": + { + "to": "line" + }, + "motion_clip_to_line": false, + "motion_command": "expand_selection", + "motion_inclusive": false, + "motion_mode": 0 + }, + "AgAAANUCAAAAAAAA1QIAAAAAAAAEAAAAb3MuCtUCAAAAAAAA1QIAAAAAAAABAAAACg", + "AQAAAAAAAAABAAAA1wIAAAAAAADXAgAAAAAAAAAAAAAAAPC/" + ] + ] + }, + { + "file": "cm.sublime-project", + "redo_stack": + [ + [ + 84, + 1, + "left_delete", + null, + "AgAAANEBAAAAAAAA0gEAAAAAAAAAAAAA0gEAAAAAAADjAQAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA0QEAAAAAAADRAQAAAAAAAAAAAAAAAPC/" + ], + [ + 76, + 1, + "insert", + { + "characters": "}," + }, + "AgAAAOIBAAAAAAAA4gEAAAAAAAABAAAALOEBAAAAAAAA4QEAAAAAAAABAAAAfQ", + "AQAAAAAAAAABAAAA4wEAAAAAAADjAQAAAAAAAAAAAAAAAPC/" + ], + [ + 75, + 1, + "left_delete", + null, + "AgAAAOEBAAAAAAAA4gEAAAAAAAAAAAAA4gEAAAAAAAA7AgAAAAAAAAAAAAA", + "AQAAAAAAAAABAAAA4QEAAAAAAADhAQAAAAAAAAAAAAAAAPC/" + ] + ], + "settings": + { + "buffer_size": 574, + "encoding": "UTF-8", + "line_ending": "Unix" + }, + "undo_stack": + [ + ] + }, + { + "file": "gen.odin", + "settings": + { + "buffer_size": 2027, + "encoding": "UTF-8", + "line_ending": "Unix" + }, + "undo_stack": + [ + ] + } + ], + "build_system": "", + "build_system_choices": + [ + [ + [ + [ + "Packages/User/odin.sublime-build", + "" + ], + [ + "Packages/User/odin_run.sublime-build", + "" + ] + ], + [ + "Packages/User/odin.sublime-build", + "" + ] + ] + ], + "build_varint": "", + "command_palette": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + [ + ":w", + ":w - Save" + ], + [ + "LSP", + "Preferences: LSP Server Configurations" + ], + [ + ":LSP", + "Preferences: LSP Server Configurations" + ], + [ + ":LSP res", + "SublimeLinter: Reload SublimeLinter and its Plugins" + ], + [ + ":W", + ":w - Save" + ], + [ + "package ins", + "Package Control: Install Package" + ], + [ + ":odin", + "Set Syntax: Odin" + ], + [ + ":git diff", + "Set Syntax: Git Diff" + ], + [ + ":q", + "git: quick commit" + ], + [ + "theme", + "UI: Select Color Scheme" + ], + [ + "Pack ins", + "Package Control: Install Package" + ], + [ + "Odin", + "Build With: odin" + ], + [ + "ter", + "Terminus: Toggle Panel" + ], + [ + "t", + "Terminus: Toggle Panel" + ], + [ + "term", + "Terminus: Toggle Panel" + ], + [ + "LSP ", + "Preferences: LSP Settings" + ], + [ + "Insta", + "Package Control: Install Package" + ], + [ + "New file", + "File: New View into File" + ], + [ + "termaon", + "Terminus: Open Default Shell in Panel" + ], + [ + "termin", + "Terminus: Open Default Shell in Tab (View)" + ], + [ + "termiu", + "Terminus: Open Default Shell in Panel" + ], + [ + "termina", + "Terminus: Open Default Shell in Tab (View)" + ], + [ + ":term", + "Preferences: Terminus Key Bindings" + ], + [ + "pack", + "View Package File" + ], + [ + ":packa", + "Preferences: Browse Packages" + ], + [ + ":LSP en", + "LSP: Enable Language Server in Project" + ], + [ + ":LSP e", + "LSP: Enable Language Server in Project" + ], + [ + ":lsp en", + "LSP: Enable Language Server in Project" + ], + [ + ":open term", + "Terminus: Open Default Shell in Panel" + ], + [ + ":Term", + "Preferences: Terminus View Settings" + ], + [ + ":termin", + "Preferences: Terminus Key Bindings" + ], + [ + "set syn od", + "Set Syntax: Odin" + ], + [ + ":setti", + "Preferences: Settings" + ], + [ + "LSP en", + "LSP: Enable Language Server in Project" + ], + [ + "lsp", + "LSP: Enable Language Server in Project" + ], + [ + "lsp en", + "LSP: Enable Language Server in Project" + ], + [ + "insta", + "Package Control: Install Package" + ], + [ + "set synt", + "Set Syntax: Odin" + ], + [ + "mason", + "Set Syntax: Mason" + ], + [ + "inst", + "Package Control: Install Package" + ], + [ + ":wq", + "gitlab: review merge request" + ], + [ + "Package Control: ", + "Package Control: List Packages" + ], + [ + "packa", + "Package Control: List Packages" + ], + [ + "te", + "Terminal: Open" + ], + [ + "install ", + "Package Control: Install Package" + ], + [ + "iNst", + "Package Control: Install Package" + ], + [ + "Theme", + "UI: Select Color Scheme" + ], + [ + "Install ", + "Package Control: Install Package" + ] + ], + "width": 0.0 + }, + "console": + { + "height": 533.0, + "history": + [ + "q", + "exit()", + "exit", + "odin", + "Instal" + ] + }, + "distraction_free": + { + "menu_visible": true, + "show_minimap": false, + "show_open_files": false, + "show_tabs": false, + "side_bar_visible": false, + "status_bar_visible": false + }, + "expanded_folders": + [ + "/Users/simon/Odin/cm" + ], + "file_history": + [ + "/opt/homebrew/Cellar/odin/2026-06/libexec/core/os/file_util.odin", + "/opt/homebrew/Cellar/odin/2026-06/libexec/core/os/file.odin", + "/Users/simon/Odin/cm/parse.odin", + "/Users/simon/Odin/cm/cm.sublime-project", + "/opt/homebrew/Cellar/odin/2026-06/libexec/core/strings/builder.odin", + "/opt/homebrew/Cellar/odin/2026-06/libexec/core/os/file_posix.odin", + "/opt/homebrew/Cellar/odin/2026-06/libexec/core/time/time.odin", + "/opt/homebrew/Cellar/odin/2026-06/libexec/core/os/process.odin", + "/Users/simon/Odin/cm/main.odin", + "/Users/simon/Odin/cm/gen.odin", + "/Users/simon/Odin/cm/sublime_odin.sublime-project", + "/Users/simon/Odin/cm/.gitignore", + "/Users/simon/Odin/three-dee-model-viewer/main.odin", + "/Users/simon/Odin/wordle/csv.odin", + "/opt/homebrew/Cellar/odin/2026-05/libexec/vendor/raylib/raylib.odin", + "/Users/simon/Odin/wordle/main.odin", + "/Users/simon/Library/Application Support/Sublime Text/Packages/User/odin_run.sublime-build", + "/Users/simon/Odin/falling-text/fall_obj.odin", + "/Users/simon/Odin/falling-text/main.odin", + "/Users/simon/Odin/falling-text/falling-text", + "/Users/simon/Zig/learn/olivec-zig/src/main.zig", + "/Users/simon/C3/hello/main.c3", + "/Users/simon/Downloads/Could you make the fonts match a bit more?", + "/Users/simon/Downloads/My first project (1).bib", + "/Users/simon/website_backup/NEW/HTML/css/style.css", + "/Users/simon/website_backup/NEW/blog/css/style.css", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9YW/ass/handin/tour/src/main/java/tour/TourApplication.java", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9YW/ass/handin/tour/src/main/java/tour/controller/TourController.java", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9YW/ass/handin/tour/src/main/java/tour/service/BookingServiceImpl.java", + "/Users/simon/Odin/cm/test/website/HTML/index.html", + "/Users/simon/Odin/cm/test/website/MARKDOWN/A5Week1.md", + "/Users/simon/website_backup/about.html", + "/Users/simon/Nextcloud/Notes/CSCU9A3/Week 5.md", + "/Users/simon/Downloads/pinky 7/utils.py", + "/Users/simon/Downloads/pinky 6/model.py", + "/Users/simon/Downloads/pinky 5/parser.py", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9B2/HandIN/sik00038/sticker.js", + "/Users/simon/Downloads/pinky 4/tokens.py", + "/Users/simon/Downloads/pinky 4/lexer.py", + "/Users/simon/Downloads/pinky 3/lexer.py", + "/Users/simon/Downloads/pinky 2/lexer.py", + "/Users/simon/Downloads/pinky/tokens.py", + "/Users/simon/Downloads/pinky/lexer.py", + "/Users/simon/Downloads/11_clip_rendering_and_sprite_sheets/11_clip_rendering_and_sprite_sheets.cpp", + "/Users/simon/Downloads/07_texture_loading_and_rendering/07_texture_loading_and_rendering.cpp", + "/Users/simon/Downloads/08_geometry_rendering/08_geometry_rendering.cpp", + "/Users/simon/Downloads/toc-update-wed", + "/Users/simon/Downloads/05_optimized_surface_loading_and_soft_stretching/05_optimized_surface_loading_and_soft_stretching.cpp", + "/Users/simon/go/src/go-weather/README.md", + "/Users/simon/go/src/go-weather/file.go", + "/Users/simon/go/src/go-weather/go.mod", + "/Users/simon/go/src/go-weather/go.sum", + "/Users/simon/go/src/go-weather/web.go", + "/Users/simon/go/src/go-weather/json.go", + "/Users/simon/go/src/go-weather/testfile", + "/Users/simon/go/src/go-weather/weather.go", + "/Users/simon/go/src/go-weather/main.go", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/Personal/Booths/letter.mom", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/Personal/Booths/comp.sh", + "/Users/simon/Library/Application Support/Sublime Text/Packages/User/Preferences.sublime-settings", + "/Users/simon/Library/Application Support/Sublime Text/Packages/Default/Preferences.sublime-settings", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9T4/Ass1/CSCU9T4_F_Assignment_1/final/SimpleParser.java", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9DC/ass/final USE THIS/sentiments.txt", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/CSCU9DC/ass/final USE THIS/comout.txt", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/Dissertation/Final/TEX/main.tex", + "/Users/simon/Downloads/dissertation_template_latex/dissertation.sty", + "/Users/simon/Downloads/dissertation_template_latex/dissertation.tex", + "/Users/simon/Odin/weather/main.odin", + "/Users/simon/Odin/weather/util.odin", + "/opt/homebrew/Cellar/odin/2025-03/libexec/core/mem/virtual/arena.odin", + "/Users/simon/Library/Application Support/Sublime Text/Packages/User/odin.sublime-build", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/Tech Test/WindFarmUtils.java", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/Tech Test/Main.java", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/Tech Test/NordexTurbine.java", + "/Users/simon/Library/CloudStorage/GoogleDrive-fearrising404@gmail.com/My Drive/Uni/CS/Tech Test/run.sh", + "/Users/simon/Odin/raylib-stuff/waves/main.odin", + "/Users/simon/AndroidStudioProjects/HelloWorldTest/app/src/main/java/com/example/helloworldtest/MainActivity.kt", + "/Users/simon/Downloads/preview.html" + ], + "find": + { + "height": 33.0 + }, + "find_in_files": + { + "height": 0.0, + "where_history": + [ + ] + }, + "find_state": + { + "case_sensitive": false, + "find_history": + [ + ], + "highlight": true, + "in_selection": false, + "preserve_case": false, + "regex": false, + "replace_history": + [ + ], + "reverse": false, + "scrollbar_highlights": true, + "show_context": true, + "use_buffer2": true, + "use_gitignore": true, + "whole_word": false, + "wrap": true + }, + "groups": + [ + { + "sheets": + [ + { + "buffer": 0, + "file": "main.odin", + "semi_transient": false, + "settings": + { + "buffer_size": 2579, + "regions": + { + }, + "selection": + [ + [ + 2356, + 2356 + ] + ], + "settings": + { + "auto_complete_triggers": + [ + { + "characters": "<", + "selector": "text.html, text.xml" + }, + { + "rhs_empty": true, + "selector": "punctuation.accessor" + }, + { + "characters": ".>#\"/:", + "selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc", + "server": "odin" + } + ], + "lsp_active": true, + "lsp_uri": "file:///Users/simon/Odin/cm/main.odin", + "show_definitions": false, + "syntax": "Packages/Odin/Odin.sublime-syntax", + "tab_size": 4, + "translate_tabs_to_spaces": false + }, + "translation.x": 0.0, + "translation.y": 1040.0, + "zoom_level": 1.0 + }, + "stack_index": 3, + "stack_multiselect": false, + "type": "text" + }, + { + "buffer": 1, + "file": "parse.odin", + "selected": true, + "semi_transient": false, + "settings": + { + "buffer_size": 2444, + "regions": + { + }, + "selection": + [ + [ + 725, + 725 + ] + ], + "settings": + { + "auto_complete_triggers": + [ + { + "characters": "<", + "selector": "text.html, text.xml" + }, + { + "rhs_empty": true, + "selector": "punctuation.accessor" + }, + { + "characters": ".>#\"/:", + "selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc", + "server": "odin" + } + ], + "lsp_active": true, + "lsp_uri": "file:///Users/simon/Odin/cm/parse.odin", + "show_definitions": false, + "syntax": "Packages/Odin/Odin.sublime-syntax", + "tab_size": 4, + "translate_tabs_to_spaces": false + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 0, + "stack_multiselect": false, + "type": "text" + }, + { + "buffer": 2, + "file": "cm.sublime-project", + "semi_transient": false, + "settings": + { + "buffer_size": 574, + "regions": + { + }, + "selection": + [ + [ + 41, + 41 + ] + ], + "settings": + { + "syntax": "Packages/JSON/JSON.sublime-syntax", + "tab_size": 4, + "translate_tabs_to_spaces": false + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 1, + "stack_multiselect": false, + "type": "text" + }, + { + "buffer": 3, + "file": "gen.odin", + "semi_transient": false, + "settings": + { + "buffer_size": 2027, + "regions": + { + }, + "selection": + [ + [ + 652, + 652 + ] + ], + "settings": + { + "syntax": "Packages/Odin/Odin.sublime-syntax", + "tab_size": 2, + "translate_tabs_to_spaces": false + }, + "translation.x": 0.0, + "translation.y": 0.0, + "zoom_level": 1.0 + }, + "stack_index": 2, + "stack_multiselect": false, + "type": "text" + } + ] + } + ], + "incremental_find": + { + "height": 43.0 + }, + "input": + { + "height": 45.0 + }, + "layout": + { + "cells": + [ + [ + 0, + 0, + 1, + 1 + ] + ], + "cols": + [ + 0.0, + 1.0 + ], + "rows": + [ + 0.0, + 1.0 + ] + }, + "menu_visible": true, + "output.GitSavvy": + { + "height": 150.0 + }, + "output.LSP Log Panel": + { + "height": 0.0, + "history": + [ + ] + }, + "output.SublimeLinter": + { + "height": 0.0, + "history": + [ + ] + }, + "output.SublimeLinter Messages": + { + "height": 150.0 + }, + "output.Terminus": + { + "height": 291.0, + "history": + [ + ] + }, + "output.diagnostics": + { + "height": 0.0, + "history": + [ + ] + }, + "output.exec": + { + "height": 150.0, + "history": + [ + ] + }, + "output.find_results": + { + "height": 0.0, + "history": + [ + ] + }, + "output.mdpopups": + { + "height": 0.0, + "history": + [ + ] + }, + "pinned_build_system": "or", + "project": "cm.sublime-project", + "replace": + { + "height": 62.0 + }, + "save_all_on_build": true, + "select_file": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + [ + "gen", + "gen.odin" + ], + [ + "csv", + "csv.odin" + ], + [ + "ma", + "main.odin" + ], + [ + "m", + "main.odin" + ], + [ + "cs", + "csv.odin" + ], + [ + "v", + "csv.odin" + ], + [ + "od", + "fall_obj.odin" + ], + [ + "fal", + "falling-text" + ], + [ + "mai", + "main.odin" + ] + ], + "width": 0.0 + }, + "select_project": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 0.0 + }, + "select_symbol": + { + "height": 29.0, + "last_filter": "mas", + "selected_items": + [ + [ + "mas", + "MASTODON_PREFIX" + ], + [ + "exit", + "write_prefixs_to_html_file" + ], + [ + "", + "print_all_words" + ] + ], + "width": 592.0 + }, + "selected_group": 0, + "settings": + { + "lsp_show_inlay_hints": false + }, + "show_minimap": true, + "show_open_files": false, + "show_tabs": true, + "side_bar_visible": true, + "side_bar_width": 291.0, + "status_bar_visible": true, + "template_settings": + { + } +} diff --git a/gen.odin b/gen.odin index dae5eee..1a771a9 100644 --- a/gen.odin +++ b/gen.odin @@ -5,6 +5,13 @@ import "core:fmt" import "core:os" import "core:strings" +/* + * WIP files are denoted with an '!' at the start of the file. +* This stops the files being processed and uploaded to the site +* before you finish writing! +*/ + + BLOG_START_MD := ` (\ \'\ @@ -40,7 +47,7 @@ generate_blog_md_file :: proc(path: string, allocator := context.allocator) { trim_b := strings.trim_right(b[1], ".md") if trim_b == "index" { continue } //Ignore Index - if strings.starts_with(trim_b, "!") { continue } + if strings.starts_with(trim_b, "!") { continue } //Ignore WIP files! append(&blog_list, blog) } diff --git a/main.odin b/main.odin index 8a09b5b..3c92207 100644 --- a/main.odin +++ b/main.odin @@ -9,7 +9,7 @@ import "core:time" print_usage :: proc() { fmt.println("Usage:\n\tcm [working dir] [output dir]\nNote:USE FULL PATH!") - os.exit(0) + os.exit(1) } main :: proc() { @@ -84,5 +84,6 @@ main :: proc() { } } } + //TODO: Do timings now? free_all(arena_alloc) } diff --git a/odinfmt.json b/odinfmt.json deleted file mode 100644 index 9b53904..0000000 --- a/odinfmt.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "character_width": 120, - "tabs": true, - "tabs_width": 4, - "sort_imports": true, - "spaces_around_colons": false, - "align_struct_fields": true, - "align_struct_values": true, - "space_single_line_blocks": true -} diff --git a/parse.odin b/parse.odin index b6a3f4b..e7db356 100644 --- a/parse.odin +++ b/parse.odin @@ -9,11 +9,10 @@ import cm "vendor:commonmark" MD_SUFFIX :: ".md" UTF8_PREFIX :: "\n" -CSS_PREFIX :: "\n" +CSS_PREFIX :: "\nSimon Kellet" FAVICON_PREFIX :: "\n" MASTODON_PREFIX :: "\n" - write_prefixs_to_html_file :: proc(file: ^os.File) { os.write_string(file, UTF8_PREFIX) os.write_string(file, CSS_PREFIX) @@ -28,25 +27,23 @@ walk_tree_and_get_md_names :: proc(path: string, allocator := context.allocator) defer os.walker_destroy(&w) for info in os.walker_walk(&w) { - //handle errors if path, err := os.walker_error(&w); err != nil { fmt.eprintfln("failed walking %s: %s", path, err) continue } - //Skip a dir + // Skip the Git dir if strings.has_suffix(info.fullpath, ".git") { os.walker_skip_dir(&w) continue } - if !strings.has_suffix(info.name, MD_SUFFIX) { - continue //skip - } + // Skip files that are NOT .md files + if !strings.has_suffix(info.name, MD_SUFFIX) { continue } append(&files, strings.clone(info.fullpath, allocator)) - } + // Handle error if one happened during iteration at the end: if path, err := os.walker_error(&w); err != nil { fmt.eprintfln("failed walking %s: %v", path, err) @@ -67,7 +64,6 @@ walk_tree :: proc(path: string) -> []u8 { fmt.eprintfln("failed walking %s: %s", path, err) continue } - //lets play around filename = info.name if !strings.has_suffix(info.name, MD_SUFFIX) { continue @@ -80,7 +76,8 @@ walk_tree :: proc(path: string) -> []u8 { parse_file_md_to_html :: proc(filename: string, allocator := context.allocator) -> (parsed: string, err: os.Error) { str := os.read_entire_file_from_path(filename, allocator) or_return - root := cm.parse_document(raw_data(str), len(str), cm.DEFAULT_OPTIONS) + root := cm.parse_document_from_string(string(str), cm.DEFAULT_OPTIONS) + //root := cm.parse_document(raw_data(str), len(str), cm.DEFAULT_OPTIONS) defer cm.node_free(root) html := cm.render_html(root, cm.DEFAULT_OPTIONS)