From 17a1e800cf0c14beddaefbec504fc95762cd849d Mon Sep 17 00:00:00 2001 From: TonyFord <tonyford@strategy-investor.de> Date: Mon, 2 Mar 2020 14:49:03 +0100 Subject: [PATCH] fixes --- script/get_orders.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/script/get_orders.py b/script/get_orders.py index 4f2450c..8071686 100644 --- a/script/get_orders.py +++ b/script/get_orders.py @@ -149,25 +149,29 @@ for source in Pulls: continue if( 'headline' not in OO ): - logme('- order.yml[headline] not found -> SKIP order !') - continue + if( ( OO['fairex'] != True ) if 'fairex' in OO else True ): + logme('- order.yml[headline] not found -> SKIP order !') + continue if( 'condition' not in OO ): - logme('- order.yml[condition] not found -> SKIP order !') - continue + if( ( OO['fairex'] != True ) if 'fairex' in OO else True ): + logme('- order.yml[condition] not found -> SKIP order !') + continue else: if not os.path.exists('../_data/condition/'+(OO['condition']).strip()+'.yml' ): logme('- order.yml[condition] = '+(OO['condition']).strip()+' not found -> SKIP order !') continue if( 'description' not in OO ): - logme('- order.yml[description] not found -> SKIP order !') - continue + if( ( OO['fairex'] != True ) if 'fairex' in OO else True ): + logme('- order.yml[description] not found -> SKIP order !') + continue if( 'image-profile' not in OO ): - OO['image-profile']='none' - OO['image-preview']='' - OO['image']='' + if( ( OO['fairex'] != True ) if 'fairex' in OO else True ): + OO['image-profile']='none' + OO['image-preview']='' + OO['image']='' else: if( OO['image-profile'] not in Form['fields']['image-profile']['values'] ): logme('- order.yml[image-profil] = "'+OO['image-profile']+'", invalid, check _data/form.yml[fields][image-profile][values] -> SKIP order !') @@ -201,7 +205,8 @@ for source in Pulls: continue if( 'unit' not in OO ): - OO['unit']=Form['fields']['unit']['default'] + if( ( OO['fairex'] != True ) if 'fairex' in OO else True ): + OO['unit']=Form['fields']['unit']['default'] else: if( OO['unit'] not in Form['fields']['unit']['values'] ): logme('- order.yml[unit] = '+OO['unit']+', invalid, check _data/form.yml[fields][unit][values] -> SKIP order !') @@ -256,7 +261,6 @@ for source in Pulls: if( ps == False ): logme('- order.yml[price-reference] all sources invalid -> SKIP order !') continue - file = open('../_posts/'+Date + '-' +furl+'.md','w') file.write('---\n') file.write('layout: none\n') -- GitLab