npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

human2machine

v1.1.7

Published

Translates app description written in English language to meteor-kitchen input .json

Downloads

22

Readme

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)