您的位置:首页 > 移动开发

CSDN Summer of Code 2014 Report #1: About a interactive Command Line App

2014-08-04 01:46 323 查看

Design & Implement a command line app

For the past about 10 days, I'm working on designing & implementing the command line version of EasyTag. Design a CLI app is much easier than GUI apps. What I need to follow is some standards or old-school traditions. According
to my personal use experience, I group CLI apps into three types according how user invoke them:

1. invoke with signal command, e.g. `ls` or `yum`, `git`

2. invoke interactively often keep waiting for user input, e.g. `kid3-cli`

3. advance command UI interface e.g.`cmus`

For the first type, we have only to parsing program arguments, since I'm build the CLI app in C, I can parse it by myself, if the arguments is very simple, otherwise, it's better to use library functions like `getop` or `argp`。

About the interactive one, it's awesome to have editline and complemented. For now I still do not how to parse complex command or even determine what kind of command format that I should use.

what I have done

Implement the skeleton of easytag-cli
Support wavpack files
Create a basic command line interface

What next

Support more file type
Add line edit support
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: