diff --git a/distribusi/distribusi.py b/distribusi/distribusi.py index 06cc775..1a6e785 100644 --- a/distribusi/distribusi.py +++ b/distribusi/distribusi.py @@ -9,6 +9,7 @@ from PIL import Image from distribusi.page_template import html_footer, html_head from distribusi.mappings import CODE_TYPES, FILE_TYPES, SUB_TYPES import re +import markdown MIME_TYPE = magic.Magic(mime=True) PATTERN_TSTR = re.compile(r"(?P(?P\d{4})(?P\d{2})(?P\d{2})T(?P\d{2})(?P\d{2})(?P\d{2})(?P[+|-]\d{4}))_(?P.+)") @@ -155,6 +156,8 @@ def render_dir(args, root): # what types of text files to expand a = '
{}
'.format(name, open(full_path).read()) #elif subtype in CODE_TYPES or name.endswith('.txt'): + elif name.endswith('.md'): + a = '
{}
'.format(name, markdown.markdown(open(full_path).read())) elif name.endswith('.txt'): #check - time string m = PATTERN_TSTR_TXT.search(name) @@ -277,6 +280,8 @@ def distribusify(args, directory): # noqa # what types of text files to expand a = '
{}
'.format(name, open(full_path).read()) #elif subtype in CODE_TYPES or name.endswith('.txt'): + elif name.endswith('.md'): + a = '
{}
'.format(name, markdown.markdown(open(full_path).read())) elif name.endswith('.txt'): #check - time string m = PATTERN_TSTR_TXT.search(name) diff --git a/py3/requirements.txt b/py3/requirements.txt index 7da0443..7bd69dc 100644 --- a/py3/requirements.txt +++ b/py3/requirements.txt @@ -1,2 +1,4 @@ pillow python-magic +markdown + diff --git a/run.sh b/run.sh index 2cc75a9..53266b9 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/bash -python run.py -t -d ./data/ -nf -s styles/dark.css --no-hidden --no-underscore --unfolding -e .git +python run.py -t -d ./data/ -s styles/white.css --no-hidden --no-underscore --unfolding -e .git diff --git a/styles/white.css b/styles/white.css index f98a411..6cdfe99 100644 --- a/styles/white.css +++ b/styles/white.css @@ -165,6 +165,13 @@ a:hover { padding-left: 0; } +.plain .named { + display: block; + font-weight: 700; + border: unset; + color: rgba(127, 127, 127, 0.5); +} + time { color: rgba(30, 30, 30, 0.3); } diff --git a/system/inotifywait-watcher/watcher.sh b/system/inotifywait-watcher/watcher.sh index ee25828..6bc6be0 100755 --- a/system/inotifywait-watcher/watcher.sh +++ b/system/inotifywait-watcher/watcher.sh @@ -11,8 +11,8 @@ if command -v pyenv 1>/dev/null 2>&1; then fi eval "$(pyenv virtualenv-init -)" -#load env for the proj. 'exp-dist' -pyenv shell exp-dist +#load env for the proj. 'exp-dist-nc' +pyenv shell exp-dist-nc #change directory cd /home/yunohost.app/syncthing/Sync/exp-dist-audiolog