2023-06-15 17:58:22 +00:00
|
|
|
# vim: set et nosta sw=4 ts=4 :
|
|
|
|
|
|
|
|
|
|
import
|
2023-06-18 02:37:25 +00:00
|
|
|
std/os,
|
|
|
|
|
std/streams
|
|
|
|
|
|
|
|
|
|
import
|
|
|
|
|
lib/config,
|
|
|
|
|
lib/maildir,
|
|
|
|
|
lib/util
|
2023-06-15 17:58:22 +00:00
|
|
|
|
|
|
|
|
|
2023-06-18 02:37:25 +00:00
|
|
|
if not existsEnv( "HOME" ):
|
|
|
|
|
deferral "Unable to determine HOME from environment."
|
2023-06-15 17:58:22 +00:00
|
|
|
|
2023-06-18 02:37:25 +00:00
|
|
|
let
|
|
|
|
|
home = getHomeDir()
|
|
|
|
|
opts = parse_cmdline()
|
|
|
|
|
conf = get_config( opts.config )
|
|
|
|
|
default = newMaildir( home & "Maildir" )
|
2023-06-15 17:58:22 +00:00
|
|
|
|
|
|
|
|
|
2023-06-18 02:37:25 +00:00
|
|
|
echo repr default.newMessage
|
2023-06-15 17:58:22 +00:00
|
|
|
|
2023-06-18 02:37:25 +00:00
|
|
|
# let input = stdin.newFileStream()
|
|
|
|
|
# var buf = input.readStr( 8192 )
|
|
|
|
|
# var message = buf
|
|
|
|
|
# while buf != "":
|
|
|
|
|
# buf = input.readStr( 8192 )
|
|
|
|
|
# message = message & buf
|
2023-06-15 17:58:22 +00:00
|
|
|
|
2023-06-18 02:37:25 +00:00
|
|
|
# echo message
|
2023-06-15 17:58:22 +00:00
|
|
|
|