-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlanguages.py
83 lines (77 loc) · 1.41 KB
/
languages.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
languages = {
"HTML":"html",
"CSS":"css",
"JavaScript":"js",
"Python":"py",
"Java":"java",
"C":"c",
"C++":"cpp",
"C#":"cs",
"JSON":"json",
"SVG":"svg",
"CSV":"csv",
"Plain Text":"txt"
}
modes = {
"html":"html",
"css":"css",
"js":"javascript",
"py":"python",
"java":"java",
"c":"c_cpp",
"cpp":"c_cpp",
"cs":"csharp",
"json":"json",
"svg":"html",
"csv":"text",
"txt":"text"
}
filetypes = {
"html":"text/html",
"css":"text/css",
"js":"text/javascript",
"py":"text/x-python-script",
"java":"text/plain",
"c":"text/plain",
"cpp":"text/plain",
"cs":"text/plain",
"json":"application/json",
"svg":"image/svg+xml",
"csv":"text/csv",
"txt":"text/plain"
}
filestarts = {
"html":"""<!DOCTYPE html>
<html>
<head></head>
<body></body>
</html>""",
"css":"""body {
}""",
"js":"",
"py":"",
"java":"""public class FILENAME {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}""",
"c":"""#include <stdio.h>
int main(void) {
printf("Hello World");
return 0;
}""",
"cpp":"""#include <iostream>
int main() {
std::cout << "Hello World!";
}""",
"cs":"""using System;
class MainClass {
public static void Main (string[] args) {
Console.WriteLine ("Hello World");
}
}""",
"json":"{}",
"svg":"""<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" xml:space="preserve"></svg>""",
"csv":"",
"txt":""
}