Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/acombes/node-putio

Poll ZIP archives from put.io & unzip them
https://github.com/acombes/node-putio

Last synced: about 2 months ago
JSON representation

Poll ZIP archives from put.io & unzip them

Awesome Lists containing this project

README

        

# Node put.io

Provides scripts to poll & unzip ZIP archives of available files on your [put.io](https://put.io) account.
It relies on the official pui.io package [`@putdotio/api-client`](https://www.npmjs.com/package/@putdotio/api-client) for the communication with the [pui.io API](https://api.put.io/v2/docs).

## Installation
Install NPM dependencies:
```bash
npm ci
```

Create `.env` file at the project root. It should contain the following variables:
```dotenv
CLIENT_ID=
CLIENT_SECRET=

ZIP_DESTINATION=
UNZIP_DESTINATION=
```

The Client ID & Client Secret can be found here https://app.put.io/oauth after you've created an App.

## Documentation
The following NPM scripts are available:
* `get-zips`: fetch all the ZIP archives of all files available at the root of your put.io account.
* `get-unzip`: fetches all the ZIP archives then unzips them.
* `get-unzip:cleanup`: fetches all the ZIP archives, unzips them, then deletes the ZIP sources.
* `unzip`: unzips all the ZIP archives that are present in the provided `ZIP_DESTINATION` path.
* `unzip:cleanup`: unzips all the ZIP archives that are present in the provided `ZIP_DESTINATION` path then deletes the source archives.