Skip to content

28kayak/poubelle-chat

Repository files navigation

Poubell Chat

Poubell chat is a chat bot application that run on Line App. This application will answer your question about how to throw away trash in Japan(somewhere in Saitama Pref).
こんにちわ、Poubell chatはLINEを使ったchat botアプリです。 このアプリは、日本にあるゴミの分別についての質問に答えてくれるでしょう。

Details : https://28kayak.github.io/poubelle-chat/

Demo

The short demo video is hosted on the Youtube. https://youtu.be/8nqRl7Ej7Pg

Technology

Poubell Chat uses a number of open source projects to work properly:
このチャットは、いくつかのオープンソースプロジェクトを使っています。

  • Python3 - as a programming language プログラミング言語として使いました。
  • heroku - as a cloud application platform アプリケーションプラットホームとして使いました。
  • Apache Solr - as a search-engine to search xml data サーチエンジンとして使いました。
  • Line SDK for python - line sdk allows to communicate with users LINEのsdkを使っています。
  • ngrok - ngrok secure introspectable tunnels to localhost webhook development tool and debugging tool.   

And of course Poubell Chat itself is open source with a public repository on GitHub. そして、このチャット自身もオープンソースプロジェクトです。

Architecture

architecture

Installation

  • Install Python3 パイソン3をインストールする
  • Install Apache Solr ソーラーをインストールする For Linux(Centos) リナックスをお使いの方は、以下のリンクをご利用ください。 See install solr
    For Mac OS マックをお使いのかたは you can download solr by using brew
brew install solr

NOTE

Downloading by brew, solr's file directory will slightly different from building it from binary or source.
We do not edit config file for this project yet.
But, keep in mind if you keep using solr for your own projects.

  • Run solr on your machine and Open your local-solr to public using ngrok
# start solr 
solr start -p 8983
# create solr core named trash  
solr create_core -c trash
# open port 8983 via ngrok 
ngrok http 8983
  • edit app.py
    edit the line below.
    replace YOUR RANDOM NUMBER with http url that ngrok gives you.
response = requests.get('http://YOUR RANDOM NUMBER.ngrok.io/solr/trash/select', params=params)
  • create solr schema
pwd 
$`PATH TO DIR`/Poubelle/solr_schema
chmod 700 define_schema.sh #if you need 
./define_schema.sh  

make sure you have status code with 0

  • insert data to solr
pwd 
$`PATH TO DIR`/Poubelle/data
chmod 700 manage_poubelle.sh #if you need
./poubelle_data_A.xml

make sure you have status code with 0

About

Line Bot application --- it will be able to identify when you can throw away what kind of trash in Japan

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages