-
Notifications
You must be signed in to change notification settings - Fork 9
Test report of gui.py
Kanishka Parashar edited this page Apr 30, 2021
·
4 revisions
- git pull the repositories: CEVOpen, dictionary, opendiagram
- Make changes to the
gui.py
file such that the HOME directs to your home directory. And in most cases, the home directory is your project directory. It should look like this:
DICTIONARY_HOME = "/Users/DELL/dictionary"
CEV_DICTIONARY_HOME = "/Users/DELL/CEVOpen/dictionary"
- Save the changes in the
gui.py
file.
- Command Line:
C:\Users\DELL\openDiagram\physchem\python>python gui.py
- After this
tk window
open with such options including:-
output dir
for output folder where numbers of paper will download -
create dictboxes
for query term selection such ascountry
,ethics
,invasive
,plant_part
,parkinsons
-
output XML
,output PDF
,output metadata CSV
,no download
,output SUPP
,make sections
this different checkbox provide result according user's cretareia. -
maximum hits(-k)
option provide user's to download specific number of papers
-
- Once you select your query it's give following auto generate query on commandline and gives following result:
args ['pygetpapers', '-q', '("Brazil" OR "India" OR "South Africa") AND ("Alliaria petiolata" OR "Lantana camara" OR "Mikania micrantha")', '-o', 'C:\\Users\\DELL\\temp', '-k', '10', '-x', '-c']
HITS 673\r
CompletedProcess(args=['pygetpapers', '-q', '("Brazil" OR "India" OR "South Africa") AND ("Alliaria petiolata" OR "Lantana camara" OR "Mikania micrantha")', '-o', 'C:\\Users\\DELL\\temp', '-k', '10', '-x', '-c'], returncode=0, stdout=b'', stderr=b'INFO: Total Hits are 673\r
WARNING: Author list not found for paper 3\r
WARNING: Author list not found for paper 5\r
WARNING: Keywords not found for paper 8\r
WARNING: Keywords not found for paper 9\r
INFO: Saving XML files to C:\\Users\\DELL\\temp\\*\\fulltext.xml\r
INFO: */Wrote xml for PMC8042356/\r
INFO: */Wrote xml for PMC7998567/\r
INFO: */Wrote xml for PMC7455955/\r
INFO: */Wrote xml for PMC7359623/\r
INFO: */Wrote xml for PMC7554841/\r
INFO: */Wrote xml for PMC7287757/\r
INFO: */Wrote xml for PMC7760039/\r
INFO: */Wrote xml for PMC7201468/\r
INFO: */Wrote xml for PMC7748911/\r
INFO: */Wrote xml for PMC7676390/\r
')
- Selection of checkbox into the
tk window
generate query:['pygetpapers', '-q', '("Brazil" OR "India" OR "South Africa") AND ("Alliaria petiolata" OR "Lantana camara" OR "Mikania micrantha")', '-o', 'C:\\Users\\DELL\\temp', '-k', '10', '-x', '-c']
- This query created "temp" in the current directory and in this folder .XML of 10 papers were downloaded with CSV metadata file
- Git pull all repositories : CEVOpen, OpenDiagram, Dictionary by commandline commands
- Make changes to the
gui.py
files such that the HOME directs to your home directory. like-
DICTIONARY_HOME= "/Users/HP PC/dictionary"
CEV_DICTIONARY_HOME= "/Users/HP PC/CEVOpen/dictionary"
- Save changes in the
gui.py
file.
Run gui.py
in cmd, copy path C:\Users\HP PC\openDiagram\physchem\python
and give command C:\Users\HP PC\openDiagram\physchem\python>python gui.py
- A
tk window
will appear on screen - It will include :
-
output dir
for output/result where papers will be downloded -
create dictboxes
for query selection ascountry
,ethics
,invasive
,plant_part
,parkinsons
-
output
as : XML, PDF, CSV, SUPP,make sections
-
maximum hits (-k)
this for the limit or number of papers the person wants to download - A
query box
to write a query
- After giving command in cmd to run
gui.py
atk window
will appear on the screen. - set the output directory in my case it is
C:\Users\HP PC\temp\temp1
- Select a query from the box, in my case
invasie
another box will appear on the sametk window
showing list of plants, select as per your choice, set the limit (k) in my case it is set to 10 - mark the
section
box as per your choice. - write query in the query box ,
essential oils
in my case. - After this click on
run pygetpapers query
box - you will get results for end search
- Your papers will be downloaded at the given output directory
C:\Users\HP PC\openDiagram\physchem\python>python gui.py
ROOT .
/Users/HP PC/CEVOpen/dictionary\Invasive_species\invasive_plant.xml
entries 460
HITS 33\r
txt .!frame8.!frame
making sections ['ami', '-p', 'C:\\Users\\HP PC\\temp\\temp1', 'section']
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\HP PC\AppData\Local\Programs\Python\Python39\lib\tkinter\__init__.py", line 1884, in __call__
return self.func(*args)
File "C:\Users\HP PC\openDiagram\physchem\python\gui.py", line 426, in create_query_and_run
self.create_sections()
File "C:\Users\HP PC\openDiagram\physchem\python\gui.py", line 434, in create_sections
stdout_lines, _ = self.run_subprocess_get_lines(args)
File "C:\Users\HP PC\openDiagram\physchem\python\gui.py", line 389, in run_subprocess_get_lines
completed_process = subprocess.run(args, capture_output=True)
File "C:\Users\HP PC\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\HP PC\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\HP PC\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified