cnblogs/cli

post需要更多的指令支持

MDZZDYXCMDZZDYXC opened this issue · 1 comments

Example: cnb post create --title 'Title' --body 'Body'
*

Usage: cnb.exe post create [OPTIONS] --title <TITLE> --body

Options:
--title <TITLE> Set post title
Example: cnb post create --title 'Title' --body 'Body'
--body Set post body
Example: cnb post create --title 'Title' --body 'Body'
--publish Set post status to publish
Example: cnb post create --title 'Title' --body 'Body' --publish
* [aliases: pub]
-h, --help Print help

发布博文的这个--body需要更详细的次级指令以及提示; 比如加载文件还是文本,不同格式的文件等 txt md html ,加载文件的路径

您好。--body 选项接受的是字符串,--help 的 Example 提供了使用方法。
如果您想要将文本文件作为 body,可以使用命令组合。
例如,在 Linux 下:

cnb post create --title 'Title' --body "$(cat Text.md)"