started implementing an API

This commit is contained in:
2023-03-04 18:07:03 +04:00
parent ef15d4696a
commit d69af271fe
3 changed files with 16 additions and 5 deletions

View File

@ -7,7 +7,7 @@ class_name CMD
## unsurround the string
## This function does no evaluation and does not attempt to guess the type of
## arguments. You will receive either bools, or strings.
var command_line_arguments: Dictionary = (func get_command_line_arguments() -> Dictionary:
var command_line_arguments: Dictionary = (func () -> Dictionary:
var unsurround := func unsurround(value: String, quotes := PackedStringArray(['"', "'"])) -> String:
for quote_str in quotes:
if value.begins_with(quote_str) \

View File

@ -75,3 +75,5 @@ func from_csv_line(line: PackedStringArray) -> TimeEntry:
end_time.from_current_time()
return self
func _to_string() -> String:
return "%s\t%s\t%s"%[name, Consts.ONGOING if closed == false else "", start_time]