diff options
author | Santo Cariotti <sancn@live.com> | 2017-09-17 14:11:07 +0200 |
---|---|---|
committer | Santo Cariotti <sancn@live.com> | 2017-09-17 14:11:07 +0200 |
commit | ed348458515a1f678b914295bfd423623aef2ad4 (patch) | |
tree | b5e40f8bdc3ae9988b8bb3ccda5c19dc7e217552 | |
parent | 53d6bde7ee3b0a012f7d4111c4478f61aceb7955 (diff) | |
parent | 87efb422b03511c32b4f0087bac231a6c23b21d4 (diff) |
Merge branch 'master' into origin/dev
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .travis.yml | 15 | ||||
-rw-r--r-- | Dockerfile | 6 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | lib/app.py | 2 | ||||
-rw-r--r-- | requirements.txt | 1 |
7 files changed, 37 insertions, 2 deletions
@@ -2,3 +2,4 @@ /__pycache__ /lib/__pycache__ /lib/.data +/lib/*.pyc diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8a709f9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +sudo: false +language: python +python: + - 3.5 + +install: + - pip install -r requirements.txt + +script: + make + +branches: + only: + - master + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1e713e7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine:3.4 +RUN apk add --update \ + python3 +COPY . /app +WORKDIR /app +CMD ["python3", "lib/app.py"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f5a7248 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +all: + python3 -m py_compile lib/app.py + python3 -m py_compile lib/web.py + @@ -1,3 +1,4 @@ +[![Build Status](https://travis-ci.org/dcariotti/stout.svg?branch=master)](https://travis-ci.org/dcariotti/stout) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/09f814cd759f4d7eaac5a650c8114fef)](https://www.codacy.com/app/dunkerC/Stout?utm_source=github.com&utm_medium=referral&utm_content=dcariotti/Stout&utm_campaign=Badge_Grade) ![logo](logo_stout.png) @@ -55,7 +56,14 @@ Ok > (🍺 ) (santo) ``` -## Screenshots +## Docker + +```bash +docker build -t stout:latest . +docker run -i --name Stout stout:latest +``` + +## Screenshots (flask) ![photo1](screenshots/first.png) ![photo2](screenshots/second.png) @@ -25,7 +25,7 @@ class Stout(Commands): try: with open(config['path'], 'rb') as fin: user = fin.readline().split() - if user[0] == '': + if user[0] is '': return '' else: return user[0].decode('utf-8') diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e3e9a71 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask |