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

channel-logos

v0.1.1

Published

Preprocess TMDB TV channel logo images. Pulls the latest TV channel export from TMDB, process all images to be square of a set size, with a set background color and logo color.

Downloads

5

Readme

Channel Logos

API Usage

An API for square channel logos, different variations.

JSON with all channels

Includes channel name (lowercase) and logo filename

https://jaruba.github.io/channel-logos/logo_paths.json

Example of JSON entries:

{ 
	"fuji tv":"/yS5UJjsSdZXML0YikWTYYHLPKhQ.png",
	"abc":"/an88sKsFz0KX5CQngAM95WkncX4.png",
	...
}

Channel logo variations

Currently supported logo variations (background HEX color, logo type: white / color):

  • transparent-color
  • transparent-white
  • fff-color
  • 05a9f4-color
  • 05a9f4-white
  • 212c39-white
  • 282c34-white

Channel logo URL

https://jaruba.github.io/channel-logos/export/transparent-color/tuomPhY2UtuPTqqFnKMVHvSb724.png

If you need a new background color + logo type variation, create a pull request for the web branch or an issue for it.

Building Locally

Building steps:

  • fetch the latest TV channel export from TMDB and save it to a ./logo_paths.json

  • download original TMDB channel logos locally (optional)

  • process all logos of the channels in the db export to make them square of a set size, with a set background color and logo color

Prerequisites

Install

git clone http://github.com/jaruba/channel-logos
cd channel-logos
npm install

Alternatively, if you want to download all current variations of the logos, you can use: npm install jaruba/channel-logos#web

Pull TMDB TV Channel Export

This step is optional and requires a TMDB API key. If you do not pull the channel data export, then the last export that was committed to this repository will be used.

npm run pull tmdb-api-key
  • tmdb-api-key: required, your TMDB API Key

This action will result in the ./logo_paths.json file being created from the newest DB export.

Download Original Logos Locally

This step is optional, if you download the original channel logos locally, then it will process images much faster if you need to create many different variations of the logos.

npm run download-all

Process Images

npm start logo-preference background-color box-size margin
  • logo-preference: optional, default is "color", can be: "color", "white"

  • background-color: optional, default is "transparent", can be either "transparent" or a HEX color code (example: "000", "fff", "05a9f4", etc.)

  • box-size: optional, default is "200", the size of the result image (which is square) in pixels

  • margin: optional, default is "20", the size of the padding for the logo in pixels

This action will create a new folder in ./export named based on the logo-preference and background-color choices with the processed images.