Skip to content

brianbbsu/md2cms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRs Welcome

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).

Example

This dashboard can convert task statement from HackMD (In Markdown):

HackMD Statement

To PDF:

PDF Statement

Dashboard Screenshot

Dashboard screenshot

Prerequisites

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.

Installing

  1. Clone this repo.
  2. Copy example.config.php into config.php, modify it according to your setup.
  3. Configure your web server (Apache, Nginx, etc.) to serve public folder, make sure the root folder is readable and writable by your web server.

How To Use

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.

Issue

In case of any issue, open new issue here or IM me. PRs are welcome!

About

A dashboard to manage CP task statements on HackMD for Contest Management System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published