Giter Club home page Giter Club logo

lunchnaste's Introduction

lunchnaste bot

usage

echo "export SLACK_API_TOKEN='<your-slack-api-token>'" >> env.sh
source env.sh
PYTHONPATH=. [READ=true] python src/send_message.py [--debug=false] [-s kwang]
  • READ: make network call to pinchefs site or use static test html
  • debug: prints debug to stdout
  • channel: sends to slack channel

setup

mkvirtualenv --python=`which python3` lunchnaste
workon lunchnaste

# devapp
scp env.sh [email protected]:env.sh

virtualenv --python=`which python3` lunchnaste
source /home/kwang/lunchnaste/bin/activate
source ~/env.sh

lambda deploy

source lambda_deploy.sh
upload lunchnaste.zip to aws lambda

tests

  • PYTHONPATH=src pytest

roadmap

  • parse menu data from pincuisine blog
  • slack slash command integration
  • set up voting bot to figure out which building to crew up
  • support sending to multiple channels/users
  • include other offices (for when we can afford to fly to nyc for lunch)

lunchnaste's People

Contributors

kswang2400 avatar

Watchers

 avatar  avatar  avatar

lunchnaste's Issues

test and script imports not compatible

(lunchnaste) [05:52:17] ~/Desktop/lunchnaste (docs)  $ env pytest
=================================== test session starts ===================================
platform darwin -- Python 3.6.4, pytest-3.6.2, py-1.5.3, pluggy-0.6.0
rootdir: /Users/[email protected]/Desktop/lunchnaste, inifile:
collected 0 items / 1 errors

========================================= ERRORS ==========================================
_______________________ ERROR collecting tests/test_html_parser.py ________________________
ImportError while importing test module '/Users/[email protected]/Desktop/lunchnaste/tests/test_html_parser.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
tests/test_html_parser.py:5: in <module>
    from src.menu_html_parser import MenuHTMLParser, DATE_FORMAT
E   ModuleNotFoundError: No module named 'src'
!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!
================================= 1 error in 0.18 seconds =================================
(lunchnaste) [05:52:28] ~/Desktop/lunchnaste (docs)  $

give a shortened response

By default, return the menu for one building only and for one meal.
Then params can customize the response.

twitter bot!

api-ize the data scraping, and hook it up to a twitter bot. ups the count of consumers to three (cronjob, slash command, twitter)

fix pip install uses pinadmin mirror which requires vpn issue

[03:13:43] ~/Desktop/lunchnaste (lambda-deploy)  $ source lambda_deploy.sh
find . -name \*.cache -delete
find . -name \*.coverage -delete
find . -name \*.pyc -delete
find . -name \__pycache__ -delete
find . -name \.pytest_cache -delete
Looking in indexes: https://pypi-mirror-external.pinadmin.com/simple/, https://pypirepo-external.pinadmin.com/
Collecting pytest (from -r requirements.txt (line 1))

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.