A dashboard to manage CP task statements on HackMD for Contest Management System
This dashboard helps you manage your CP task statements on HackMD, converting markdown to pdf with LaTeX, and syncing task statement in Contest Management System (CMS).
This dashboard can convert task statement from HackMD (In Markdown):
To PDF:
- PHP
- Pandoc
- XeTeX
- Contest Management System
- Configured and cmsInit-ed PostgreSQL server
Tested on Ubuntu 18.04, PHP 7.2.15, Pandoc 1.19.2, XeTeX 3.14159265, CMS v.1.3 rc0, PostgreSQL 9.5.14.
- Clone this repo.
- Copy
example.config.php
intoconfig.php
, modify it according to your setup. - Configure your web server (Apache, Nginx, etc.) to serve
public
folder, make sure the root folder is readable and writable by your web server.
Statements on HackMD should contains customized YAML metadata header, see example.md
for more information.
After setting up, open index.php
with your browser. Each row in the table represents one task.
Explanation:
- ID: Internal ID of the task. Click to open corresponding HackMD note in new tab.
- Short Name: Short name of the task, extracted from markdown header. The dashboard uses this short name to find corresponding cms task.
- Preview: Click to view PDF statement in new tab, automatically re-compiles if changes are made.
- CMS Task Name: Task title set in CMS.
- Same as Hackmd: Indicates whether task statement for this task is the same as that on HackMD.
- Replace: Click to replace statement for this task in CMS with newer version, automatically re-compiles if changes are made.
In case of any error, I haven't setup error logging and error reporting, so you may need to head over to server log or inspect ajax response with browser developer tool yourself.
In case of any issue, open new issue here or IM me. PRs are welcome!