Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/khrj/hcload

Upload files to Hackclub's CDN using your CLI
https://github.com/khrj/hcload

cdn cli deno files hackclub mirror storage upload

Last synced: about 2 months ago
JSON representation

Upload files to Hackclub's CDN using your CLI

Awesome Lists containing this project

README

        


Hand with phone showing paper plane which is being tapped; Paper plane flying away out of phone

hcload



Upload files to the Hack club CDN via Deno and your CLI



build status
language
code size
issues
license
version



View on deno.land








Table of contents:

- [Module](#API)
- [CLI](#CLI)
- [Supporters](#Supporters)

# API

hcload offers a convenient deno API

```ts
import hcload from "https://deno.land/x/[email protected]/mod.ts"
const urls: string[] = await hcload({
files: fullPaths,
urls: YourUrls,
})
```

Where

- fullPaths is an array of complete filesystem paths to files
- urls is an array of urls

Only one parameter is nessecary

# CLI

Make sure you have [deno](https://deno.land/)

## Installation

```bash
deno install -A https://deno.land/x/hcload/hcload.ts
```

then run (see [usage](#Usage))

```bash
hcload -f filename.mp3
```

## Permissions

Needs the following

- --allow-env
- --allow-net
- --allow-read=~/.ngrok-deno
- --allow-write=~/.ngrok-deno
- --allow-run

Or just

- -A

## Usage

```
Usage: hcload -f [files...] -u [urls...]

Options:
--help Show help [boolean]
--version Show version number [boolean]
-f, --files Path to file(s) to upload [array]
-u, --urls URL(s) to host on CDN [array]
-s, --silent Do not print "Working..." [boolean]

Examples:
hcload -f myPic.png Upload one file
hcload -f myPic.png vid.mp4 song.mp3 Upload multiple files
hcload -u https://b.me/foo.mp3 Upload from one URL
hcload -u https://a.me/foo.mp3 https://a.me/foo.jpg Upload from multiple URLs
hcload -u https://a.me/foo.mp3 -f myPic.png myMusic.mp3 Upload from file[s] and URL[s]
```

## Supporters

[![Stargazers repo roster for @khrj/hcload](https://reporoster.com/stars/khrj/hcload)](https://github.com/khrj/hcload/stargazers)

[![Forkers repo roster for @khrj/hcload](https://reporoster.com/forks/khrj/hcload)](https://github.com/khrj/hcload/network/members)

## Related

- [Deno modules](https://github.com/khrj/deno-modules)