-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain-mail.py
112 lines (95 loc) · 3.73 KB
/
main-mail.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from EPmail import EPmail
from BusquedasEPO import *
from BusquedasSem import *
from linkTypeform import *
def main():
#responses = form.get_responses()#since=timestamp1)
#print(responses.get_response())
name_id = 'textfield_52850379'
mail_id = 'email_52850524'
text_id = 'textarea_52850750'
content = getFormComplete(offset=5, limit=5)
response = getResponses(content=content, id=mail_id)
print(response)
# apiurl = ''
# apikey = ''
#
# mtext = 'Hola! soy Ro, y te adjunto mi auxiliar 12'
# msubject = 'Auxiliar 12'
# mfrom = ''
# mto = '@gmail.com'
#
# #archivos adjuntos
# fname = '/home/ribanez/Descargas/Auxiliar12.pdf'
# fformat = 'Auxiliar12.pdf'
# epm = EPmail(apiurl, apikey)
#aux = epm.send_simple_message(mto, mfrom, msubject, mtext)
#aux = epm.send_complex_message(mto,mfrom,msubject,mtext,fformat,fname)
#print(aux)
#text = "son barcos de papel creados a partir de vibraciones de las hojas. Los barcos de papel tienen la resistencia del acero."
#input('ingresa el texto, loco! ')
#text = translateText('es','en', text)
#text = deletePunt(text)
#text = deleteStop('spanish', text)
#text = deleteWord('PRP',text)
#text = deleteWord('PRP$',text)
#text = deleteWord('IN',text)
#text = deleteWord('DT',text)
#print(text)
#text = stemmingLemmatizer(text)
#print(text)
#aux = collocationFinder(2,5,text)
#word = "dog"
#print(get_synonymous(word))
#print(get_antonyms(word))
#print(similaridad("dog","frump"))
#consumer_key = ''
#consumer_secret_key = ''
#client = initEPO()
#client = epo_ops.Client(key=consumer_key, secret=consumer_secret_key) # Instantiate client
#
#response = client.published_data_search(cql='ab=explosive',range_begin=1,range_end=25,constituents=None)
#
#response = client.published_data( # Retrieve bibliography data
# reference_type='publication', # publication, application, priority
# input = epo_ops.models.Docdb('1000000', 'EP','A1'), # original, docdb, epodoc
# #query='ti%3Dplastic' ,
# endpoint='biblio', # optional, defaults to biblio in case of published_data
# constituents=[] # optional, list of constituents
# )
#print(response.text)
#print(soup.prettify())
#count = 1
#for aux in soup:
# print(aux)
# if count>3:
# break
# count+=1
# country = busquedaEPO(response,'country',type='html')
# number = busquedaEPO(response,'doc-number',type='html')
# kind = busquedaEPO(response, 'kind',type='html')
#import epo_opsanonymous_client = epo_ops.Client() # Instantiate a default client
# for i in range(len(country)):
# response = client.published_data( # Retrieve bibliography data
# reference_type='publication', # publication, application, priority
# input=epo_ops.models.Docdb(str(number[i]), country[i], kind[i]), # original, docdb, epodoc
# endpoint='abstract',
# #optional, defaults to biblio in case of published_data
# )
# aux = busquedaEPO(response,elemento='abstract',type='xml')
# print(getSoup(response,'html.parser').find(lang='en').p.string)
# print(busquedaLang(response,idioma='en',type='html.parser'))
# if len(aux)<=1:
# print(aux[0])
# else:
# print(aux[1])
# text = response.text
# soup = BeautifulSoup(text, 'xml')
# aux2 = soup.find_all('abstract')
# #fin = list()
# for i in aux2:
# print(i.p.string)
# print(response.text)
# print(busquedaEPO(BeautifulSoup(response.text,'html.parser'),'abstract'))
if __name__ == "__main__":
main()