require "language_templates/version" module LanguageTemplates # Your code goes here.. def self.get_template(language) if LANGUAGES[language] LANGUAGES[language]['template'] else '' end end def self.get_languages LANGUAGES.keys end def template_available(language) return LANGUAGES.keys.include? language end private LANGUAGES ={ '0815' => '#/0815.0815', '1c enterprise' => '#/1c-enterprise', '2b' => '#/2B.2b', '4gl' => '#/4gl.4gl', '4test' => '#/4test', '4thdimension' => '#/4thdimension.4dd', '~english' => '#/~English.ext', 'abap' => 'a/abap.abap', 'abc' => 'a/abc.abc', 'acidic' => 'a/ACIDIC.acidic', 'acpi' => 'a/acpi', 'acronym' => 'a/ACRONYM.acronym', 'acs' => 'a/acs.acs', 'actionscript' => 'a/actionscript.as', 'actionscript2' => 'a/actionscript2.as', 'actionscript3' => 'a/actionscript3.as', 'actionscript flashmx' => 'a/actionscript_flashmx.as', 'ada' => 'a/ada.ada', 'advpl' => 'a/advpl', 'aeolbonn' => 'a/Aeolbonn.aeo', 'agda' => 'a/agda.agda', 'aheui' => 'a/aheui.aheui', 'aime' => 'a/aime.aime', 'aiml' => 'a/aiml.aiml', 'alaguf' => 'a/ALAGUF.alaguf', 'alda' => 'a/alda.alda', 'algae' => 'a/algae.algae', 'algol w' => 'a/ALGOL-W.algol', 'algol60' => 'a/algol60.algol60', 'algol68' => 'a/algol68.algol68', 'alore' => 'a/alore.alore', 'amiga e' => 'a/Amiga-E.amiga-e', 'amos' => 'a/amos', 'android' => 'a/android.java', 'angelscript' => 'a/angelscript', 'angular' => 'a/angular.js', 'ante' => 'a/ante.ante', 'antlang' => 'a/AntLang.ant', 'apc' => 'a/apc.apc', 'apl' => 'a/apl.apl', 'applescript' => 'a/applescript.scpt', 'arduino' => 'a/arduino.ino', 'arena' => 'a/arena.are', 'argh' => 'a/argh.agh', 'arnoldc' => 'a/arnoldc.arnoldc', 'ash' => 'a/ash.ash', 'asp' => 'a/asp.asp', 'assembler 6502' => 'a/assembler_6502.asm', 'assembler 6502appleii' => 'a/assembler_6502appleII.asm', 'assembler 6502c64' => 'a/assembler_6502c64.asm', 'assembler 6809vectrex' => 'a/assembler_6809vectrex.asm', 'assembler 8048 videopac' => 'a/assembler_8048_videopac.asm', 'assembler arm' => 'a/assembler_arm.s', 'assembler atari2600' => 'a/assembler_atari2600.asm', 'assembler dcpu16' => 'a/assembler_DCPU16.asm', 'assembler fasm dos' => 'a/assembler_fasm_dos.asm', 'assembler ibm360' => 'a/assembler_ibm360.asm', 'assembler intel' => 'a/assembler_intel.asm', 'assembler lc 3' => 'a/assembler_lc-3.asm', 'assembler m68000 amigaos' => 'a/assembler_m68000_amigaos.asm', 'assembler masm dos' => 'a/assembler_masm_dos.asm', 'assembler masm win32' => 'a/assembler_masm_win32.asm', 'assembler masm win64' => 'a/assembler_masm_win64.asm', 'assembler mips' => 'a/assembler_mips.asm', 'assembler mmix' => 'a/assembler_mmix.asm', 'assembler nasm freebsd' => 'a/assembler_nasm_freebsd.asm', 'assembler nasm linux' => 'a/assembler_nasm_linux.asm', 'assembler nasm linux64' => 'a/assembler_nasm_linux64.asm', 'assembler tasm dos' => 'a/assembler_tasm_dos.asm', 'assembler tms9900 ti99 4a' => 'a/assembler_tms9900_ti99_4a.asm', 'assembler vax ultrix' => 'a/assembler_vax_ultrix.asm', 'assembler z80 knightos' => 'a/assembler_z80_knightos.asm', 'assembler z80 ti83calculator' => 'a/assembler_z80_ti83calculator.asm', 'assembler z80 zxspectrum' => 'a/assembler_z80_zxspectrum.asm', 'autohotkey' => 'a/autohotkey.ahk', 'autoit' => 'a/autoit.au3', 'awk' => 'a/awk.awk', 'b' => 'b/B.b', 'bash' => 'b/bash.bash', 'basic' => 'b/basic.bas', 'batch' => 'b/batch.bat', 'batsh' => 'b/batsh.batsh', 'battlestar' => 'b/battlestar.bts', 'bcpl' => 'b/BCPL.bcl', 'beatnik' => 'b/beatnik.beatnik', 'befunge' => 'b/befunge.be', 'bennugd' => 'b/BennuGD', 'beta' => 'b/beta.bet', 'bit' => 'b/BIT.bit', 'bitbitjump' => 'b/BitBitJump.bbj', 'blackrum' => 'b/BlackRum.br', 'blc' => 'b/BLC.Blc', 'blitz3d' => 'b/blitz3d.bb', 'blub' => 'b/blub.blub', 'boo' => 'b/boo.boo', 'brainfuck 2d' => 'b/brainf-ck-2d.bf2d', 'brainfuck' => 'b/brainf-ck.bf', 'brainloller' => 'b/Brainloller.png', 'broccoli' => 'b/broccoli.brocc', 'brzrk' => 'b/BRZRK.brzrk', 'burlesque' => 'b/burlesque.burlesque', 'byter' => 'b/byter.byter', 'c++' => 'c/c++.cpp', 'c' => 'c/c.c', 'caml' => 'c/caml.ml', 'cardinal' => 'c/cardinal.cardinal', 'casio basic' => 'c/Casio BASIC', 'cat' => 'c/cat.cat', 'centura' => 'c/centura.centura', 'ceylon' => 'c/ceylon.ceylon', 'cgi' => 'c/cgi.c', 'chapel' => 'c/chapel.chpl', 'cheddar' => 'c/cheddar.cheddar', 'chef' => 'c/chef.ch', 'chicken' => 'c/chicken.chicken', 'cil' => 'c/cil.il', 'clean' => 'c/clean.icl', 'clipper' => 'c/clipper.prg', 'clips' => 'c/clips.clips', 'clisp' => 'c/clisp.lisp', 'clojure' => 'c/clojure.clj', 'cobol' => 'c/cobol.cbl', 'coconut' => 'c/coconut.coc', 'coffeescript' => 'c/coffeescript.coffee', 'coldfusion' => 'c/coldfusion.cfm', 'common lisp' => 'c/common-lisp.lisp', 'continuesequation' => 'c/ContinuesEquation.ce', 'cool' => 'c/cool.cl', 'cor' => 'c/cor.cor', 'crystal' => 'c/crystal.cr', 'csh' => 'c/csh.csh', 'c#' => 'c/csharp.cs', 'css' => 'c/css.css', 'cypherneo4j' => 'c/cypherNeo4j.cypher', # 'hello world' => 'c/hello-world.curry', #commented out because I don't know what the programming language is 'd' => 'd/d.d', 'dark' => 'd/dark.txt', 'dart' => 'd/Dart.dart', 'db2' => 'd/db2.sql', 'dc' => 'd/dc.dc', 'dcl' => 'd/DCL', 'dd dd' => 'd/dd_dd.dd', 'decimal' => 'd/Decimal.dec', 'delphi' => 'd/delphi.delphi', 'dis' => 'd/dis.dis', 'divzeros' => 'd/divzeros.dz', 'dna#' => 'd/DNA#.dna', 'dna sharp' => 'd/DNA-Sharp.dna', 'dogescript' => 'd/dogescript.djs', 'dogo' => 'd/DOGO.dogo', 'dos' => 'd/dos.bat', 'drive in window' => 'd/Drive-In Window.diw', 'dtrace' => 'd/dtrace.d', 'dup' => 'd/DUP.dup', 'dylan' => 'd/dylan.dl', 'dyvil' => 'd/Dyvil.dyv', 'ebuild' => 'e/ebuild.ebuild', 'eiffel' => 'e/Eiffel.eiff', 'elixir' => 'e/elixir.exs', 'emacslisp' => 'e/EmacsLisp.el', 'emmental' => 'e/emmental.emmental', 'emojicode' => 'e/emojicode.emojic', 'emoticon' => 'e/emoticon.emoticon', 'eoool' => 'e/EOOOL.eoool', 'erlang hw' => 'e/erlang_hw.erl', 'hello html' => 'e/hello-html.elm', 'factor' => 'f/factor.factor', 'falcon' => 'f/falcon.fal', 'false' => 'f/false.f', 'fancy' => 'f/fancy.fy', 'fantom' => 'f/fantom.fan', 'ferite' => 'f/ferite.fe', 'fish' => 'f/fish.fish', 'fjoelnir' => 'f/fjoelnir.fjo', 'fob' => 'f/fob.fob', 'focal' => 'f/focal.fc', 'fog.fog' => 'f/fog.fog.md', 'foo' => 'f/foo.foo', 'forobj' => 'f/forobj.forobj', 'forth' => 'f/forth.fth', 'fortob' => 'f/fortob.fortob', 'fortran' => 'f/fortran.f90', 'fortran77' => 'f/fortran77.f77', 'fourier' => 'f/fourier.fourier', 'fsharp' => 'f/fsharp.fs', 'gammaplex' => 'g/gammaplex.gammaplex', 'gasoil' => 'g/GASOIL.gasoil', 'gecho' => 'g/gecho.gecho', 'gentzen' => 'g/gentzen.gentzen', 'geojson' => 'g/geojson.geojson', 'gibberish' => 'g/gibberish.gibberish', 'glass' => 'g/glass.glass', 'go' => 'g/go.go', 'golfscript' => 'g/golfscript.golfscript', 'golo' => 'g/golo.golo', 'googleappscript' => 'g/googleappscript.gs', 'gosu' => 'g/gosu.gs', 'green marl' => 'g/Green-Marl.gm', 'gri' => 'g/gri.gri', 'gridscript' => 'g/GridScript.gridscript', 'grin' => 'g/grin.grin', 'groovy' => 'g/groovy.groovy', 'hack' => 'h/hack.hh', 'haskell' => 'h/haskell.hs', 'haxe' => 'h/haxe.hx', 'hex' => 'h/HEX.hex', 'hexish' => 'h/hexish.hexish', 'higher subleq' => 'h/Higher Subleq.higher_subleq', 'hodor' => 'h/hodor.hd', 'hollow' => 'h/hollow.hollow', 'homespring' => 'h/homespring.homespring', 'hop' => 'h/HOP', 'hq9+' => 'h/hq9+.h', 'html' => 'h/html.html', 'hy' => 'h/hy.hy', 'hypertalk' => 'h/hypertalk.ht', 'ibm1401' => 'i/ibm1401', 'icedcoffeescript' => 'i/IcedCoffeeScript.ics', 'ici' => 'i/ici.ici', 'icon' => 'i/icon.icn', 'idl' => 'i/IDL', 'idris' => 'i/idris.idr', 'il' => 'i/il.il', 'incal' => 'i/INCAL.incal', 'indec' => 'i/InDec.indec', 'inform' => 'i/inform.inform', 'ink' => 'i/ink.ink', 'intercal' => 'i/intercal.i', 'io' => 'i/Io.Io', 'ioke' => 'i/ioke.ik', 'irc' => 'i/irc', 'iscom' => 'i/iscom.iscom', 'islisp' => 'i/ISLISP.lisp', 'j' => 'j/j.ijs', 'jade' => 'j/jade.jade', 'jai' => 'j/jai.jai', 'jasmin' => 'j/Jasmin.j', 'jason' => 'j/jason.mas2j', 'java' => 'j/Java.java', 'javascript' => 'j/javascript.js', 'jess' => 'j/jess.cpl', 'jsf*ck' => 'j/JSF*ck.js', 'json' => 'j/json.json', 'jsoniq' => 'j/JSONiq', 'jsx' => 'j/jsx.js', 'julia' => 'j/julia.jl', 'k' => 'k/k.k', 'karel' => 'k/karel.kl', 'kiml' => 'k/KimL.kiml', 'kipple' => 'k/kipple.kipple', 'kitten' => 'k/kitten.ktn', 'kotlin' => 'k/kotlin.kt', 'ksh' => 'k/ksh.ksh', 'labyrinth' => 'l/labyrinth.labyrinth', 'latex' => 'l/LaTeX.tex', 'lazyk' => 'l/LazyK.lazy', 'leszek' => 'l/leszek.leszek', 'limbo' => 'l/limbo.b', 'lisaac' => 'l/lisaac.li', 'lisp' => 'l/lisp.lsp', 'livescript' => 'l/livescript.ls', 'llvm' => 'l/llvm.ll', 'lnusp' => 'l/LNUSP.lnusp', 'logical' => 'l/logical.logical', 'logo' => 'l/logo.lg', 'lola' => 'l/LOLA.lola', 'lolcode' => 'l/lolcode.lol', 'lolpython' => 'l/lolpython.lol', 'lsl' => 'l/lsl.lsl', 'lua' => 'l/lua.lua', 'm4' => 'm/m4.m4', 'macsyma' => 'm/macsyma.mac', 'magic' => 'm/magic', 'malbolge' => 'm/malbolge.mbg', 'markdown' => 'm/markdown.md', 'mathematica online' => 'm/mathematica-online.nb', 'matlab' => 'm/matlab.m', 'maxscript' => 'm/maxscript.ms', 'mel' => 'm/mel.mel', 'meq' => 'm/meq.meq', 'mercury' => 'm/mercury.m', 'mirc' => 'm/mirc.mrc', 'mmmm()' => 'm/Mmmm().mmmm', 'modula 2' => 'm/modula-2.mod', 'modula 3' => 'm/modula-3.m3', 'mongo' => 'm/mongo.shell', 'moonscript' => 'm/moonscript.moon', 'morsecode' => 'm/morsecode', 'mouse' => 'm/mouse.mse', 'move' => 'm/move.mv', 'mozart' => 'm/mozart.oz', 'muf' => 'm/muf.muf', 'mumps' => 'm/mumps.m', 'mushcode' => 'm/mushcode.mush', 'myrddin' => 'm/myrddin.myr', 'mysql' => 'm/mysql.sql', 'neko' => 'n/neko.neko', 'nemerle' => 'n/nemerle.n', 'newtonscript' => 'n/newtonscript.nwt', 'nice' => 'n/nice.nice', 'nim' => 'n/nim.nim', 'nit' => 'n/nit.nit', 'node' => 'n/node.js', 'nodejs' => 'n/nodejs.js', 'novice' => 'n/novice.novice', 'nu' => 'n/nu.nu', 'nxc' => 'n/nxc.nxc', 'oberon 2' => 'o/oberon-2.obn', 'oberon' => 'o/oberon.o', 'obix' => 'o/obix.osc', 'obj' => 'o/obj.st', 'objc' => 'o/objc.m', 'objective c' => 'o/ObjectiveC.m', 'objective j' => 'o/objective-j.j', 'objectstar' => 'o/ObjectStar', 'ocaml' => 'o/ocaml.ml', 'octave' => 'o/octave.octave', 'omgrofl' => 'o/omgrofl.omgrofl', 'ooc' => 'o/ooc.ooc', 'ook' => 'o/ook.ok', 'opa' => 'o/opa.opa', 'openlaszlo' => 'o/OpenLaszlo.lzx', 'oraclesql' => 'o/oraclesql.sql', 'orc' => 'o/Orc.orc', 'oz' => 'o/oz.oz', # 'hello world' => 'p/hello_world.pl1', #commented out because I don't know what the real programming language is 'parenthetic' => 'p/parenthetic.p', 'pascal' => 'p/pascal.p', 'pawn' => 'p/pawn.p', 'pb' => 'p/pb.pwr', 'pbwin' => 'p/pbwin.bas', 'pebble' => 'p/pebble.c', 'perl cgi' => 'p/perl.cgi', 'perl' => 'p/perl.pl', 'perl6' => 'p/perl6.p6', 'perseus' => 'p/perseus.p++', 'pharo' => 'p/pharo.st', 'php' => 'p/php.php', 'picat' => 'p/picat.pi', 'piet' => 'p/piet.png', 'pig' => 'p/pig.pig', 'pike' => 'p/pike.pike', 'pit' => 'p/pit.pit', 'pizza' => 'p/pizza.pizza', 'please porige hot' => 'p/please_porige_hot.pph', 'plsql' => 'p/plsql.sql', 'pluvo' => 'p/pluvo.pvo', 'polynomial' => 'p/polynomial.pol', 'pony' => 'p/pony.pony', 'postgresql' => 'p/postgresql.sql', 'postscript' => 'p/postscript.ps', 'postscript page' => 'p/postscript_page.ps', 'posxml' => 'p/posxml.posxml', 'potigol' => 'p/potigol.poti', 'powershell' => 'p/powershell.ps1', 'processing' => 'p/processing.pde', 'prolog' => 'p/prolog.pro', 'purebasic' => 'p/purebasic.pb', 'purescript' => 'p/purescript.purs', 'pyret' => 'p/pyret.arr', 'python' => 'p/python.py', 'python3' => 'p/python3.py', 'q' => 'q/q.q', 'qbasic' => 'q/Qbasic.bas', 'qore' => 'q/qore.q', 'qu' => 'q/qu.qu', 'quakec' => 'q/QuakeC.qc', 'quartzcomposer' => 'q/QuartzComposer.qtz', 'qugord' => 'q/qugord.qugord', 'qwerty' => 'q/qwerty.qwerty', 'r' => 'r/R.R', 'racket' => 'r/racket.rkt', 'radixal' => 'r/radixal.radixal', 'ratfor' => 'r/ratfor.ratfor', 'react' => 'r/react.js', 'reason' => 'r/reason.re', 'rebol' => 'r/rebol.r', 'recurse' => 'r/recurse.recurse', 'restructuredtext' => 'r/reStructuredText.rst', 'rexx' => 'r/rexx.rexx', 'richtea' => 'r/richtea.tea', 'roco' => 'r/roco.roco', 'roy' => 'r/roy.roy', 'ruby' => 'r/ruby.rb', 'rust' => 'r/rust.rs', 'hello' => 's/hello.st', 's algol' => 's/S-algol', 'sacred' => 's/sacred.sacred', 'sal' => 's/sal.s', 'sas' => 's/sas.sas', 'sather' => 's/sather.sa', 'scala' => 's/scala.scala', 'scheme' => 's/scheme.scm', 'schwift' => 's/schwift.y', 'scilab' => 's/scilab.scilab', 'scratch' => 's/scratch.sb', 'sed' => 's/sed.sed', 'self' => 's/self.self', 'semicolon' => 's/semicolon', 'sendstuff' => 's/SendStuff.ss', 'shakespeare' => 's/shakespeare.spl', 'shell' => 's/shell.sh', 'shen' => 's/shen.shen', 'sil' => 's/SIL.SIL', 'simpl+' => 's/simpl+.usp', 'simula' => 's/simula.sim', 'slashes' => 's/slashes.slashes', 'smali' => 's/smali.smali', 'smalltalk' => 's/smalltalk.sm', 'smil' => 's/smil.smil', 'sml' => 's/sml.sml', 'snowman' => 's/snowman.sm', 'soupscript' => 's/soupscript.script', 'sparql' => 's/sparql.sparql', 'spoon' => 's/spoon.spoon', 'spss' => 's/spss.spss', 'sql' => 's/sql.sql', 'squirrel' => 's/squirrel.nut', 'standard ml' => 's/standard-ml.sml', 'stanza' => 's/stanza.stanza', 'streem' => 's/streem.strm', 'stuck' => 's/stuck.stuck', 'stuck 0byte' => 's/stuck_0byte.stuck', 'subleq' => 's/subleq.sq', 'supercollider' => 's/supercollider.sc', 'svg' => 's/svg.svg', 'swift' => 's/swift.swift', 'systemtap' => 's/systemtap.stp', 'plain text' => 't/plain-text.txt', 'tao presentations' => 't/Tao-Presentations.ddd', 'tapebagel' => 't/TapeBagel.tb', 'tcl' => 't/tcl.tcl', 'tcsh' => 't/tcsh.tcsh', 'telephone' => 't/telephone', 'tex' => 't/TeX.tex', 'thp' => 't/thp.hrp', 'thue' => 't/thue.th', 'tibasic' => 't/tibasic.ti', 'tk' => 't/tk.tk', 'tri' => 't/tri.tri', 'trollscript' => 't/trollscript.troll', 'trumpscript' => 't/TrumpScript.py', 'tsql' => 't/tsql.sql', 'ttcn3' => 't/TTCN3.ttcn', 'turing' => 't/Turing.t', 'typescript' => 't/typescript.ts', 'ubercode' => 'u/Ubercode.cls', 'ubiquity' => 'u/ubiquity.ubiquity', 'umajin' => 'u/umajin.u', 'unicomal' => 'u/unicomal.lst', 'unlambda' => 'u/unlambda.unl', 'v' => 'v/V', 'vala' => 'v/vala.vala', 'vb.net' => 'v/vbnet.vb', 'verbose' => 'v/verbose.verbose', 'verbosefuck' => 'v/verbosefuck.vbfk', 'verilog' => 'v/verilog.v', 'verve' => 'v/verve.vrv', 'vhdl' => 'v/vhdl.vhdl', 'vi' => 'v/vi', 'vimscript' => 'v/vimscript.vim', 'virgil' => 'v/virgil.v3', 'visualbasic' => 'v/visualbasic.vb', 'visualbasicscript' => 'v/visualbasicscript.vbs', 'visualfoxpro' => 'v/visualfoxpro.prg', 'vms' => 'v/vms.vms', 'vrml' => 'v/vrml.wrl', 'wheat' => 'w/wheat.wheat', 'whenever' => 'w/whenever.whenever', 'whirl' => 'w/whirl.wr', 'whitespace' => 'w/whitespace.ws', 'wml' => 'w/wml.wml', 'wolframlanguage' => 'w/wolframlanguage.wl', 'wren' => 'w/wren.wren', 'wsh' => 'w/wsh.vbs', 'x d' => 'x/x-D.xd', 'xbase++' => 'x/xbase++.prg', 'xbase' => 'x/xbase.dbf', 'xl' => 'x/xl.xl', 'xlogo' => 'x/xlogo.lgo', 'xml' => 'x/xml.xml', 'xpl0' => 'x/xpl0.xpl', 'xquery' => 'x/xquery.xq', 'xrf' => 'x/XRF.xrf', 'xslt' => 'x/xslt.xslt', 'xul' => 'x/xul.xul', 'y' => 'y/Y.y', 'yaml' => 'y/yaml.yaml', 'yolang' => 'y/yolang.yo', 'zbd' => 'z/zbd', 'zepto' => 'z/zepto.zp', 'zetaplex' => 'z/zetaplex.zeta', 'zim' => 'z/zim.zim', 'zimbu' => 'z/zimbu.zu', 'zombie' => 'z/zombie.zombie', 'zonnon' => 'z/zonnon.znn', 'zsh' => 'z/zsh.zsh', }.map{ |key, val| [ key, { 'file' => File.join(File.dirname(__dir__), 'bin', 'languages', *(val.split('/'))), 'template' => File.read(File.join(File.dirname(__dir__), 'bin', 'languages', *(val.split('/')))) } ] }.to_h end