Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/khrj/hcload
- Owner: khrj
- License: mit
- Created: 2020-10-19T18:49:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-09T19:04:28.000Z (about 3 years ago)
- Last Synced: 2024-12-15T09:40:52.990Z (2 months ago)
- Topics: cdn, cli, deno, files, hackclub, mirror, storage, upload
- Language: TypeScript
- Homepage:
- Size: 103 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hackclub - hcload - [@khrj](https://github.com/khrj) - **(JavaScript)** _Upload files to Hackclub's CDN using your CLI_ (CLI Tools)
README
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 urlsOnly 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-runOr 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)