All Projects → qodot → gtbot

qodot / gtbot

Licence: other
구글 번역 API를 이용한 슬랙 번역 봇입니다.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to gtbot

drf-chat-server-example
A chat server example used Django REST framework with pytest
Stars: ✭ 15 (-55.88%)
Mutual labels:  pytest
pytest-datafixtures
Data fixtures for pytest made simple
Stars: ✭ 24 (-29.41%)
Mutual labels:  pytest
pytest-html-reporter
Generates a static html report based on pytest framework
Stars: ✭ 69 (+102.94%)
Mutual labels:  pytest
ipython pytest
Pytest magic for IPython notebooks
Stars: ✭ 33 (-2.94%)
Mutual labels:  pytest
covdefaults
A coverage plugin to provide sensible default settings
Stars: ✭ 38 (+11.76%)
Mutual labels:  pytest
emacs-python-pytest
run pytest inside emacs
Stars: ✭ 105 (+208.82%)
Mutual labels:  pytest
pytest-tap
Test Anything Protocol (TAP) reporting plugin for pytest
Stars: ✭ 34 (+0%)
Mutual labels:  pytest
pytest-pipeline
Pytest plugin for functional testing of data analysis pipelines
Stars: ✭ 19 (-44.12%)
Mutual labels:  pytest
python-pytest-harvest
Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.
Stars: ✭ 44 (+29.41%)
Mutual labels:  pytest
pytest-test-groups
A Pytest plugin that gives you a way to split your tests into groups of a specific size
Stars: ✭ 37 (+8.82%)
Mutual labels:  pytest
pytest-mongodb
pytest plugin for mocking MongoDB with fixtures
Stars: ✭ 56 (+64.71%)
Mutual labels:  pytest
pytest-emoji
A pytest plugin that adds emojis to your test result report 😍
Stars: ✭ 41 (+20.59%)
Mutual labels:  pytest
pytest-testrail
pytest plugin for integration with TestRail, for creating testruns and updating results
Stars: ✭ 88 (+158.82%)
Mutual labels:  pytest
publishing-python-packages
Examples and exercises for Publishing Python Packages from Manning Books 🐍 📦 ⬆️
Stars: ✭ 25 (-26.47%)
Mutual labels:  pytest
mimesis-factory
Mimesis integration with factory_boy
Stars: ✭ 42 (+23.53%)
Mutual labels:  pytest
pytest-subprocess
Pytest plugin to fake subprocess.
Stars: ✭ 83 (+144.12%)
Mutual labels:  pytest
pytest-elk-reporter
A plugin to send pytest test results to ELK stack
Stars: ✭ 17 (-50%)
Mutual labels:  pytest
pytest-serverless
Automatically mocks resources from serverless.yml in pytest using moto.
Stars: ✭ 26 (-23.53%)
Mutual labels:  pytest
python-package-template
Easy to use template for great PyPi packages
Stars: ✭ 19 (-44.12%)
Mutual labels:  pytest
nuts
NUTS defines a desired network state and checks it against a real network using pytest and nornir.
Stars: ✭ 47 (+38.24%)
Mutual labels:  pytest

gtbot

Build Status

구글 번역 API를 이용한 슬랙 번역 봇입니다.

Features

  • 슬랙 채널에 봇을 초대해 놓고 @gtbot으로 말을 걸면 번역을 할 수 있습니다. 최초 기본 번역 언어는 영어(en)입니다.

overview

  • 구글 번역 API에서 지원하는 언어 코드를 알 수 있습니다.

lang

  • 특정한 언어를 지정해서 번역할 수 있습니다. (일본어를 몰라서 제대로 번역이 된건지 모르겠습니다...)

target

  • 매번 언어를 지정할 필요 없이, 특정한 언어를 기본 번역 언어로 설정할 수 있습니다.

setdefault

Install

Clone repository

git clone https://github.com/qodot/gtbot.git

Install dependencies

이 애플리케이션이 동작하는데 필요한 파이썬 라이브러리들을 설치합니다. (이 때, 파이썬 가상환경을 만들어서 설치하는 것을 추천합니다.)

pip install -r requirements.txt

Get a slack bot API token

  1. 슬랙 앱 빌드 페이지로 들어가셔서 Something just for my team(Make a Custom Integration)을 선택합니다.
  2. Bots를 선택합니다.
  3. 봇의 이름을 입력해야 하는데, 이 때 반드시 이름을 gtbot으로 설정합니다.
  4. API 토큰이 보이는데 이것을 환경변수에 다음과 같이 추가합니다.
export GTBOT_SLACK_TOKEN=<your_token>

Get a google translation API token

구글 번역 API 문서를 참고해서 API 토큰을 얻고, 환경변수에 다음과 같이 추가합니다.

export GTBOT_GOOGLE_TOKEN=<your_token>

Get a slack test user API token

* 이 항목은 이 애플리케이션의 테스트를 실행하기 위해 필요한 항목으로, 테스트를 실행하지 않을 분은 건너뛰어도 괜찮습니다.

슬랙 테스트 토큰 발급 페이지에 가서 봇 Integration을 했던 팀의 테스트 토큰을 발급 받고, 환경변수에 다음과 같이 추가합니다.

export GTBOT_SLACK_TOKEN_TEST=<your_token>

Run

다음과 같이 실행합니다.

python bot.py

테스트 실행은 다음과 같습니다.

pytest

테스트 커버리지 측정을 테스트와 함께 하려면 다음과 같이 실행합니다.

pytest --cov

Dependencies

Application

test

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].