Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/acombes/node-putio
- Owner: Acombes
- Created: 2024-06-20T11:20:34.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-20T11:51:41.000Z (6 months ago)
- Last Synced: 2024-06-21T03:02:32.940Z (6 months ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.