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

re-write

v1.0.1

Published

Rewrite files and directories into a single file and vice-versa

Downloads

17

Readme

re-write

npm version npm downloads License
Build Status Code Climate js-myterminal-style Coverage Status
NPM

Rewrite files and directories into a single file and vice-versa

Note: Breaking changes in version 1

What is it?

re-write is a command-line utility that can be used to 're-write' multiple files (and/or directories) into a single file, optionally with password protection.

Background

Back in late 2009, I wrote an encryption algorithm capable of obfuscating a single file and I used it to transfer data past an intelligent security system designed specifically to intercept the transfer of computer code. The data belonged to me and I believed that I shouldn't be stopped from carrying it with me. The utility was written in VB.Net as a class library and was a small dependency of a far larger windows application.

In early 2010, I continued working on it to improve its efficiency and later I could enable it to work on multiple inputs, which could even be a combination of files and directories.

're-write' is inspired by that old algorithm and has been re-written in JavaScript, which almost forms the reason for its name. The purpose of this 're-write' is to make sure that the old code doesn't die and also that I could share it with the open-source community.

Installation

re-write is available on Npm. You can install it globally with a simple command.

npm install -g re-write

How to Use

're-write' just has two commands. The inputs you provide and how they are interpreted depend upon the command you use.

How to 're-write' Files

To 're-write' data into a single file, use the following command:

re-write-do <source1> [source2] [source3] ... <target>
  • source1, source2, source3, etc. could be one or more files or directories. At least one is required.
  • target should be an output file or a directory where the 're-written' file should be placed.

You can optionally use a password when asked for. When not provided, encryption is skipped entirely.

How to un-'re-write' files

To un-'re-write' data from a 're-written' file to the earlier form, use the following command:

re-write-undo <source> [target]
  • source needs to be a file that was earlier created by 're-write'.
  • target can to be a directory in which the recovered data needs to be extracted. When not supplied, it defaults to the current directory.

If you used a password while 're-writing', you'll be asked for one before you can un-'re-write'.