September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -4,13 +4,12 @@ if (argc() == 1) {
|
|||
file f;
|
||||
text s;
|
||||
|
||||
f.open("NOTES.TXT", OPEN_READONLY, 0);
|
||||
f.affix("NOTES.TXT");
|
||||
|
||||
while (f.line(s) != -1) {
|
||||
while (~f.line(s)) {
|
||||
o_(s, "\n");
|
||||
}
|
||||
} else {
|
||||
integer i;
|
||||
date d;
|
||||
file f;
|
||||
|
||||
|
|
@ -21,10 +20,8 @@ if (argc() == 1) {
|
|||
f.form("/f4/-/f2/-/f2/ /f2/:/f2/:/f2/\n", d.year, d.y_month,
|
||||
d.m_day, d.d_hour, d.h_minute, d.m_second);
|
||||
|
||||
i = 0;
|
||||
while ((i += 1) < argc()) {
|
||||
f.byte(i == 1 ? '\t' : ' ');
|
||||
f.text(argv(i));
|
||||
for (integer i, text s in 1.args) {
|
||||
f.bytes(i ? ' ' : '\t', s);
|
||||
}
|
||||
|
||||
f.byte('\n');
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
using Dates
|
||||
|
||||
const filename = "NOTES.TXT"
|
||||
|
||||
if length(ARGS) == 0
|
||||
fp = open(filename, "r")
|
||||
println(read(fp, String))
|
||||
else
|
||||
fp = open(filename, "a+")
|
||||
write(fp, string(DateTime(now()), "\n\t", join(ARGS, " "), "\n"))
|
||||
end
|
||||
close(fp)
|
||||
|
|
@ -19,9 +19,4 @@ if(#arguments -> size) => {
|
|||
|
||||
else
|
||||
#notesfile -> exists ? stdout(#notesfile -> readstring)
|
||||
}<lang>
|
||||
|
||||
Called with:
|
||||
<lang Lasso>./notes "Rosetta was here" Räksmörgås
|
||||
./notes First Second Last
|
||||
./notes
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
./notes "Rosetta was here" Räksmörgås
|
||||
./notes First Second Last
|
||||
./notes
|
||||
Loading…
Add table
Add a link
Reference in a new issue