Skip to content

Commit

Permalink
Version 1.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
filak committed Feb 6, 2024
1 parent c2b9da7 commit 8f4f862
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion flask-app/application/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create_app(debug=False, logger=None, port=5900,
app.config.update(dict(
APPLICATION_ROOT = url_prefix,
APP_NAME = 'MTW',
APP_VER = '1.6.3',
APP_VER = '1.6.4',
API_VER = '1.0.0',
DBVERSION = 1.0,
CACHE_DIR = mtu.get_instance_dir(app, 'cache'),
Expand Down
29 changes: 16 additions & 13 deletions flask-app/application/modules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,18 @@ def getLookupJson(lookups, export):

terms = []
terms_all = []

terms_en = []
terms_cs = []

'''
if export in ['js_elastic','js_parsers']:
if xterms.get(dui):
### terms termsx nterms ntermsx
for termtype in ['terms','termsx','nterms','ntermsx']:
if xterms[dui].get(termtype):
terms_all += xterms[dui].get(termtype).split('~')
terms = list(set(terms_all))

'''

if export == 'marc':
if xterms.get(dui):
Expand All @@ -362,7 +365,7 @@ def getLookupJson(lookups, export):
d['terms'].append(t.replace('[OBSOLETE]','').strip())


if export in ['js_elastic','js_parsers', 'marc']:
if export in ['js_elastic','js_parsers','marc']:
d['cat'] = []
d['trn'] = []
trees = item.get('trn','').split('~')
Expand Down Expand Up @@ -393,11 +396,13 @@ def getLookupJson(lookups, export):
if rn != '0':
d['rn'] = rn
#d['xtr'].append(rn)
terms_en.append(rn)

cas = item.get('cas')
if cas:
d['cas'] = cas
#d['xtr'].append(cas)
terms_en.append(cas)

crt = item.get('crt')
if crt:
Expand Down Expand Up @@ -430,9 +435,7 @@ def getLookupJson(lookups, export):
d['rtd'].append(t)


if export in ['js_elastic']:
terms_en = []
terms_cs = []
if export in ['js_elastic','js_parsers']:
if xterms.get(dui):
### terms nterms => xtr_en
for termtype in ['terms','nterms']:
Expand All @@ -450,19 +453,19 @@ def getLookupJson(lookups, export):
for t in terms_en:
terms_en_clean.append( t.replace('[OBSOLETE]','').strip() )

if terms_en:
if terms_en_clean:
d['xtr_en'] = []

for t in sorted(terms_en_clean):
if t:
d['xtr_en'].append( t )
for t in sorted(terms_en_clean):
if t:
d['xtr_en'].append( t )

if terms_cs:
d['xtr_cs'] = []

for t in sorted(terms_cs, key=coll.sort_key):
if t:
d['xtr_cs'].append( t )
for t in sorted(terms_cs, key=coll.sort_key):
if t:
d['xtr_cs'].append( t )


if dui.startswith('D'):
Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from application.main import create_app

appname = 'mtw-server'
appdesc = 'MTW Server 1.6.3'
appdesc = 'MTW Server 1.6.4'
appusage = 'Help: ' + appname + ' -h \n'
appauthor = 'Filip Kriz'

Expand Down
12 changes: 6 additions & 6 deletions flask-app/mtw_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
### Version 1.6.3
### Version 1.6.4
### Python 3.12 ###
arrow==1.3.0
bcrypt==4.1.2 ## NOT python-bcrypt !!!
cachelib==0.9.0 ## 0.10+ incompatible with Flask-caching 2.0.2 !
certifi==2023.11.17
certifi==2024.2.2
cffi==1.16.0
colorama==0.4.6
diff_match_patch==20230430
Flask==3.0.1
Flask==3.0.2
Flask-Caching==2.1.0
Flask-Paranoid==0.3.0
#Flask-SeaSurf==1.1.1 # Broken with Flask 3+
#Run: pip install https://github.com/maxcountryman/flask-seasurf/archive/refs/heads/main.zip
#Flask-Session==0.5.0 # Broken with Flask 3+
Flask-Session==0.6.0 # Broken with Flask 3+
#Run: pip install https://github.com/pallets-eco/flask-session/archive/refs/heads/main.zip
flask-talisman==1.1.0
future==0.18.3
idna==3.6
itsdangerous==2.1.2
Jinja2==3.1.3
MarkupSafe==2.1.4
MarkupSafe==2.1.5
pip_audit==2.7.0 ## Run: pip freeze > requirements.txt ; pip-audit ; pip-audit -r mtw_requirements.txt
pyuca==1.2
requests==2.31.0
requests_futures==1.0.1
setuptools==69.0.3
urllib3==1.26.18
waitress==2.1.2
waitress==3.0.0
Werkzeug==3.0.1
wheel==0.42.0
### (optional) If building for Windows:
Expand Down

0 comments on commit 8f4f862

Please sign in to comment.