Handbook
Glossary
insert-page ( file-name -- )
Vocabulary
webapps
.
wiki
.
example
Inputs
file-name
an
object
Outputs
None
Definition
USING:
accessors
calendar
io.encodings.ascii
io.files
kernel
splitting
webapps.wiki
;
IN:
webapps.wiki.example
:
insert-page
( file-name -- )
dup
".txt"
?tail
[
swap
ascii
file-contents
f
<revision>
swap
>>content
swap
>>title
"slava"
>>author
now
>>date
add-revision
]
[
2drop
]
if
;