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 🙏

© 2025 – Pkg Stats / Ryan Hefner

specpress

v2.0.0

Published

Export PDF and/or DOCX files from a subset of Markdown, ASN.1 and JSON files

Readme

SpecPress

  • WYSIWYG (what you see is what you get) - like experience while editing specifications.
  • UML séquence diagrammes generation from text files.
  • PDF | DOCX | HTML export from a set of Markdown, ASN.1 and JSON files.

System Requirements

SpecPress requires the following software to be installed on your system:

Additionally, if you eould like to use pandoc to convert mardown files into pdf or docx documents you need to install also:

Getting started

Initialize your project

Create a folder in which, later on, you will clone your specifications git repositories, move into the folder and initialize npm by running the following commands in the terminal:

# create a new folder called for example "mySpecifications"
mkdir mySpecifications

# move into the folder
cd mySpecifications

# initialize npm
npm init

Install SpecPress

Install specpress as a development dependency of your project and initialize it with the following commands:

# install specpress
npm install specpress  --save-dev
# initialize specpress
npx sp_init

/mySpecifications/src folder

As part of its initialization, sprecpress created the src folder in the projec’s root folder mySpecifications. Use the src folder to store all your specifications git repositorues. For example, you can clone the git repository of your specification under the src folder.

# move into the src folder
cd src

# clone the git repository of your specification
# /mySpecifications/src
git clone ssh://[email protected]:29419/fs_6gspecs_new/38423.git

If you want, you can rename the src folder to whatever name you like. Should you do so, you should also update the value of the sourceFolderName parameter in the sp.config.json file accordantly, e.g., ”sourceFolderName”: “yourPreferedName”.

/mySpecifications/sp.config.json file

The initialization process also publishes a configuration files sp.config.json in the root folder /mySpecifications/sp.config.json.

#./sp.config.json
{
	"pathFiguresFolder": "/assets/figures",
	"sourceFolderName": "src"
}

Along with the "sourceFolderName": "src" parameter, this file contains the ”pathFiguresFolder": "/assets/figures" parameter which indicates in which subfolder of your specification, specpress will save the .png files it generates for the UML sequence diagrams. The default value is /assets/figures so if you are working with the 38423 specification, the files will be saved in the /mySpecifications/src/38423/assets/figures folder. `

Usage

Move now into your working directory which can be the /src/38423 folder or a subfolder of /src/38423. In the working folder you can use the following specpress commands in the terminal:

WYSIWYG - like experience while working on your specifications

Specpress enables you to have a “what you see is what you get” - like experience when editing your specifications by displaying the specification as a webpage. For doing so, run the npx sp_start command in the terminal and specpress will convert and concatenate the specification files from your working directory into a single hrml file which is published on a local http server. The resulting web page can be displayed in any browser that points at the http://localhost::8080 address.

npx sp_start

The sp_strat command is equivalent to running in parallel the sp_pubish, sp_watch and sp_serve commands described below.

Display the specification as a web page

Execute the following commands to display your specification as a webpage on your local http server:

#create the /mySpecifications/public/index.html file
npx sp_publish

# start the http server from the /mySpecifications/public folder
# the server is accessible at http://lcalhost:8080
npx sp_serve

Watch for changes in your source files

npx sp_watch

The sp_watch command will:

  • watch for changes in your specification’s source files [".asn", ".json", ".md"] and update the index.html file according to your changes,
  • watch for changes in your UML sequence diagrams source files [".puml", ".txt"] and generate the corresponding PNG files in the /mySpecifications/src/38423/assets/figures folder

Generate UML diagrams from text files using PlantUML

Specpress enables you to automatically generate .png files containing UML diagrams using as an input a text file containing a textual description of the UML diagram as presented in the example below:


#/mySpecifications/src/38423/example.txt
@startuml
Alice -> Bob: Authentication Request
Boby --> Alice: Authentication Response
@enduml

The .png files are saved in the specification's subfolder indicated in the sp.config.json files.


# generale .png files for all the .txt files in the working folder
npx sp_generateUML

# generale .png file for a specific .txt file in the working folder
npx sp_generateUML-file ./example.txt

Export a .docx|.html|.pdf file

Specpress enables you to export a file which contains all the specification files from the working folder. The exported file will be saved in the /mySpecifications/export folder.

# export a pdf file
npx sp_export pdf

# export a docx file
npx sp_export docx

# export a html file
npx sp_export html

# export a pdf file using pandoc
npx sp_export pdf pandoc

# export a docx file using pandoc
npx sp_export docx pandoc

# export a html file using pandoc
npx sp_export html pandoc

Repository

https://github.com/Ericsson/specpres