Skip to content

Commit

Permalink
Send raw compiler ANSI output to the site; #478
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyene committed Sep 29, 2019
1 parent 877c036 commit a6a1a74
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions dmoj/utils/ansi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import re

import ansi2html
from termcolor import colored

from dmoj.utils.unicode import utf8text
Expand All @@ -11,10 +10,6 @@ def strip_ansi(s):
return re.sub(r'\x1b\[([0-9,A-Z]{1,2}(;[0-9]{1,2})?(;[0-9]{3})?)?[m|K]?', '', s)


def format_ansi(s):
return ansi2html.Ansi2HTMLConverter(inline=True).convert(utf8text(s), full=False)


def ansi_style(text):
from dmoj.judgeenv import no_ansi

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
watchdog
pyyaml
ansi2html
termcolor
cython
pygments
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def unavailable(self, e):
],
},
ext_modules=cythonize(extensions),
install_requires=['watchdog', 'pyyaml', 'ansi2html', 'termcolor', 'pygments', 'setproctitle', 'pylru'],
install_requires=['watchdog', 'pyyaml', 'termcolor', 'pygments', 'setproctitle', 'pylru'],
tests_require=['requests'],
extras_require={
'test': ['requests'],
Expand Down

0 comments on commit a6a1a74

Please # to comment.