-- old & new
Merge branch 'master' of https://git.le-club-des-sans-sujets.org/Le-Club-des-Sans-Sujets/listservs
This commit is contained in:
commit
b9be181987
@ -1,35 +0,0 @@
|
|||||||
name: listservs
|
|
||||||
channels:
|
|
||||||
- defaults
|
|
||||||
dependencies:
|
|
||||||
- openssl=1.0.2
|
|
||||||
- pip=9.0.1=py34_1
|
|
||||||
- python=3.4.5=0
|
|
||||||
- readline=6.2=2
|
|
||||||
- setuptools=27.2.0=py34_0
|
|
||||||
- sqlite=3.13.0=0
|
|
||||||
- tk=8.5.18=0
|
|
||||||
- wheel=0.29.0=py34_0
|
|
||||||
- xz=5.2.2
|
|
||||||
- zlib=1.2.8
|
|
||||||
- pip:
|
|
||||||
- beautifulsoup4==4.7.1
|
|
||||||
- click==7.0
|
|
||||||
- dateparser==0.7.1
|
|
||||||
- flask==1.0.4
|
|
||||||
- gunicorn==19.9.0
|
|
||||||
- html5lib==1.0.1
|
|
||||||
- itsdangerous==1.1.0
|
|
||||||
- jinja2==2.10.1
|
|
||||||
- markupsafe==1.1.1
|
|
||||||
- mysql-connector-python==8.0.16
|
|
||||||
- protobuf==3.8.0
|
|
||||||
- python-dateutil==2.8.0
|
|
||||||
- pytz==2019.1
|
|
||||||
- regex==2019.6.8
|
|
||||||
- six==1.12.0
|
|
||||||
- soupsieve==1.9.2
|
|
||||||
- tzlocal==1.5.1
|
|
||||||
- webencodings==0.5.1
|
|
||||||
- werkzeug==0.15.4
|
|
||||||
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
name: listservs
|
|
||||||
dependencies:
|
|
||||||
- openssl=1.0.1k=1
|
|
||||||
- pip=7.1.2=py34_0
|
|
||||||
- python=3.4.3=1
|
|
||||||
- setuptools=18.1=py34_0
|
|
||||||
- sqlite=3.8.4.1=1
|
|
||||||
- wheel=0.24.0=py34_0
|
|
||||||
- xz=5.0.5=0
|
|
||||||
- zlib=1.2.8=0
|
|
||||||
- pip:
|
|
||||||
- click==7.0
|
|
||||||
- dateparser==0.7.1
|
|
||||||
- flask==1.1.1
|
|
||||||
- gunicorn==19.9.0
|
|
||||||
- itsdangerous==1.1.0
|
|
||||||
- jinja2==2.10.1
|
|
||||||
- markupsafe==1.1.1
|
|
||||||
- mysql-connector-python==8.0.16
|
|
||||||
- protobuf==3.8.0
|
|
||||||
- python-dateutil==2.8.0
|
|
||||||
- pytz==2019.1
|
|
||||||
- regex==2019.6.8
|
|
||||||
- six==1.12.0
|
|
||||||
- tzlocal==1.5.1
|
|
||||||
- werkzeug==0.15.4
|
|
||||||
|
|
||||||
21
requirements.txt
Normal file
21
requirements.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
click==8.1.3
|
||||||
|
dateparser==1.1.1
|
||||||
|
DateTime==4.4
|
||||||
|
Flask==2.1.2
|
||||||
|
gunicorn==20.1.0
|
||||||
|
importlib-metadata==4.12.0
|
||||||
|
itsdangerous==2.1.2
|
||||||
|
Jinja2==3.1.2
|
||||||
|
MarkupSafe==2.1.1
|
||||||
|
mysql-connector-python==8.0.29
|
||||||
|
protobuf==4.21.2
|
||||||
|
python-dateutil==2.8.2
|
||||||
|
pytz==2022.1
|
||||||
|
pytz-deprecation-shim==0.1.0.post0
|
||||||
|
regex==2022.3.2
|
||||||
|
six==1.16.0
|
||||||
|
tzdata==2022.1
|
||||||
|
tzlocal==4.2
|
||||||
|
Werkzeug==2.1.2
|
||||||
|
zipp==3.8.0
|
||||||
|
zope.interface==5.4.0
|
||||||
@ -1,3 +1,3 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source activate listserv
|
source venv/bin/activate
|
||||||
gunicorn -w 1 --bind 0.0.0.0:5555 www-serve:app
|
gunicorn -w 1 --bind 0.0.0.0:5555 www-serve:app
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from www import app
|
from www import app
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app.run(debug=True, use_reloader=False)
|
app.run(debug=True, use_reloader=False)
|
||||||
@ -3,7 +3,7 @@ from www import app
|
|||||||
import archive.archive as archive
|
import archive.archive as archive
|
||||||
import config
|
import config
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os, logging
|
import os, logging, time
|
||||||
|
|
||||||
lists_to_serve = archive.list_tables_db(config.db['database'], config.db['host'], config.db['user'], config.db['password'])
|
lists_to_serve = archive.list_tables_db(config.db['database'], config.db['host'], config.db['user'], config.db['password'])
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ def searh():
|
|||||||
if f_arg not in ['content', 'from']:
|
if f_arg not in ['content', 'from']:
|
||||||
return "field '" + f_arg + "' does not exist"
|
return "field '" + f_arg + "' does not exist"
|
||||||
|
|
||||||
print("annalen /search k_arg=" + k_arg + " l_arg=" + l_arg + " f_arg=" + f_arg)
|
logging.info("/search k_arg=" + k_arg + " l_arg=" + l_arg + " f_arg=" + f_arg)
|
||||||
|
|
||||||
lists = []
|
lists = []
|
||||||
if l_arg == "all":
|
if l_arg == "all":
|
||||||
@ -54,9 +54,6 @@ def searh():
|
|||||||
else:
|
else:
|
||||||
lists.append(l_arg)
|
lists.append(l_arg)
|
||||||
|
|
||||||
print(lists)
|
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
##
|
##
|
||||||
## need to cache all the below.....
|
## need to cache all the below.....
|
||||||
@ -67,6 +64,7 @@ def searh():
|
|||||||
|
|
||||||
logging.info("search keyword = " + k_arg)
|
logging.info("search keyword = " + k_arg)
|
||||||
|
|
||||||
|
|
||||||
for l in lists:
|
for l in lists:
|
||||||
|
|
||||||
with archive.Archive(l, config=config.db) as a:
|
with archive.Archive(l, config=config.db) as a:
|
||||||
@ -98,6 +96,8 @@ def searh():
|
|||||||
|
|
||||||
|
|
||||||
sorted_results = sorted(results, key=get_result_key)
|
sorted_results = sorted(results, key=get_result_key)
|
||||||
|
|
||||||
|
|
||||||
return jsonify(result=sorted_results)
|
return jsonify(result=sorted_results)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user