-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchstring.py
More file actions
52 lines (39 loc) · 1.2 KB
/
Copy pathsearchstring.py
File metadata and controls
52 lines (39 loc) · 1.2 KB
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
import webbrowser
automated = True
homecage = True
activity = False
behavior = True
pheno = True
combiner = ' AND '
substrings = {}
substrings["pubmed"] = 'https://pubmed.ncbi.nlm.nih.gov/?term='
if automated:
substrings["auto"] = 'automat*'
else:
substrings["auto"] = ''
if homecage:
substrings["homecage"] = '("home cage" OR "homecage" OR "home-cage")'
else:
substrings["homecage"] = ''
if activity:
substrings["activity"] = '(activity OR monitoring)'
else:
substrings["activity"] = ''
if behavior:
substrings["behavior"] = '("behavior" OR "behaviour")'
else:
substrings["behavior"] = ''
if pheno:
substrings["pheno"] = 'phenotyping'
else:
substrings["pheno"] = ''
substrings["custom"] = ''
pubmed_search_string = substrings["pubmed"] + \
substrings["auto"] + combiner + \
substrings["homecage"] + combiner + \
substrings["activity"] + combiner + \
substrings["behavior"] + combiner + \
substrings["pheno"] + combiner + \
substrings["custom"]
print(pubmed_search_string)
webbrowser.open(pubmed_search_string) # Go to example.com