TOC Project 2021

Finite State Machine Graph

Run locally

Run python file app.py Run with ngrok port 8000 Edit linedeveloper webhook url and postfixe with /webhook

My Linebot

First in user state enter any key to access manual

Three option to choose in manual state

First show the top 3 best games in 2021

Show in carousel columd mode button below which is the description and the link of the game to steam

Description

Link to buy

Second show the category

  1. RPG
  2. SLG
  3. Casual
  4. Co-op

in state above which can see the description of these games and the link of these games in steam

Category

Third show the FSM graph of this linebot

Send image in linebot

Tips

Type manual to back to manual state

Add local project to Heroku project

heroku git:remote -a {HEROKU_APP_NAME}

Upload project

git add .
git commit -m "Add code"
git push -f heroku master

Set Environment - Line Messaging API Secret Keys

heroku config:set LINE_CHANNEL_SECRET=your_line_channel_secret
heroku config:set LINE_CHANNEL_ACCESS_TOKEN=your_line_channel_access_token

pygraphviz problem in heroku

run commands below can solve the problems

heroku buildpacks:set heroku/python
heroku buildpacks:add --index 1 heroku-community/apt

Deploy with Github

must include Procfile and requirement.txt , runfile.txt(optional) push to github branch master and deploy

Link of server

https://{my_server_name}.herokuapp.com/webhook

My server link in heroku

https://toc-final-project-2021.herokuapp.com/webhook

Addition Function

Web-crawler Send image

##References https://zh-hant.10besty.com/best-steam-games/ https://zh-hant.10besty.com/best-strategy-games/ https://zh-hant.10besty.com/best-co-op-games/ https://zh-hant.10besty.com/best-casual-games/ https://zh-hant.10besty.com/best-rpg-games/ https://cdn.akamai.steamstatic.com/steamcommunity/public/images/clans/27766192/6da8a65fb75742d808f12ab05b2453b56193e65c/schinese.jpg?t=1640734552