From 2c0269a5dd232a89233478e49046af1ea88a049a Mon Sep 17 00:00:00 2001
From: route1rodent <18262122+route1rodent@users.noreply.github.com>
Date: Sun, 1 Mar 2020 15:22:38 +0100
Subject: [PATCH] fix code review remarks

---
 NOTES.md           | 21 ---------------------
 README.md          |  4 ++--
 bin/docker-pokedex | 20 ++++++++++++++++++++
 setup.py           |  3 +--
 4 files changed, 23 insertions(+), 25 deletions(-)
 delete mode 100644 NOTES.md
 create mode 100755 bin/docker-pokedex

diff --git a/NOTES.md b/NOTES.md
deleted file mode 100644
index 5c3e8e0..0000000
--- a/NOTES.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Notes
-
-## Item Questions
-
-QUESTIONS ABOUT ITEMS
-- I think: key items are uncountable.  everything else is countable.  an item can be held iff it is countable.
-- how long do
-- check bp for ultimate held item ref or something
-- I need a better way to represent NPC interactions in different games
-- how much does growth mulch accelerate soil drying?  how much does damp mulch slow it?
-- does lum berry cure confusion?
-- how does sweet heart work?  it seems a guy in mistralton will trade some for heart scales?
-- kind of guessing about the * urge items
-
-CHANGES SINCE R/S
-- 4 shoal salt + 4 shoal shells, traded to a guy in Shoal Cave, make a Shell Bell
-- white flute increased encounter rate by 50%, not 100%
-- shards can be traded for the respective stones
-
-
-UP TO 67
diff --git a/README.md b/README.md
index d2e2cc5..42eb3b5 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ to maintain for the games and generations to come.
 
 ### Status of the YAML migration
 
-**Update from 18.06.2017**
+**Update from 2017-06-18**
 
 @eevee started on an experiment with switching to YAML for data storage some time ago, for a variety of reasons.
 It's finally starting to show some promise — all of gen 7 was dumped to a YAML format, then loaded into the database
@@ -82,7 +82,7 @@ Dumping the SQLite database back into the CSV files:
 bin/docker-pokedex dump -l all
 ```
 
-You also have a special command to re-build the docker image:
+You also have a special command to re-build the docker image (e.g. after editing files):
 ```bash
 bin/docker-pokedex rebuild
 ```
diff --git a/bin/docker-pokedex b/bin/docker-pokedex
new file mode 100755
index 0000000..76db50a
--- /dev/null
+++ b/bin/docker-pokedex
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+curr_dir="$(pwd)"
+log_file="${curr_dir}/bin/docker-pokedex.log"
+
+if [[ "${1}" = "rebuild" ]] || [[ ! -f "${log_file}" ]]; then
+    docker build --rm -t veekun/pokedex ${curr_dir}
+    echo "$(date)" >> "${log_file}"
+
+    if [[ "${1}" = "rebuild" ]]; then
+        echo "Docker container rebuilt"
+        exit
+    fi;
+fi
+
+docker run -it --rm \
+    -e TERM=xterm-256color \
+    --name "pokedex-$(date +%Y%m%d-%H%M%S)" \
+    --mount type=bind,source="${curr_dir}/pokedex/data",target=/app/pokedex/data \
+    veekun/pokedex "${@}"
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 37cfc62..71fe291 100644
--- a/setup.py
+++ b/setup.py
@@ -2,10 +2,9 @@ from setuptools import setup, find_packages
 
 setup(
     name='Pokedex',
-    version='0.2',
+    version='0.1',
     zip_safe=False,
     packages=find_packages(),
-    hiddenimports=['six'],
     package_data={
         'pokedex': ['data/csv/*.csv']
     },