All Projects → jackyang127 → jack_bunny

jackyang127 / jack_bunny

Licence: MIT license
Inspired by Facebook's bunnylol search engine.

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to jack bunny

FUTURE
A private, free, open-source search engine built on a P2P network
Stars: ✭ 19 (+0%)
Mutual labels:  search-engine, flask-application
Text Sherlock
Text (source code) search engine with indexer and a front end web interface to search. Uses Python 3.
Stars: ✭ 103 (+442.11%)
Mutual labels:  search-engine, flask-application
awesome-vector-search
Collections of vector search related libraries, service and research papers
Stars: ✭ 460 (+2321.05%)
Mutual labels:  search-engine
codecat
CodeCat is an open-source tool to help you find/track user input sinks and security bugs using static code analysis. These points follow regex rules. Beta version.
Stars: ✭ 265 (+1294.74%)
Mutual labels:  flask-application
x
Commerce Search & Discovery frontend web components
Stars: ✭ 54 (+184.21%)
Mutual labels:  search-engine
CodeDepot
A search engine for programming source code and documentation
Stars: ✭ 18 (-5.26%)
Mutual labels:  search-engine
legitbot
🤔 Is this Web request from a real search engine🕷 or from an impersonating agent 🕵️‍♀️?
Stars: ✭ 18 (-5.26%)
Mutual labels:  search-engine
solr-cool.github.io
The Solr Package Directory and Sanctuary
Stars: ✭ 13 (-31.58%)
Mutual labels:  search-engine
yang-db
YANGDB Open-source, Scalable, Non-native Graph database (Powered by Elasticsearch)
Stars: ✭ 92 (+384.21%)
Mutual labels:  search-engine
Python-flask-with-uwsgi-and-nginx
Python Flask with Nginx and uWSGI
Stars: ✭ 34 (+78.95%)
Mutual labels:  flask-application
Openbud
When an open source project starts, it is normally accompanied by a single person and only when that person does a lot of work and gets the project up and running, do other open source contributors come to contribute. This project is to help these early projects to find other interested contributors to help when the project is in its early stage…
Stars: ✭ 14 (-26.32%)
Mutual labels:  search-engine
sov2ex
sov2ex - 一个便捷的 v2ex 站内搜索引擎
Stars: ✭ 36 (+89.47%)
Mutual labels:  search-engine
Python-Studies
All studies about python
Stars: ✭ 56 (+194.74%)
Mutual labels:  flask-application
awesome-search-engine-optimization
A curated list of backlink, social signal opportunities, and link building strategies and tactics to help improve search engine results and ranking.
Stars: ✭ 82 (+331.58%)
Mutual labels:  search-engine
querqy-elasticsearch
Querqy for Elasticsearch
Stars: ✭ 37 (+94.74%)
Mutual labels:  search-engine
Nectus
A boilerplate Flask API for a Fullstack Project with some additional packages and configuration prebuilt. ⚙
Stars: ✭ 32 (+68.42%)
Mutual labels:  flask-application
gamesearch
A Simple Search Engine to help you find FREE Download Links to your Favourite Games
Stars: ✭ 30 (+57.89%)
Mutual labels:  search-engine
jochre
Java Optical CHaracter Recognition
Stars: ✭ 18 (-5.26%)
Mutual labels:  search-engine
todoist bot
@Todoist_bot for Telegram (UNofficial)
Stars: ✭ 35 (+84.21%)
Mutual labels:  flask-application
searchhub
Fusion demo app searching open-source project data from the Apache Software Foundation
Stars: ✭ 42 (+121.05%)
Mutual labels:  flask-application

jack_bunny

Inspired by Facebook's bunnylol search engine. The version that's currently open on github is pretty old and had some old dependencies so I thought it'd be easier to just write a more modern one. This one is still pretty basic and most likely has security holes that I'll run into later. Just wanted to get something off the ground and I'll add in more features time permitting.

Visit link to setup using this version that I'm hosting.

Commands

List of currently supported commands

  • g [insert query] searching google
  • p [insert class number] make a piazza search, kinda personalized just for jack lol
  • fb [insert query] searching on facebook. defaults on fb homepage
  • cpp [insert query] searches for syntactical cpp terms on cppreference.com
  • w [insert query] searches wikipedia, defaults on english wikipedia page
  • yt [insert query] make a youtube search. If not query is passed in, defaults to the youtube homepage
  • gm [insert number from 0-n where n = number of gmail accounts - 1] opens up gmail. If no argument specificed, opens up the first account. Can open up alternative accounts with arguments
  • help returns a list of usable commands

How to write your own commands

I think extending this is pretty intuitive for now. Just add in new methods to the Commands class. It might be a little confusing cause everything is happening in the jack_bunny.py file, I'll probably modularize this later when I have the time.

How to host your own server

I hosted this on an Amazon EC2 server, configured with nginx and gunicorn so I'll walk through the steps I went through.

The first step is to clone this repo on the server you want to run this on and download all the dependencies. These should all be in the requirements.txt file so something like pip3 install -r /path/to/requirements.txt should work. If you run into any issues, the only python libraries this really uses are flask and wikipedia so downloading those should resolve any problems.

There are additional packages you need to host this. The first is nginx. To install this, you can simply use sudo apt-get install nginx. We will also need to install gunicorn and to do this you can use pip3 install gunicorn.

The idea behind this is that we will use gunicorn to run this on the localhost on some unused port. We will then use nginx as a reverse proxy so that it will hand off the request it received to gunicorn and then gunicorn will serve that to nginx which will the be given to the user.

So how do we do this?

First we want to get gunicorn running. The command to run is gunicorn jack_bunny:app -p jack_bunny.pid -D. In this command, jack_bunny represents the file name without the .py and app represents the Flask app. We add the -D tag so that this will be running in the background, even when we close out. the -p jack_bunny.pid saves the process_id to this file so if you want to kill this process you can just kill -9 it.

Now we just have to setup nginx because this is still only running locally.

I first created this new config file at /etc/nginx/sites-available/jack_bunny

# /etc/nginx/sites-available/jack_bunny

# Redirect www.[insert server name].com to [insert server name].com
server {
        server_name www.[insert server name].com;
        rewrite ^ http://[insert server name].com/ permanent;
}

# Handle requests to [insert server name].com on port 80
server {
        listen 80;
        server_name [insert server name].com;

                # Handle all locations
        location / {
                        # Pass the request to Gunicorn
                proxy_pass http://127.0.0.1:8000;

                # Set some HTTP headers so that our app knows where the
                # request really came from
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

Then I created symlink here.

$ sudo ln -s \
/etc/nginx/sites-available/jack_bunny \
/etc/nginx/sites-enabled/jack_bunny

After restarting nginx you should be good to go!

If you run into some nginx configuration problems, check the error logs to see what could be going wrong. One thing that I ran into was my server name was too long and this gave me some server hash name error. I resolved this by adding the line server_names_hash_bucket_size 128; to my nginx config file here /etc/nginx/nginx.conf.

There are a bunch of ways to deploy a flask app on a server so oyou don't have to do this. I just found this to be the fastest way. For reference this is the guide I followed, it's pretty detailed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].