-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
50 lines (38 loc) · 1.5 KB
/
main.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
from datetime import datetime
from pybliometrics.scopus.utils import config
from prisma_automator.collector import Collector
from prisma_automator.splitter import Splitter
def main():
print(f"Using API Key: {config['Authentication']['APIKey']}")
""" Time report: program start """
start = datetime.now()
time = start.strftime("%H:%M:%S")
print(f"[$] Program start at {time}.")
""" Split string generation """
# Create key word groups
reality = ["Augmented Reality", "Virtual Reality",
"Extended Reality || Mixed Reality"]
goal = ["BCI", "Gaming"]
other = ["Digital Twin", ""]
kw_groups = [reality, goal, other]
# Create a Splitter and add the key word groups
splitter = Splitter()
splitter.add_kwgroups(kw_groups)
# Generate the splits. Results are saved to "./out".
splits = splitter.split()
""" Search results collection """
# Create a Collector
collector = Collector()
# Search Scopus using the generated splits. Results are saved to "./out".
collector.run(splits, subscriber=True, threshold=1000, log=True)
""" Time report: program end """
end = datetime.now()
time = end.strftime("%H:%M:%S")
difference = end - start
seconds_in_day = 24 * 60 * 60
elapsed_time = divmod(
difference.days * seconds_in_day + difference.seconds, 60)
print(
f"[$] Success. Program end at {time}. Elapsed time: {elapsed_time[0]}min and {elapsed_time[1]}s.")
if __name__ == "__main__":
main()