Giter Site home page Giter Site logo

jwolff52 / discordoragi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nihilate/roboragi

2.0 5.0 2.0 2.89 MB

Discordoragi is a Discord bot which creates anime and manga links from MAL, Hummingbird, Anilist, MangaUpdates and Anime-Planet when requested based on Roboragi.

License: GNU General Public License v2.0

Python 98.52% Batchfile 0.72% Shell 0.76%

discordoragi's Introduction

This project has been taken over by dashwav, they have significantly improved on what I carried over from Roboragi.

Discordoragi

Discordoragi is a Discord bot based on Roboragi which creates anime and manga links from MAL, Hummingbird, Anilist, MangaUpdates and Anime-Planet when requested.

Installation

Discordoragi is written in Python for use with Python 3.5+ It is not possible to use anything less as the Discord API is phasing out support for it. There's a requirements.txt if you want to test it out yourself, but you'll need to create a Config.py with your own information and set up a PostgreSQL database.

###Step 1: I recommend you install PyEnv if you are running linux, otherwise you can skip to step 3

[sudo] apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev
[sudo] pip install virtualenvwrapper

git clone https://github.com/yyuu/pyenv.git ~/.pyenv
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'pyenv virtualenvwrapper' >> ~/.bashrc

You will need to close out of the terminal (or start a new SSH session) to finish instalation ###Step 2: Next we will install Python 3.5.2 using PyEnv

pyenv install 3.5.2

NOTE: This installs Python 3.5.2 in a virtual environment (venv) and it cannot be accessed from outside of the venv.

###Step 3: Next we are going to install all of our dependencies

####Ubuntu First we need to install some packages:
[sudo] apt-get install libffi-dev libxml2-dev libxslt-dev python3.5-dev libpq-dev -y

Now from the root directory of the repositoy run the following - Skip this if you are not using PyEnv:
pyvenv venv
source venv/bin/activate

We are now inside of our virtual environment with access to python 3.5.1.
Type the following to install all of our dependencies:
pip install -r requirements.txt

Test out our setup by running python roboragi/AnimeBot.py
If you see NameError: name 'MALAUTH' is not defined then your setup is working up to this point!

####Windows Run the following commands in a Command Prompt with Administrator Access
pip install http://jwolff52.github.io/Discordoragi/lxml-3.6.0-cp35-cp35m-win32.whl
pip install http://jwolff52.github.io/Discordoragi/pyquery-1.2.13-py2-none-any.whl
pip install http://jwolff52.github.io/Discordoragi/psycopg2-2.6.1-cp35-cp35m-win32.whl
pip install -r requirements.txt

Test out our setup by running python roboragi/AnimeBot.py from the root directory of the repository.
If you see NameError: name 'MALAUTH' is not defined then your setup is working up to this point!

###Step 4: Setting up your config
Copy the file Config.py.example to Config.py
Open Config.py up and enter the information that it asks for, visiting the given websites when required
You should be able to keep the Database Info the same if you are just testing, though you will want to change it if you are deploying.

###Step 5: Creating your PostgreSQL Database

//TODO:

How it works

Discordoragi uses discord.py (a Python library) to interface with Discord. It waits for messages from all of the servers it is allowed in and checks each of those for requests for the correct symbols - {}, {{}}, <> and <<>>. Once it's identified that it's being called, it takes the stuff between the braces and does a search for it in various anime/manga databases. Once it's got as much as it can find, the objects generated by the various databases are sent off to be formed into a reply. That then gets sent back to the channel it came from.

Current databases

  • MAL (Anime + Manga)
  • Hummingbird (Anime)
  • Anilist (Anime + Manga)
  • MangaUpdates (Manga)
  • Anime-Planet (Anime + Manga)

discordoragi's People

Contributors

jwolff52 avatar mnmt avatar nihilate avatar orende avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

cuttoothm dashwav

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.