Coder Social home page Coder Social logo

human2machine's Introduction

Human to machine

This program translates human language to Meteor Kitchen input .json file.

This is just initial commit, more details will be added soon.

Usage

human2machine input_file.txt [output_file.json]

Meteor Kitchen automatically executes human2machine, converts .txt file to .json and builds application:

meteor-kitchen input_file.txt ./output_dir

(you need latest version of meteor kitchen)

Example input files

Example 1 - CRUD

I want site with three pages: home, customers and about.
In home page I want jumbotron with title: "This application is written in English language!", text: "Human to describe app, machine to write code!", button url: "customers".
Please create one collection: customers.
In customers collection I want three fields: name, address and e-mail.
In customers page I want CRUD for customers collection.
In about page I want text: "This application is written in English language using Meteor Kitchen, source code generator for Meteor".

Live application is here.

Example 2 - IoT

I want site with one page.
Create one collection: sensors.
In sensors collection I want fields: topic and message.
Connect sensors collection to mosquitto server: "test.mosquitto.org" and subscribe to topic: revspace/sensors/#.
In home page I want table showing sensors collection.

Live application is here.

Syntax

  1. It's important to finish each sentence with a dot. Newlines are not important and are ignored by parser.
  2. To define a list you can say 4 pages or four pages. After type name you can list element names after colon and separate items with comma: three fields: name, address and e-mail. If element names are not listed, they will be automatically named as type + item_index ("field0", "field1", "field2"). Exception is page names: "page0" will be named "home" and other pages: "page1", "page2"...
  3. To add component or text into page, say in page_name page (word between in and page is interpreted as page name). If you make a typo and page name is unknown - complete sentence is ignored.
  4. To define collection fields say in collection_name collection (word between in and collection is interpreted as collection name). If you make a typo and collection name is unknown - complete sentence is ignored.
  5. In examples above, most of words are added to make text readable to human and are ignored by parser:

Example 1 with important words only:

Three pages: home, customers and about.
In home page jumbotron title: "This application is written in human language!",  text: "Human to describe app, machine to write code!", button url: "customers".
One collection: customers.
In customers collection three fields: name, address and e-mail.
In customers page CRUD for customers collection.
In about page text: "This application is written in human language using Meteor Kitchen, code generator for Meteor".

Example 2 with important words only:

One page.
One collection: sensors.
In sensors collection fields: topic and message.
Connect sensors collection mosquitto server: "test.mosquitto.org", topic: revspace/sensors/#.
In home page table showing sensors collection.

(to be continued)

human2machine's People

Contributors

perak avatar

Watchers

James Cloos avatar  avatar

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.