GithubHelp home page GithubHelp logo

kingcobra2468 / passeri Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 57 KB

A RESTful microservice for downloading Youtube videos as MP3s and sending them to a recipient via email. Automatically fills cover, title, and other ID3 metadata of compliant MP3s via Shazam integration.

Python 96.07% Dockerfile 3.93%

passeri's Introduction

Passeri

A simple RESTful microservice that converts Youtube videos to MP3s. Automatically populates each MP3 with cover, title, and other metadata.

Gmail Integration

Due to recent changes with Gmail's API, it is no longer possible to use a Gmail account's email + password for email automation. However, once an app password is created, one can use the email + app password to automatically send emails. To do so, follow these steps:

  1. Navigate to https://myaccount.google.com/. Ensure that 2FA is enabled for the account(this step is critical).
  2. Then, click Security on the left.
  3. Scroll down to the "Signing in to Google" card.
  4. Click App passwords.
  5. Enter your password again.
  6. Select app (Mail) and device (whatever you want).
  7. Generate. Now, it is possible to automatically send emails with this account. Set this generated password to PASSERI_EMAIL_PASSWORD.

Config

By copying env.template into /src as .env (e.g. cp env.template src/.env), the following config options can then be set:

  • PASSERI_EMAIL_ADDRESS= the email address of the email account.
  • PASSERI_EMAIL_PASSWORD= the password of the email account.
  • PASSERI_DOWNLOAD_PATH= the directory where mp3s will be temporary stored during ID3 metadata entry.
  • PASSERI_PORT= the port address of Passeri.
  • PASSERI_FILE_CACHE_SIZE= the max file cache size.
  • PASSERI_MONGO_DB_HOST= the MongoDB host if logging is enabled.
  • PASSERI_MONGO_DB_PORT= the MongoDB port if logging is enabled.
  • PASSERI_REQUEST_LOGGING_ENABLED= whether logging is enabled (0 for disabled, and vise-versa).

Installation

To install and run Passeri, follow the following steps:

  1. Ensure that Python3.7+ is installed.
  2. Follow the Google Cloud project creation steps.
  3. Follow the configuration steps.
  4. Install dependencies with pip3 install -r requirements.txt.
  5. Navigate into src/ and run Passeri with python3 main.py.

Docker

  1. Build Passeri image with docker build -t passeri:1.0 . .
  2. Setup the .env file as described in the config section. Note that the paths for PASSERI_CRED_FILE_PATH and PASSERI_TOKEN_FILE_PATH will be relative to the filesystem instead of the docker image. As such, the paths should be relative to the expose volume /passeri/config.
  3. Launch Passeri. An example execution, assuming PASSERI_PORT is set to 8088, and the token and client secret current directory, would be:
docker run --env-file .env -p 8088:8088 -v $PWD:/passeri/config  passeri:1.0

passeri's People

Contributors

kingcobra2468 avatar dependabot[bot] avatar

Stargazers

Misha Lubich avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.