Skip to main content

Show YouTube subscribers and Crypto-currency tracking on an iDotMatrix 32x32 pixels screen

Project description

iDotMatrix YouTube Subscriber Counter

This project uses Python to display the number of subscribers of a YouTube channel on a 32px by 32px iDotMatrix-style pixel art screen.

Dependencies:

  • Python 3.x
  • asyncio
  • aiohttp
  • PIL (Pillow) 10.x
  • idotmatrix 0.0.4
  • PyDantic 1.10.x

Installation:

  1. Clone the repository:
git clone https://github.com/nesitor/subscribers-viewer.git

  1. Create the venv:
python3 virtualenv venv
source ./venv/bin/activate

  1. Install the dependencies:
pip install -e .

  1. Get your Youtube API KEY: Request an API KEY going here https://console.cloud.google.com/apis/api/youtube.googleapis.com/credentials

  2. Set env variables:

export SUBS_YOUTUBE_CHANNEL_ID=YOUR_YOUTUBE_CHANNEL_ID
export SUBS_YOUTUBE_API_KEY=YOUR_YOUTUBE_API_KEY

Usage:

  1. Scan for compatible devices:
python3 src/app.py --scan

  1. Run the client:
python3 src/app.py --address <device_mac_address>/auto

Where <device_mac_address> is the device physical address or auto is to autodiscover devices and use the first one found.

Example:

python3 src/app.py --address 37:D4:98:8F:2B:C8

Code Explanation:

  • The script uses the aiohttp library to get the YouTube channel information.
  • The channel information is parsed into a dictionary.
  • The subscriber count is extracted from the dictionary.
  • The subscriber count is converted to a pixel readable string.
  • The string is converted to a character array.
  • The character array is used to create a pixel art image.
  • The pixel art image is displayed on the screen.

Technical Details:

  • The iDotMatrix display is simulated using the PIL (Pillow) library.
  • The total screen size is 32px by 32px pixels.
  • The pixels are colored always white for the characters.
  • The pixel art image is scaled to fit the screen.

License:

This project is licensed under the MIT license.

Contributions:

Contributions to this project are welcome. Create an issue or pull request on GitHub to get started.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pixelart_tracker-0.1.1.tar.gz (24.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixelart_tracker-0.1.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pixelart_tracker-0.1.1.tar.gz.

File metadata

  • Download URL: pixelart_tracker-0.1.1.tar.gz
  • Upload date:
  • Size: 24.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for pixelart_tracker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5260496ed3fb75d6043b906e3eea146c5262f789a8d2bf7176679f5bc02b92f8
MD5 c5192312cbd88701170ab84ab8bf1093
BLAKE2b-256 e945317451d165a5d0db727b0afd9d2ecd63adba7e499b007f9242b4e5238028

See more details on using hashes here.

File details

Details for the file pixelart_tracker-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pixelart_tracker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f68771f94a22fc5dad81007ca9e04b36c6d7aa1dedcb4276ce155061a637d4d1
MD5 a8bc45276c99cb5ec880e62f36c56f6a
BLAKE2b-256 09ab30329bce91e4c5ae3b34da4579499552f90d097beaa88abdea8fe52d200d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page