diff --git a/.dockerignore b/.dockerignore index 00767eb..f0c0de9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,11 +11,12 @@ static/Metadata/* .pa_bin .python __pycache__ -BUGS README -TODO DB_BACKUP db-container .gitignore .dockerignore Dockerfile +internal/git-log.txt +internal/TODO +internal/BUGs diff --git a/Dockerfile b/Dockerfile index df3604e..ac4ea2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,8 @@ EXPOSE 443 EXPOSE 55432 COPY . . RUN git log -n 15 > ./internal/git-log.txt +RUN ln -s /code/TODO /code/internal/TODO +RUN ln -s /code/BUGs /code/internal/BUGs RUN rm -rf .git RUN chown mythtv:mythtv /code RUN chown mythtv:mythtv ./static diff --git a/TODO b/TODO index 617fe7e..b86ab6c 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,6 @@ ## GENERAL + * get Dockerfile to timestamp when it ran so Built on in about page is accurate (not the last commit time) + * after move, instead of back to home page, go to an ammended view of the thumbs to keep moving * ignore face should ignore ALL matching faces (re: Declan) diff --git a/main.py b/main.py index 6d4d84e..1c4d8ec 100644 --- a/main.py +++ b/main.py @@ -172,7 +172,34 @@ def about(): # add last commit (or fake commit if no file) commits.append(o) - return render_template("about.html", commits=commits) + + bugs=[] + try: + with open( 'internal/BUGs', 'r' ) as fp: + can_add=False + for l in fp: + print(l) + if not l.startswith( 'BUG' ): + if can_add: + b['str']=b['str']+'
'+l + else: + pass + else: + if can_add: + bugs.append(b) + b={} + b['str']=l + can_add=True + except FileNotFoundError: + b={} + b['str']="No BUGs defined - cannot find BUGs file!?" + bugs.append(b) + try: + with open( 'internal/TODO', 'r' ) as fp: + todo=fp.read() + except FileNotFoundError: + todo="No TODOs defined - cannot find TODO file!?" + return render_template("about.html", commits=commits, bugs=bugs, todo=todo) @app.route('/logout') @login_required diff --git a/templates/about.html b/templates/about.html index 9b256c7..9716886 100644 --- a/templates/about.html +++ b/templates/about.html @@ -12,13 +12,25 @@
Recent commits: -
+ {% for c in commits %}
{{c.date}}
{{c.str}}
{% endfor %} +
+ Known Bugs: +
+ {% for b in bugs %} +
{{b.str|safe}}
+ {% endfor %} +
+ TODO: +
+
+    {{todo}}
+    
{% endblock main_content %}