在Ubuntu Linux下,你在命令终端下输入:nb,回车,系统会提示你:
The program ''nb'' is currently not installed. You can install it by typing: sudo apt-get install nanoblogger bash: nb: command not found(意思是nb程序未安装,你可以通过输入命令sudo apt-get install nanoblogger安装它) 那就输入命令: sudo apt-get install nanoblogger
没过一会,就十几秒的时间(nb程序体积很小,仅80多k),nb程序自动下载并安装了.然后我们再看看使用方法: nb --help
输出帮助信息为:
NanoBlogger - Console weblog engine. Version 3.3, by Kevin Wood <n1xt3r@fastmail.fm>
Usage: nb [-b blog_dir] [options]
Options: -a, --add create new entry, category, or weblog (directory). -b, --blogdir <directory> specify weblog directory. -B, --body <text> deprecated, please use ''-T'' or ''--text'' instead. -c, --category <ID,cat> specify category (for ''--add'', ''--delete'', ''--edit'', ''--list'', ''--update'', and ''--update-cache''). --cfgfile <file> specify an alternate configuration file. --configure configure weblog (for ''--update''). --datadir <directory> specify weblog''s data directory. -d, --delete <ID,cat> delete an entry or category. -D, --desc <text> set text of description (for ''--add'', ''--draft'', ''--makefile'' and ''--makepage''). -e, --edit <ID,cat> edit an entry or category. -E, --draft <file> edit or create metafile. -f, --file <file> specify metafile to import as entry (for ''--add''). -h, --help show this help message. -i, --interactive <1=on/0=off> toggle interactive mode (for ''--add'', ''--delete'', ''--preview'', ''--publish'', and ''--update''). -l, --list <all,cat,DATE,max> list entries or categories (defaults to max). --manual view the manual. -m, --move <ID> move an entry to a specified category (for ''--category''). -M, --makepage <file1> <file2> create new weblog page (file2) from metafile (file1). --makefile <file> create new metafile. -n, --author <text> set text of author (for ''--add'', ''--draft'', ''--makefile'' and ''--makepage''). --plugindir <directory> specify weblog''s plugin directory. -p, --preview run command to preview weblog. -P, --publish run command to publish weblog. -q, --query <DATE> specify a query to run (for ''--edit'' and ''--delete''). --template <file> specify file to load as template (for ''--draft'', ''--makepage'' and ''--makefile''). --template-dir <directory> specify weblog''s template directory. -t, --title <text> set text of title (for ''--add'', ''--category'', ''--draft'', ''--makefile'' and ''--makepage''). --tag <TAG> specify tag (for ''--add'', ''--draft'', ''--edit'', ''--makefile'' and ''--makepage''). --tag-text <text> set text of tag (for ''--tag''). -T, --text <text> set text of body (for ''--add'', ''--draft'', ''--makefile'' and ''--makepage''). -U, --update-cache <all,DATE,max,expired> force update of weblog''s cache removing specified cached data (defaults to ''expired''). -u, --update <all,DATE,main,max> force update of weblog''s files updating specified weblog data (defaults to ''max''). -v, --verbose <1=on/0=off> toggle level of verbosity. -V, --version display version information.
-c,-d,-e,-m accepts multiple ID numbers seperated by commas (e.g. 1,2,3).
--list and --update can match entries by date (irrelevant of entry id(s)). date = YYYY-MM-DD, YYYY-MM, YYYY
Examples:
specify the weblog directory to create or add new entry nb -b ~/public_html/weblog -a
create new category and title it "News" nb -b ~/public_html/weblog -t "News" -c new -a
create new entry using nothing but command line options! nb -b ~/public_html/weblog -n ''myname'' -t ''Title'' -T ''Text!'' -a
More info: URL: http://nanoblogger.sourceforge.net |
|