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

rawdl

v1.1.13

Published

A script that automates seasonal anime downloads sourced from SubsPlease

Downloads

8

Readme

RawDL💮

This package allows for easy scheduled seasonal anime download and subsequent upload.

Installation

Use npm to install the package.

npm i rawdl

Usage (NodeJS)

See /examples/js for more use cases.

The following instructions help you set up a directory with shows.json file and JS Script to download and upload new episodes.

  1. Create a valid shows.json file. eg: (examples/js/shows.json)
{
  "list": [
    {
      "name": "Horimiya",
      "nextEp": 4,
      "day": 0
    }
  ]
}
  1. Create a JS or TS script to run the package AutoPilot. eg: (examples/js/index.ts)
//Typescript
import { rawdl } from 'rawdl';

var dirname = __dirname;
const api_keys = {
    username: '<<your api username here>>',
    password: '<<your api key here>>',
    folder: '<<your api folder id here>>'
};

async function auto() {
    //Params (shows.json, SubsPlease RSS Feed, Streamtape API Keys, Output Folder);
    let ap = new rawdl.AutoPilot(dirname + '/shows.json', 'https://subsplease.org/rss/?t&r=1080', api_keys, dirname+'/downloads');
    await ap.full(); //Or use ap.downloadOnly() to only download and no upload.
}

auto();
  1. Run the script with node index.js or schedule to run the script each day around the time when new episodes are released (6am JST is Optimal) with cron or your preffered task scheduler.

Usage (Docker)

Check out /examples/docker for details.

Work to create the Docker Image is already done (see examples/docker/Dockerfile). These instructions help you to set up a directory and docker-compose.yml file to pull the image from the internet and run.

  1. Create a new directory. Create a "data" folder within this new directory.

  2. Within the data folder, create a valid shows.json file eg: (examples/docker/data/shows.json)

{
  "list": [
    {
      "name": "Horimiya",
      "nextEp": 4,
      "day": 0
    }
  ]
}
  1. Back in the new directory, create a docker-compose.yml file eg: (examples/docker/docker-compose.yml)
version: "3"

services:
  anime: 
    image: nlanson/rawdl:fd
    # There are other images for different run modes. 
    # nlanson/rawdl:fd for Full download and upload as well as file deletion upon completion.
    # nlanson/rawdl:f for Full download and upload and keeping files.
    # nlanson/rawdl:do for Download only and no upload.
    environment:
    #If you are using the Download Only Image (nlanson/rawdl:do), no environment variables are necessary.
      API_USERNAME: '<your streamtape api username>'
      API_PASSWORD: '<your streamtape api password>'
      API_FOLDER: '<your streamtape folder id>'
    volumes:
      - "./data:/data"
    container_name: rawdl
    tty: true
    stdin_open: true
  1. Use command docker-compose up -d -it from within the new directory and the rawdl container should start. Access the container using docker attach rawdl. Now the container should read the shows.json file from the mounted ./data/shows.json and download then upload new episodes it has found.

  2. Schedule the container to run daily (6am JST is best) with crontab.

Upcoming

  • Utility feature to aide creating shows.json
  • Utility to aide setup of the script environment.