korban.append(fixed[netanel]) roash = "Rosh on %s." % masechet + str(len(links_netanel)+1) + "." + str(num+1) netanelink = commentator + "on " +masechet + "." + str(len(links_netanel)+1)+ "."+ str(len(korban)) links.append(link(netanelink, roash)) netanel +=1 si.append(co) if os.path.isfile('source/Korban_Netanel_on_{}.txt'.format(masechet)) or os.path.isfile('source/Pilpula_Charifta_on_{}.txt'.format(masechet)): links_netanel.append(korban) # if len(links_netanel[len(links_netanel)-1]) > 0: # print links_netanel[len(links_netanel)-1][len(links_netanel[len(links_netanel)-1])-1] rosh.append(si) #print "searching" search(rosh,get_shas(),) if os.path.isfile('source/Korban_Netanel_on_{}.txt'.format(masechet)) or os.path.isfile('source/Pilpula_Charifta_on_{}.txt'.format(masechet)): nosekelim.save_parsed_text(links_netanel, commentator) nosekelim.run_post_to_api(commentator) return rosh def clean(text): rosh = [] for i, seif in enumerate(text): si = [] for j, siman in enumerate(seif): siman = re.sub('@44.*?@(?:55|11)',"",siman) siman = re.sub('([\[\*\]]|@..|#)',"",siman) #print siman si.append(siman) rosh.append(si) return rosh
links_netanel.append(korban) # if len(links_netanel[len(links_netanel)-1]) > 0: # print links_netanel[len(links_netanel)-1][len(links_netanel[len(links_netanel)-1])-1] rosh.append(si) #print "searching" search( rosh, get_shas(), ) if os.path.isfile('source/Korban_Netanel_on_{}.txt'.format( masechet)) or os.path.isfile( 'source/Pilpula_Charifta_on_{}.txt'.format(masechet)): nosekelim.save_parsed_text(links_netanel, commentator) nosekelim.run_post_to_api(commentator) return rosh def clean(text): rosh = [] for i, seif in enumerate(text): si = [] for j, siman in enumerate(seif): siman = re.sub('@44.*?@(?:55|11)', "", siman) siman = re.sub('([\[\*\]]|@..|#)', "", siman) #print siman si.append(siman) rosh.append(si) return rosh