Please change the user_id for the Moss Connection (register here). You can use the Id for tests, but should change it if you use it more often.
Plagiator is a fast, scalable and modern plagiarism checker for Matlab Scripts. To compare the files, MOSS - Measure of Software Similarity is used.
- Interaction
- GUI (React)
- GUI (Tkinter)
- CLI
- Storage
- SqLite3 Database
see GitHub Releases
Before launching you need to install the necessary dependencies. Make sure you have Node.js
and python 3.6^
or higher installed.
Run ./scripts/install.ps1 or ./scripts/install.sh from the root
directory to install all necessary packages and build the current version of the frontend.
The installation script for Windows is currently better because it allows some config options as well as applying a hotfix to pywebview and checking if the venv is already installed
- use the
-skip-web
flag to skip installing the npm requirements and building the frontend - use the
-skip-app
flag to not create the virtual environment and install the python requirements- use the
-force-recreate-venv
flag to, well, force the virtual environment to be recreated. (ignored if-skip-app
is present) - use the
-force-package-reinstall
flag to force the python requirements to be reinstalled (ignored if-skip-app
is present)
- use the
Note Proceed with caution.
Build the React based frontend
cd .\web
npm install
- Build the frontend
npm run build
to build it once.npm run watch
when you plan on changing the Frontendnpm run report
analyze to see the bundle analysisnpm run dev
to work on the frontend with hot reload in the browser (no api connection)
cd ..
Prepare the python side of things
- create a virtual environment .venv with
python -m venv venv
- activate it using
.\venv\Scripts\activate
pip install pywebview
There are a few bugs in the pywebview
python module. Most of them are of visual nature, and we can trickily avoid them, but one bug in particular, that is related to executing the window.kill()
function when you want to close the app is resulting in an error message. The error is not relevant, as the programm is exiting anyway and from our understanding is just because the Promise that would be returned to the frontend would is not being returned (because there is no frontend anymore).
To fix this, run the libraryfix.ps1
script (only on windows).
You can also manually update the code in .\venv\Lib\site-packages\webview\util.py (~line 204).
You need to run the frontend in a separate terminal. There you
- change into the web directory
cd .\web
- build the project while watching for changes
npm run watch
.
In another terminal for the python backend:
- make sure to be in the virtual environment (run
.\venv\Scripts\activate
). - run
py main.py
Note: You can supply a few start arguments:
usage: main.py [-h] [--nogui] [--gui [{web,legacy}]]
[--loglevel [{debug,info,warning,error,critical}]]
[--debug]
[file1] [file2]
When you make changes in the frontend, restart the python script. It might be necessary to explicitly close the window before you can restart the script.
Run build.ps1
.
Note: this is currently only available on Windows. You can still run the python script locally but the building of an executable is only possible on Windows.