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

rpscript

v0.3.1

Published

RP Script

Downloads

35

Readme

RPSCRIPT

npm version

RPScript provides a framework that simplifies automation. The syntax is designed to be intuitive and straightforward, allowing you to write scripts without the need for in-depth programming knowledge.

In short, it allows you to replace this:

var R = require('ramda');

console.log( R.repeat("Hello world",3) );

with this:

log repeat "Hello world" 3

This:

var download = require('download');
var csvParse = require('csv-parse/lib/sync');
var AdmZip = require('adm-zip');
var R = require('ramda');
var fs = require('fs');

download('https://data.gov.sg/dataset/dba9594b-fb5c-41c5-bb7c-92860ee31aeb/download', '.').then(() => {
    var zip = new AdmZip("./download.zip");
    
    zip.extractAllTo("./temp/");

    var content = fs.readFileSync('temp/data-gov-sg-dataset-listing.csv');
    
    var orgs = csvParse(content , {columns:true});

    var orgList = R.uniq(R.pluck('organisation',orgs));

    console.log(orgList); //print out the list of organisations
});

with this:

download "https://data.gov.sg/dataset/dba9594b-fb5c-41c5-bb7c-92860ee31aeb/download"

extract "download.zip" "./temp/"

csv-to-data --columns=true read-file "temp/data-gov-sg-dataset-listing.csv" | as "dataset"

log uniq pluck 'organisation' $dataset

Installation

Prerequisite: NodeJS

npm i -g rpscript

This will install a global command line in your machine.

Module installation.

rps install basic

Create a file "helloworld.rps" and add this line:

log repeat "hello world " 3

Go to the terminal, and run the command:

rps helloworld.rps

Getting Started

Getting started guide is available at Getting Started.

Usage

Usage guide is available at Usage

Usage

Hello world

Ascii Art with Figlet

Compression

Table generation from CSV file

Data Analysis from CSV file

Modules

Name | Status | Description | Doc --- | --- | --- | --- Basic | npm version | Basic operation and data manipulation. | Here Beeper | npm version | Make terminal beeps. | Here CSV | npm version | CSV utility. | Here Date | npm version | Date utility. | Here Downloading | npm version | File Download. | Here Figlet | npm version | Ascii Art. | Here File | npm version | File system. | Here Hogan | npm version | Moustache Templating. | Here Notifier | npm version | Desktop Notification. | Here Open | npm version | Open a file or url in the user's preferred application. | Here Zip | npm version | File compression and extraction. | Here Request | npm version | Http call. | Here Cheerio | npm version | jQuery style traversal and manipulation. | Here _ | _| More coming soon | _

FAQ

What is RPScript?

RPScript is a scripting language for process automation.

Why do I need RPScript if I can use Python, Javascript for automation?

Unlike general purpose languages such as Python and Javascript, RPScript has only one specific goal, process automation.

General purpose languages are powerful and flexible. However, it tends to compensate by having complicated syntax and language features. In the end, you have to deal with boilerplates and unnecessary steps, making it hard to perform even a simple task.

RPScript goal is to make the syntax compact. Ideally, every action models as close to a single process as possible.

Is it stable?

It is currently in Alpha; I will appreciate if you can give it a try and provide your valuable feedback.

Is rpscript a node.js library?

RPScript is a transpiler that transpiles to javascript. It runs on top of Node.JS.

Most, if not, all the modules are wrappers that utilize what that the npm ecosystem already provided.

Creator

James Chong (@wei3hua2) Github Twitter Email

Changelog

0.3.1 - Fixes: #1 #2

0.3.0 - Initial alpha release

Copyright and Licence

Code released under Apache 2.0

Image created by Freepik