- BackEnd
- Python3.6+ --- The operating environment of the server program
- Flask2.0+ --- Server-side framework
- Canvasapi --- Access the canvas API through the public key requested by the user
- Watermarking
- Reportlab ---Use OSU's logo and encrypted identification information to generate a watermark
- PyPDF2 ---Merge source files and watermark files
- FrontEnd
- Canvas LMS --- Learning management system
- XMLHttpRequest ---Send a watermark request
Please use the official python Interpreter(cpython)!!!!!!!
Official Download
pip install
Launch URL: https://{host}/upload
Consumer Key: N/A
Reuquire Instructors Get a client ID from
Canvas -> Account -> Settings -> Approved Integrations -> "+New Access Token"
clientID={Super Secret}
account_id=$Canvas.account.id
base_url=$Canvas.api.baseUrl
course_id = $Canvas.course.id
logo_url=https://oregonstate.edu/themes/osu/homepage/logo.svg
domain=$Canvas.api.domain
group_context_ids=$Canvas.group.contextIds
membership_service_url=$ToolProxyBinding.memberships.url
time_zone=$Person.address.timezone
user_id=$Canvas.user.id
python3 main.py
The watermarker allows user customizetheir watermark within certain limits
# config.ini
[Default]
alpha = 0.1
Font = Helvetica
FontSize = 14
# Color 0.0 - 1.0
FontColorR = 0.4
FontColorG = 0.5
FontColorB = 0.3
PageWidth = 300
PageHeight = 500
We expect that the work of adding watermarks can be further scripted, just like we tried in config.ini.
- Receive user data as form-data from canvas
- Response a Interface
- Send PDF to server with requested information
- Watermarking PDF with encoded information from user
- Resonse(200) if uploaded
- Send download request from Canvas
- Send watermarked PDF back
- Open the course page on Canvas
- Double click the app you created
- Choose a asssignment you wanna watermark
- Upload a file
- Tah Dah!!!!👻👻👻👻👻