Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Add category_config location to the script config | 8698e4a99d63b06fde5c39787fc7d6f7400b9f47 | Sebastian Fricke | 2020-01-15 14:29:47 |
Refactor findConfig | 321ae9d7edd69e8be0755cf5ba82289944d06ca3 | Sebastian Fricke | 2020-01-15 14:26:09 |
Add logging function: no category config warning | e8323843a3b6c24ef274d6a12c10d76aa8b8f591 | Sebastian Fricke | 2020-01-14 14:38:39 |
Add module + test for the category-id config | fadaf4515aab1009f4df4a1af5a2e8f82077bc4c | Sebastian Fricke | 2020-01-14 14:35:44 |
improved coding style on log functions | caf97eec6c6026aa051bc98f02a90e649a6e4754 | Sebastian Fricke | 2020-01-14 10:23:17 |
fixed a typo in the product type list | 707e993b953aea0d653ffbca136bbe81bb36ea13 | Sebastian Fricke | 2020-01-14 10:22:34 |
added home product properties, improved dictionary iteration, fixed a key error in get_attributes | 30d4aed4403c39a6865e30c0384c3360d375cbb6 | Sebastian Fricke | 2020-01-14 10:21:56 |
removed warning for missing flatfile columns as requested | bfe6e22f7acb282a3af8423c81ceacf9fcf21ef4 | Sebastian Fricke | 2020-01-13 15:05:27 |
added initialization for the position variable | 8331f92d62deb9ba7be7e97201c7c6afa7cf732a | Sebastian Fricke | 2020-01-13 14:47:57 |
improved code style and fixed problem where the dictionary containing the path was given to functions instead of the path itself | 1a5bf99751b599f48d4687a9a6cbd55ffe213f5a | Sebastian Fricke | 2020-01-13 14:47:13 |
removed Barcode missing warning on parents | b592779c6cc1588e2ae40394cab53d0d047746e7 | Sebastian Fricke | 2020-01-13 14:46:16 |
Added support for the amazon product types furnitureanddecor, bedandbath, swimwear | b56708e55c3283a6cc2d3803b2abbb99bb125928 | Sebastian Fricke | 2020-01-13 14:16:40 |
fix failing attribute sync | 87ea4bce17eba6c9c9842eaf9eb26249bf8d7da5 | Sebastian Fricke | 2020-01-13 12:15:35 |
new config handling | d65bdfae89eceab6b1319d01373cf70ac7d8b63e | Sebastian Fricke | 2019-11-13 08:57:14 |
Fixed a problem, that caused Data to not pass sorting; Fixed error handling with the product type; Updated category ids | 9a62d369fb24bc80765cd19e31fb255398fb8ed5 | Sebastian Fricke | 2019-09-12 09:27:54 |
fixed a merge conflict bug | e6b4d9613237009d980cdbfc7ec65c3383a3495a | Sebastian Fricke | 2019-08-16 11:31:02 |
current status 15.8 | 94db3a5c98c596b24f00624fa4b772b9fd830b03 | Sebastian Fricke | 2019-08-15 14:26:42 |
Added manual file choosing in case of empty config | 2df178528d70be15bfb2e1c9058f69e128236622 | Sebastian Fricke | 2019-08-15 10:11:41 |
Added Markdown choosing, fixed various bugs | 991ed44df370cf80fc2e2c51d7427d63e221888f | Sebastian Fricke | 2019-08-15 09:30:55 |
Changed the item upload format to fix errors in the sync, moved active upload to properties because it has to be done seperatly to the creation process | 3b466364e3dcdf14b4cef5b8649ec9573c992324 | Sebastian Fricke | 2019-06-17 14:09:23 |
File | Lines added | Lines deleted |
---|---|---|
packages/config.py | 15 | 3 |
File packages/config.py changed (mode: 100644) (index 87eb981..7bf76ee) | |||
... | ... | class State(enum.Enum): | |
14 | 14 | CONFIG_BAD = 4 | CONFIG_BAD = 4 |
15 | 15 | ||
16 | 16 | ||
17 | fields = ['upload_folder', 'data_folder', 'attribute_file', 'file_change_date'] | ||
17 | fields = [ | ||
18 | 'upload_folder', 'data_folder', | ||
19 | 'attribute_file', 'file_change_date', | ||
20 | 'category_config' | ||
21 | ] | ||
18 | 22 | ||
19 | 23 | ||
20 | 24 | def config_open(path, option): | def config_open(path, option): |
... | ... | def config_creation(): | |
45 | 49 | item.write('data_folder=\n') | item.write('data_folder=\n') |
46 | 50 | item.write('attribute_file=\n') | item.write('attribute_file=\n') |
47 | 51 | item.write('file_change_date=\n') | item.write('file_change_date=\n') |
52 | item.write('category_config=\n') | ||
48 | 53 | if(os.path.isfile(configpath)): | if(os.path.isfile(configpath)): |
49 | 54 | return configpath | return configpath |
50 | 55 | else: | else: |
... | ... | def config_creation(): | |
53 | 58 | ||
54 | 59 | def config_read(configpath): | def config_read(configpath): |
55 | 60 | config = {'upload_folder': '', 'data_folder': '', | config = {'upload_folder': '', 'data_folder': '', |
56 | 'attribute_file': '', 'file_change_date': ''} | ||
61 | 'attribute_file': '', 'file_change_date': '', | ||
62 | 'category_config': ''} | ||
57 | 63 | rows = config_open(path=configpath, option='r') | rows = config_open(path=configpath, option='r') |
58 | 64 | ||
59 | 65 | for row in rows: | for row in rows: |
... | ... | def get_options(configpath, initialdir): | |
135 | 141 | options = {'uploadpath': '', | options = {'uploadpath': '', |
136 | 142 | 'datapath': '', | 'datapath': '', |
137 | 143 | 'attributefile': '', | 'attributefile': '', |
138 | 'date': ''} | ||
144 | 'date': '', | ||
145 | 'category_config': ''} | ||
139 | 146 | ||
140 | 147 | # Check the config for mistakes and correct them | # Check the config for mistakes and correct them |
141 | 148 | config_state = [] | config_state = [] |
... | ... | def get_options(configpath, initialdir): | |
165 | 172 | ||
166 | 173 | options['date'] = datetime.datetime.now().strftime("%d.%m.%Y-%H:%M") | options['date'] = datetime.datetime.now().strftime("%d.%m.%Y-%H:%M") |
167 | 174 | ||
175 | options['category_config'] = get_path( | ||
176 | message='Path for the category config', | ||
177 | path_type='file', | ||
178 | initialdir=initialdir) | ||
179 | |||
168 | 180 | config_write(configpath=configpath, data=options) | config_write(configpath=configpath, data=options) |
169 | 181 | ||
170 | 182 | return options | return options |