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

gistify-markdown

v1.0.0

Published

Transform Markdown documents to replace code snippets with GitHub Gists.

Downloads

2

Readme

gistify-markdown

Easily transform your Markdown documents, replacing every code block with a Gist.

I've written it for my personal use case. I'm writing blogposts on Medium which does not support syntax highlighting for code snippets. Since I'm using [iA Writer] to do that, I have source files for my blogposts which are Markdown documents.

This script takes advantage of having my blogposts as Markdown files & is replacing every code block with a gist. That's why it's missing some features (like understanding every language code and its extension) and is written in a rather crude way.

Installation

npm install -g gistify-markdown

Or if you'd like to develop this project:

git clone https://github.com/Killavus/gistify-markdown.git
cd gistify-markdown
npm install
# You can work with this project. Modify `src/` files. 
# You can then use `npm run build` to build ES2015 files to proper JS files in `build/`.

I'm using Node 5.11.0 & npm 3.10.3 to work with this project. I don't know how does it work on other versions of node. Sorry!

Usage

gistify-markdown <input file> [GitHub token]

GitHub token is not necessary (it allows you to publish gists owned by your GitHub account).

To obtain the token, issue the following request using curl:

curl -u '<your-username>' -d '{ "scopes": ["gist"], "note": "For gistify-markdown utility", "note_url": "https://github.com/Killavus/gistify-markdown" }' https://api.github.com/authorizations

If you're using two-factor auth on GitHub, the command looks like:

curl -u '<your-username>' -d '{ "scopes": ["gist"], "note": "For gistify-markdown utility", "note_url": "https://github.com/Killavus/gistify-markdown" }' -H 'X-GitHub-OTP: <your-2fa-code>' https://api.github.com/authorizations

As the response you'll get the JSON. The "token" field is what interests you - store it somewhere.

Contributing

You can use GitHub issues or make a pull request if you want to contribute to this project. See here for details.

License

ISC.