Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veerendra2/funmotd
TV Shows, Movies Quotes MOTD for Bash :sunglasses:
https://github.com/veerendra2/funmotd
bash bashrc motd motd-message movie-quote pip3 pypi python3 setuptools tv-shows-quote
Last synced: about 1 month ago
JSON representation
TV Shows, Movies Quotes MOTD for Bash :sunglasses:
- Host: GitHub
- URL: https://github.com/veerendra2/funmotd
- Owner: veerendra2
- License: apache-2.0
- Created: 2019-05-29T13:33:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-28T10:59:26.000Z (about 3 years ago)
- Last Synced: 2024-08-08T23:12:56.914Z (3 months ago)
- Topics: bash, bashrc, motd, motd-message, movie-quote, pip3, pypi, python3, setuptools, tv-shows-quote
- Language: Python
- Homepage: https://veerendra2.github.io/funmotd/
- Size: 1.84 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![GitHub](https://img.shields.io/github/license/veerendra2/funmotd.svg)
![GitHub stars](https://img.shields.io/github/stars/veerendra2/funmotd.svg)
![PyPI - Status](https://img.shields.io/pypi/status/funmotd.svg)
![PyPI](https://img.shields.io/pypi/v/funmotd)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/funmotd.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/funmotd)
[![Release](https://github.com/veerendra2/funmotd/actions/workflows/releases.yml/badge.svg)](https://github.com/veerendra2/funmotd/actions/workflows/releases.yml)
# Funny motd (funmotd)
A cool tool to display random quotes from Movies and TV Shows as [`motd`](https://en.wikipedia.org/wiki/Motd_(Unix)) on Terminal when you open.![Example](https://user-images.githubusercontent.com/8393701/139233945-d44c1465-97fd-45ed-89f3-84ce19bcfeff.gif)
## Installation
```
$ pip3 install funmotd
```## How it works?
The [`__init__.py`](https://github.com/veerendra2/funmotd/blob/master/funmotd/__init__.py) first picks a random `TV Shows/Movies` with [`weights`](https://docs.python.org/3/library/random.html#random.choices) and again picks a quote randomly from selected `TV Show/Moves`. You can see available of quotes in [`quotes_db.py`](https://github.com/veerendra2/funmotd/blob/master/funmotd/quotes_db.py)When you install package, the CLI will add entry in `.bashrc`, it will execute whenever `bash` is loaded
## Usage
```
$ funmotd --help
usage: funmotd [-h] [-l] [-e MODIFY MODIFY] [-n NSFW] [-v]Displays TV Show and Movie Quotes as 'motd' on Terminal
optional arguments:
-h, --help show this help message and exit
-l View Available TV Show/Movies & Configuration
-e MODIFY MODIFY Modify Weights
-n NSFW Enable/Disable NSFW Quotes
-v show program's version number and exit
```## How to Configure?
#### List Available TV Show/Movies
```
$ funmotd -l
** Configuration **
+------------------------+-------------+
| TV Shows/Movies Quotes | Weights |
+------------------------+-------------+
| breaking_bad | 60 |
| friends | 10 |
| game_of_thrones | 100 |
| jokes | 0 |
| movies | 10 |
+------------------------+-------------+
| NSFW | True |
+------------------------+-------------+
```
#### Modify Weights
You can modify weights to see which `TV Shows/Movies` mostly
```
$ funmotd -e game_of_thrones 90
[*] Configuration Modified$ funmotd -l
** Configuration **
+------------------------+-------------+
| TV Shows/Movies Quotes | Weights |
+------------------------+-------------+
| breaking_bad | 60 |
| friends | 10 |
| game_of_thrones | 90 |
| jokes | 0 |
| movies | 10 |
+------------------------+-------------+
| NSFW | True |
+------------------------+-------------+
```
#### Enable/Disable `NSFW` Quotes
There are some quotes "NSFW", so this option helps to enable/disable.
```
$ funmotd -n no
[*] Configuration Modified
$ funmotd -l
** Configuration **
+------------------------+-------------+
| TV Shows/Movies Quotes | Weights |
+------------------------+-------------+
| breaking_bad | 60 |
| friends | 10 |
| game_of_thrones | 90 |
| jokes | 0 |
| movies | 10 |
+------------------------+-------------+
| NSFW | False |
+------------------------+-------------+
```
## Can I add any other quotes?
Yes, but not with CLI (may be in future versions). Right now, you have to edit `quotes_db.py` and run `funmotd -l` to update the configuration.The [`quotes_db.py`](https://github.com/veerendra2/funmotd/blob/master/funmotd/quotes_db.py) follow below dictionary structure.
```
all_quotes = {
'' : [
[ # NSFW Quote's list
{'quote': '', 'character': '', 'name': ''}
],
[ # NON-NSFW Quote's list
{'quote': '', 'character': '', 'name': ''}
]
]
}```
## Uninstall
```
$ pip3 uninstall funmotd
```
And remove CLI entry in `.bashrc`