2023-06-15 17:58:22 +00:00
|
|
|
# vim: set et nosta sw=4 ts=4 :
|
|
|
|
|
|
|
|
|
|
import
|
2023-06-18 17:04:02 +00:00
|
|
|
std/os
|
2023-06-18 02:37:25 +00:00
|
|
|
|
|
|
|
|
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 17:04:02 +00:00
|
|
|
let dest = default.subDir( ".wooo" )
|
2023-06-15 17:58:22 +00:00
|
|
|
|
2023-06-18 17:04:02 +00:00
|
|
|
let msg = default.newMessage
|
|
|
|
|
msg.writeStdin()
|
|
|
|
|
# msg.filter()
|
|
|
|
|
msg.save( dest )
|
2023-06-15 17:58:22 +00:00
|
|
|
|
|
|
|
|
|