错误:需要以下参数:

问题描述 投票:0回答:1

我正在尝试在 VS 代码中运行 github 脚本,将 maildir 电子邮件转换为 mbox。我的脚本和包含 maildir 的文件夹位于 C: 驱动器上的文件夹中。当我运行脚本时,它会返回

PS C:\hello> & C:/Users/stu/AppData/Local/Microsoft/WindowsApps/python3.11.exe c:/hello/maildir2mbox.py
usage: maildir2mbox.py [-h] [-r] maildir_path mbox_filename
maildir2mbox.py: error: the following arguments are required: maildir_path, mbox_filename

我想我必须定义目标邮件和 mbox 文件夹,但我不知道如何做到这一点。

我尝试在几个地方放置路径,但实际上我一无所知。

arguments maildir
1个回答
0
投票

正如您所想,您需要提供目标 Maildir 和输出文件夹。 Maildir 文件夹应包含

cur
和/或
new
文件夹。

& python c:/hello/maildir2mbox.py c:/hello/Mailder c:/hello/testoutput

参见

python maildir2mbox.py --help

usage: maildir2mbox.py [-h] [-r] maildir_path mbox_filename

positional arguments:
  maildir_path   path to the existing maildir (containing new, cur, tmp) subdirectories
  mbox_filename  target filename in the mbox format. If the mailbox already exists, new messages are appended to it.

optional arguments:
  -h, --help     show this help message and exit
  -r, --recurse  Process all mail folders included in maildir_path. An equivalent structure is recreated in the mbox
                 format
© www.soinside.com 2019 - 2024. All rights reserved.