This work is an extention of the work of Yunhai Zhang
that resides on https://github.com/zsf520/Automating_SLR. The code there is used in this repo for educational&research purposes only.
Queries that are generated for scopus
and ebsco
libraries are quick prototypes and they haven't been tested during Yunhai Zhang
's research.
-
Install
git
,python3
andpip
(Even if it is already installed, it is strongly recommended to upgrade to at leastpython 3.12
) and make sure that they on yourPATH
or in Windows jargon they are added to theenvironment variables
(meaning that you can executepython
andpip
related commands from your bash terminal or powershell(in case of Windows)) -
For next steps use
Git Bash
(already installed withgit
, you can paste commands via right clicking and clicking on paste,ctrl+v
wouldn't work) in Windows and your standard bash terminal in Linux&MacOS -
Clone the repository(via
git clone https://github.com/halildgn/automating-slr.git
) -
Navigate to
automating-slr/src-python
viacd automating-slr/src-python
-
Copy and run the following command to install the dependencies:
- Important Note: Sometimes using
eduroam
causes problems while cloning a git repository or installing python packages. If you encounter such problem, please execute following commands while using your private network.
py -m pip install -r requirements.txt && py -m playwright install --with-deps chrome
python3 -m pip install -r requirements.txt && python3 -m playwright install --with-deps chrome
After installing the dependencies, in automating-slr/src-python
run via py automating-slr.py
on Windows and via python3 automating-slr.py
on MacOS&Linux
- Your theme preference and build configurations are managed by
pickledDB
and stored inautomating-slr/src-python/config.db
. In case of switching over to other machines in the future, you can still enjoy your existing builds by placing thisconfig.db
file from old computer in the new computer'sautomating-slr/src-python
directory.
If you had problems while running the GUI with webui2
or you would like to launch the GUI inside your webbrowser, you import the webbrowser
module(it is included in python by default, no need to install) and change the main
of src-python/automating-slr.py
as following:
import webbrowser
if __name__ == '__main__':
# needed when freezing the app:
# multiprocessing.freeze_support()
frontend = cast(str,resource_path("index.html"))
server_process = multiprocessing.Process(target=spin_up_server)
server_process.start()
webbrowser.open(frontend, new=1 , autoraise=True )
- Adjust the content of
main
with the following and in the python modules, instead of directly saving files to the remote server(since the server is going to run on another computer, we don't want to save files to that computer but we would like retrieve them instead), send those back to the client as response. - Adjust the content of the frontend, so that the response from the server(the file) is saved, also instead of making use of server to manage the builds&theme-preference, use
localStorage
instead(since we don't want to save our configs to the remote server) -> see the commit here - Either move caching to frontend, change caching strategy in backend(
src-python/automating-slr.py
), or revoke caching strategy between theboundariesForFilterParameters
andfilter
route handlers. - Deploy the server via vm or container and deploy the frontend(static html) to some static site hosting service like "github pages".
if __name__ == '__main__':
server_process = multiprocessing.Process(target=spin_up_server)
server_process.start()
- Install
NVM(node version manager)
: Windows Linux and MacOS - Install
node
version21.7.1
by usingnvm install 21.7.1
and set the version bynvm use 21.7.1
- In
automating-slr
, install the packages vianpm install --legacy-peer-deps
- To build, in
automating-slr
:npm run build
(generates the standalonehtml
inautomating-slr/src-python
which is going to be used while generating the binary) - To spin up a frontend development server, in
automating-slr
:npm run dev
- To spin up the flask server, comment out the following lines before running the
automating-slr.py
script withpy automating-slr.py
on Windows andpython3 automating-slr.py
on MacOS&Linux:
if __name__ == '__main__':
# needed when freezing the app:
# multiprocessing.freeze_support()
# frontend = cast(str,resource_path("index.html"))
server_process = multiprocessing.Process(target=spin_up_server)
server_process.start()
# app_window = webui.window()
# app_window.show(frontend)