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

ironoutline

v1.5.1

Published

[![NPM version](https://img.shields.io/npm/v/ironoutline.svg?style=flat)](https://www.npmjs.com/package/ironoutline)

Downloads

28

Readme

NPM version

Generates an .json file for md2oedx from a CSV and reciprocally.

JSON/YAML <-> CSV

bin

Usage

See:

$ npx ironoutline --help

which will outputs man.txt file.

csv2json command

From a CSV spreadsheet:

$ npx ironoutline csv2json pt "https://docs.google.com/spreadsheets/d/e/2PACX-1vSPb9g-3UgLBIrjBekCEppZ7k733mCQehR9S3OZBxafwQEuXsxkAzC4VkSzOStT6b0Dc851CyLUOc2i/pub?gid=0&single=true&output=csv"

Or from a local file:

$ npx ironoutline csv2json pt -- ~/Downloads/outline.csv

NB: The json file is directly printed to stdout: to save it to disk, remember to redirect the stdout > myoutline.json.

json2csv command

$ npx ironoutline json2csv --openlink=vscode://file//Users/abernier/ironhack/ironhack-web/lessons/modules-1-2-3/%s -- wdpt202102par.json

JS api

csv2json

const {readFileSync} = require('fs')
const {csv2json} = require('ironoutline')

// file content
const csv = readFileSync('path/to/outline.csv', {encoding: 'utf-8'})

const json = csv2json('pt', csv, {
    tzid: 'Europe/Paris',
    start: '2020-06-02',
    hollidays: ['2020-06-20','2020-07-04','2020-07-14','2020-08-11','2020-08-13','2020-08-15','2020-08-18','2020-08-20','2020-08-22','2020-09-19','2020-10-17','2020-11-10','2020-11-21']
})
console.log(json)

Defaults options:

|Name|Value| |----|-----| |tzid|'Europe/Paris'| |start|undefined| |hollidays|[]|

json2csv

const {readFileSync} = require('fs')
const {json2csv} = require('ironoutline')

// file content
const json = readFileSync('path/to/outline.json', {encoding: 'utf-8'})

const csv = json2csv(json, {
    openlink: 'vscode://file//Users/abernier/ironhack/ironhack-web/lessons/modules-1-2-3/%s'
})
console.log(csv)

Defaults options:

|Name|Value| |----|-----| |openlink|undefined|

JSON structure

JSON structure is as followed:

{
    "course": {
        "name": "WDPT",
        "number": "MASTER",
        "version": "5.0",
        "chapter": [
            {
                "name": "Week 1",
                "sequential": [
                    {
                        "name": "Day 1",
                        "vertical": [
                            {
                                "name": "Foo",
                                "component": [
                                    {
                                        "type": "html",
                                        "file": "foo.md"
                                    },
                                    {
                                        "type": "deliverable",
                                        "display_name": "Homework",
                                        "deliverable_identifier": "assign1",
                                        "deliverable_description": "Your first homework is to do 100 pushups.",
                                        "deliverable_duedate": "2030-10-28"
                                    }
                                ]
                            },
                            ...
                    },
                    ...
                ]
            }
        ]
    }
}

as defined per md2oedx JSON file structure

CSV structure

CSV structure is as followed:

|name|active|seq|vert|seq_index|vert_index|tag|file|openlink|deliverable_display_name|deliverable_identifier|deliverable_description|deliverable_duedate| |----|------|---|----|---------|----------|---|----|--------|------------------------|----------------------|-----------------------|-------------------| | | | | | | | | | | | | | | |

Clasp

Pre-requisite: $ npx clasp login

To update google script, edit gscript/* source code then:

$ sh -c "cd gscript && npx clasp push"