Fred Z
38c398627b
Adds multipage API request in 'get_category()' #11
2018-08-09 02:21:01 +02:00
Fred Z
47bf7a6146
Adds init menu & saved substitutes list #5
2018-08-08 17:53:11 +02:00
Fred Z
f77c7ad09d
Changes 'quit message' mgmt & product selection #5
2018-08-08 11:07:19 +02:00
Fred Z
2aa2f73dd7
Saves (or not) substitutes selected by user #5
2018-08-08 10:58:42 +02:00
Fred Z
6c67b01164
Formates better the lists (prod/cat/sub) #5
...
- Truncates the name in the 2 column menu (but keep full name in others places)
2018-08-07 23:38:00 +02:00
Fred Z
18107a065f
Strengthens SQL requests #5
...
- Use 'id' to select
- Adds NOT NULL for product to avoid absurd substitut request
2018-08-07 23:11:15 +02:00
Fred Z
c112134f0b
Adds detailled description for substitute prod #5
2018-08-07 22:58:20 +02:00
Fred Z
ce7a300b25
Clarifies messaging #5
...
FIX : clarify messaging (CF 'WTF' strings)
2018-08-07 22:58:20 +02:00
Fred Z
e88592bf4e
Adds the substitute list & user input #5
...
- Reformates code to improve readability
- Renames 3rd field of SELECT request option to harmonize data processing
- TODO : clarify messaging (CF 'WTF' strings)
2018-08-07 22:58:20 +02:00
Fred Z
f9dd7d4ed6
Adds the product list & user input #5
2018-08-07 22:57:34 +02:00
Fred Z
0dc050f23d
Exports uses input in 'ask_user()' function #5
2018-08-07 02:40:49 +02:00
Fred Z
bf4ac6738a
Exports list generation in a function #5
...
- function 'get_data_list()' will be used for products either
- changed some constant/variables name for better comprehension
2018-08-07 00:12:06 +02:00
Fred Z
840edb4f40
Validates the user typing and prepares sequel #5
...
- adds index range
- adds quit option
- makes code compliant with pylint & flake8
2018-08-06 20:15:44 +02:00
Fred Z
dadbca63ff
Writes up script to step : 'Ask cat index' #5
2018-08-04 22:44:52 +02:00
Fred Z
291f4d0199
Adds SQL requests needed by CLI #5
2018-08-04 18:40:34 +02:00
Fred Z
ca0ab595b3
Adds script to populates local DB #4 #6
2018-08-04 16:42:04 +02:00
Fred Z
091dfffc76
Fixes 'sql_generator()' when nutriscore is False
...
- edits request string before returning it
- adds 'false_to_null()' method
- adds & updates tests
2018-08-04 16:40:42 +02:00
Fred Z
b18a7062ca
Wraps method 'pymysql…execute()', adds 'autocommit'
2018-08-03 18:23:26 +02:00
Fred Z
7d1f4418db
Adds 'db_summary()' method
...
To lighten and improve the __init__
Now it can be re-called after the create-DB script
Exports messages template in 'config.py'
PyMysql seem not to accept 'CREATE TABLE IF NOT EXIST'
2018-08-03 00:41:17 +02:00
Fred Z
192e18d8e0
Refactors DB access
2018-08-02 20:00:30 +02:00
Fred Z
1c17468fb2
Generates dict with prod & fields #4
...
- Modifies the storage of kept fields : need to keep more fields from a category
than from a product FIELD_KEPT is turned into a dict like this :
{'category':[fields, …], 'products':[fields, …]}
- separates online/offline tests
2018-07-31 15:28:56 +02:00
Fred Z
cff82380b8
Exports config in a new file 'config.py'
2018-07-27 22:27:42 +02:00