Code Monkey home page Code Monkey logo

proverb-pro's Introduction

The Proverb Pro

Welcome to the precious playful Proverb Pro, a program that generates completely useless German proverbs using Sprichwortgenerator and throws it together with an inspirational picture in the background.

Setup

Run pip3 install -r requirements.txt and you should be up and running, not only for the Proverb Pro, but also for the Proverb Bot.

Usage

usage: proverb_pro.py [-h] [-i [IMAGE]] [-t [TEXT]]
                      [-c [{average,frequency,blackwhite}]]

Generate hilarious proverbs on top of inspiring pictures

optional arguments:
  -h, --help            show this help message and exit
  -i [IMAGE], --image [IMAGE]
                        image file path
  -t [TEXT], --text [TEXT]
                        text to add
  -c [{average,frequency,blackwhite}], --colours [{average,frequency,blackwhite}]
                        select the colour recognition mechanism

If any of -i and -t are not provided, they are going to be randomly chosen: The image is taken from the img/ directory within this repo and the text comes from Sprichwortgenerator.

If -c is not used, blackwhite will be chosen. average colours the text based on the average colour of the image, frequency uses the most frequent colour and blackwhite uses the average colour and then either uses black or white as the text colour.

When proverb_pro.py is run, it outputs the path of the generated image file. NOTE: By default it outputs to a folder called out/ which isn't present in this repo because stupid git can't handle empty directories.

Setup

For using the Proverb Bot, you need a Telegram bot token for Proverb Bot to use. You can obtain them by sending /newbot to the "BotFather".

Once you have the token, save it into a file called proverb_bot.token.

Usage

The bot program is an endlessly looping program, so you just run ./proverb_bot.py either with nohup or in a terminal session you don't need, lay back and enjoy the weird proverbs. NOTE: Some of the pictures are quite large, so generating and sending may take a while, especially on older (or cheaper) hardware.

proverb-pro's People

Contributors

kmein avatar

Watchers

 avatar  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.