Take notes on the command line: Difference between revisions
Added Arturo implementation
(Updated to work with Nim 1.4: replaced "writeln" with "writeLine". Updated also the output.) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 433:
end if
end run</lang>
=={{header|Arturo}}==
<lang rebol>notes: "notes.txt"
if? empty? arg [
if exists? notes -> print read notes
]
else [
output: (to :string now) ++ "\n" ++
"\t" ++ (join.with:" " to [:string] arg) ++ "\n"
write.append notes output
]</lang>
{{out}}
Example <code>notes.txt</code>:
<pre>2021-06-03T07:17:21+02:00
this is a note
2021-06-03T07:17:26+02:00
this is another note</pre>
=={{header|AutoHotkey}}==
|