New generation of Canvas Helper backend. Web-based, support Linux, Windows and MacOS.
- Python >= 3.7
If you only want to run the backend on your machine and use the frontend on our server, do the following:
- Follow documentation, run the backend at port
9283
- Go to https://canvashelper2.web.app/canvashelper/ to configure your CanvasHelper
- Go to https://canvashelper2.web.app/ to see the final result
- Deploy Canvas Helper on your desktop with wiget
If you want to setup frontend by yourself or contribute to this project, you have to do mainly 3 steps:
- Run the backend
- Run
CanvasHelper2-conf
and configure CanvasHelper in the browser - Run an HTTP server to host the static HTML files (or develop your own dashboard frontend)
First, clone this repository:
git clone https://github.com/linsyking/CanvasHelper2.git
cd CanvasHelper2
Then install the dependencies. It is recommended to use a virtual environment for installation:
python -m venv env # You may want to change `python` to `python3` or other python binaries
source env/bin/activate # You may want to change the activation script according to your shell
pip install -r requirements.txt
If you don't want to change any settings (like CORS), you can directly run: (If you want to use frontend on our server, you must use 9283
port)
uvicorn canvas_app:app --port 9283
For development, you probably need to use:
uvicorn canvas_app:app --reload
to automatically reload the api when the script is modified.
If you need to expose the port, you can add option --host 0.0.0.0
.
If you want to use the frontend on our server, go to: here. (Site might be changed in the future)
Otherwise, go to CanvasHelper2-conf for more details.
If you want to see the result without hosting HTML files, you can directly go to here.
You can use any http server you like to host the static html file.
The sample dashboard frontend is at https://github.com/linsyking/CanvasHelper2-dashboard.
You can clone that repository and host those files by
python3 -m http.server 9282
Now go to page http://localhost:9282 to see the result!
Subscribe template wallpaper: https://steamcommunity.com/sharedfiles/filedetails/?id=2913474561.
After you started the backend locally, it will redirect to the here. You can also change it to your local frontend.
To start the backend on startup, you can do the following:
- Win+R, type
shell:startup
- In the opened window, create a file called
canvashelper.vbs
Its content should be like this:
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\XXX\canvashelper.bat" & Chr(34), 0
Set WinScriptHost = Nothing
Replace C:\XXX\canvashelper.bat
with a better path where you store a bat
file which is used to launch the CanvasHelper.
That bat file must be in C drive.
- Create that
C:\XXX\canvashelper.bat
file with the following content:
@echo off
d:
cd D:\Project\CanvasHelper2
uvicorn canvas_app:app --port 9283
Replace d:
and D:\Project\CanvasHelper2
with your own directory.
(If your clone directory is in C, then you don't need d:
to enter drive D)
After that, your system will run this script on startup.
Note: some features in wallpaper engine are not well-supported, including scrolling.
- Install wallpaper-engine-kde-plugin.
- Download the canvas wallpaper https://steamcommunity.com/sharedfiles/filedetails/?id=2913474561.
- You should be able to see the wallpaper.
- Add a startup script to run the backend.
Note: scrolling is also not supported.
Result:
(Another dashboard frontend)
TO-DO
- What's the difference between CanvasHelper and CanvasHelper 2?
CanvasHelper 1 is centralized while CanvasHelper 2 is not. It is completely local so you don't have to connect to our server to use CanvasHelper. Moreover, CanvasHelper 2 provides a handy web interface for configuring courses. CanvasHelper 2 separates frontend and backend so that you can develop your own dashboard frontend on any operating system/desktop environment.
- What's the relationship between Canvas Helper backend, frontend, and dashboard?
The backend provides several APIs for frontend and dashboard to call; frontend uses the local APIs to configure Canvas Helper. The dashboard also calls the local backend to get the configuration.
- Do I have to use the sample dashboard frontend?
No. You can develop your own dashboard frontend. The sample dashboard frontend uses the HTML output from this backend and displays it in a draggable box.