Giter Club home page Giter Club logo

genproj's Introduction

genProj

...如果能够根据模板自动生成代码,那就好了...

这个项目的主要目的是方便的生成特定语言的最小模板

因为受嵌入式系统设计的影响,总是希望能用最小系统板的概念,因此有了个这genProj,目的就是方便的生成特定语言的最小模板,模板带有特定的Makefile。生成一个特定的小模板或者小例子,方便开发,未来会支持多种语言,多种库函数,生成的main函数带有一个简单的小例子。

现在支持的语言有c,c++

现在支持的库有。。

能够加快小型项目的启动,方便初学者学习,迅速入门某种语言或者某种库的使用。

编译方法

编译比较简单,平台设定是在Linux下,编译带有c++11,所以gcc版本要支持c++11

clone此版本库后,可以直接make,生成genProj

安装 如果你有root权限,可以sudo make install,会在你的/usr/bin下放一个本文件的副本,卸载输入sudo make uninstall

参数说明:

使用了getopt来获得参数,参数说明如下:

-t language 指定生成的语言,例如 -t c 或 -t c++

-p directory 指定生成的目录,就是project的名字,-p proj1会在当前目录创建proj1文件夹,并在该文件夹下放置模板,这个名字同时也是Makefile生成的二进制文件的名字。

-m comment 指定comment内容,并把内容放在创建的目录下的README文件中

TODO-LIST

  1. 完善文件操作,目前对错误处理不足

  2. 完善参数操作,目前对参数处理还不够全面

  3. 增加模板的丰富度,目前模板的形式是有一个基类,放置了一些公共函数,不同的语言或者不同的库,通过继承来添加各自的模板内容,但现在模板内容太简单。

  4. 增加各种库的支持,能够生成特定语言,特定库使用的一些模板。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.