summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build_web_resources.py16
-rw-r--r--scripts/export_problems.py19
-rw-r--r--scripts/problem_html.py16
-rw-r--r--scripts/sqlite_to_pg.py16
-rw-r--r--scripts/trace_viewer.py16
-rw-r--r--scripts/utils.py16
6 files changed, 95 insertions, 4 deletions
diff --git a/scripts/build_web_resources.py b/scripts/build_web_resources.py
index d109eb0..1e465e0 100644
--- a/scripts/build_web_resources.py
+++ b/scripts/build_web_resources.py
@@ -1,6 +1,22 @@
#!/usr/bin/python3
# coding=utf-8
+# CodeQ: an online programming tutor.
+# Copyright (C) 2015 UL FRI
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""This tool processes all problem files, and outputs JSON files to describe
problems, to be used as static web resources. It also adds missing problem
identifiers in the database.
diff --git a/scripts/export_problems.py b/scripts/export_problems.py
index fc2c2cf..04059c3 100644
--- a/scripts/export_problems.py
+++ b/scripts/export_problems.py
@@ -1,5 +1,20 @@
#!/usr/bin/python3
-# coding=utf-8
+
+# CodeQ: an online programming tutor.
+# Copyright (C) 2015 UL FRI
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys, sqlite3, os, os.path
from .utils import filenamefy
@@ -102,4 +117,4 @@ hint = {{}}
finally:
cur.close()
finally:
- sqc.close() \ No newline at end of file
+ sqc.close()
diff --git a/scripts/problem_html.py b/scripts/problem_html.py
index 4d71b18..4e183cd 100644
--- a/scripts/problem_html.py
+++ b/scripts/problem_html.py
@@ -1,5 +1,21 @@
#!/usr/bin/python
+# CodeQ: an online programming tutor.
+# Copyright (C) 2015 UL FRI
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import sys
from server.problems import load_problem
diff --git a/scripts/sqlite_to_pg.py b/scripts/sqlite_to_pg.py
index 2405f14..5acdaee 100644
--- a/scripts/sqlite_to_pg.py
+++ b/scripts/sqlite_to_pg.py
@@ -1,6 +1,22 @@
#!/usr/bin/python3
# coding=utf-8
+# CodeQ: an online programming tutor.
+# Copyright (C) 2015 UL FRI
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import sys, json, sqlite3, psycopg2
from utils import filenamefy
diff --git a/scripts/trace_viewer.py b/scripts/trace_viewer.py
index 8758187..ebf75b7 100644
--- a/scripts/trace_viewer.py
+++ b/scripts/trace_viewer.py
@@ -1,4 +1,18 @@
-#!/usr/bin/python3
+# CodeQ: an online programming tutor.
+# Copyright (C) 2015 UL FRI
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
import curses
import sys
diff --git a/scripts/utils.py b/scripts/utils.py
index 30bbde4..a9404ce 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -1,4 +1,18 @@
-# coding=utf-8
+# CodeQ: an online programming tutor.
+# Copyright (C) 2015 UL FRI
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
import re