summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-09-17 14:11:07 +0200
committerSanto Cariotti <sancn@live.com>2017-09-17 14:11:07 +0200
commited348458515a1f678b914295bfd423623aef2ad4 (patch)
treeb5e40f8bdc3ae9988b8bb3ccda5c19dc7e217552
parent53d6bde7ee3b0a012f7d4111c4478f61aceb7955 (diff)
parent87efb422b03511c32b4f0087bac231a6c23b21d4 (diff)
Merge branch 'master' into origin/dev
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml15
-rw-r--r--Dockerfile6
-rw-r--r--Makefile4
-rw-r--r--README.md10
-rw-r--r--lib/app.py2
-rw-r--r--requirements.txt1
7 files changed, 37 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 227cf83..1996fea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
+
diff --git a/README.md b/README.md
index 8c9f951..da9ec57 100644
--- a/README.md
+++ b/README.md
@@ -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&amp;utm_medium=referral&amp;utm_content=dcariotti/Stout&amp;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)
diff --git a/lib/app.py b/lib/app.py
index 4226585..ba8b5d6 100644
--- a/lib/app.py
+++ b/lib/app.py
@@ -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