{"id":18403568,"url":"https://github.com/judy2k/moncode","last_synced_at":"2026-04-29T00:33:06.308Z","repository":{"id":57442865,"uuid":"266150527","full_name":"judy2k/moncode","owner":"judy2k","description":"Format code for MongoDB slides","archived":false,"fork":false,"pushed_at":"2020-05-24T11:10:55.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T19:43:27.734Z","etag":null,"topics":["code","developer-tools","formatter","mongodb","slides"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/judy2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-22T15:58:05.000Z","updated_at":"2021-04-14T11:19:24.000Z","dependencies_parsed_at":"2022-09-04T22:21:23.087Z","dependency_job_id":null,"html_url":"https://github.com/judy2k/moncode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judy2k%2Fmoncode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judy2k%2Fmoncode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judy2k%2Fmoncode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judy2k%2Fmoncode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/judy2k","download_url":"https://codeload.github.com/judy2k/moncode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248606048,"owners_count":21132293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code","developer-tools","formatter","mongodb","slides"],"created_at":"2024-11-06T02:47:27.784Z","updated_at":"2026-04-29T00:33:01.288Z","avatar_url":"https://github.com/judy2k.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moncode\n\nMoncode is a small CLI tool which takes source code from the clipboard,\nformats it using the MongoDB presentation color-scheme and code font,\nand then puts the result back on the clipboard.\n\nThe result looks a bit like this:\n\n![A Python slide with lovely syntax-highlighted code.](assets/python_slide.png)\n\n## Installing it\n\nI recommend you use [pipx](https://pipxproject.github.io/pipx/)\nto install moncode as a command-line tool.\nIf you have pipx you can install it like this:\n\n```bash\npipx install moncode\n```\n\nIf you don't want to install pipx, you can install it with pip,\nbut it's not really recommended:\n\n```bash\n# This will install moncode into your system python:\npip install moncode\n```\n\n## Using it\n\nMoncode is fully documented.\nThe command you'll probably use most is `format`, like this:\n\n### moncode format\n\nThis is the way I use it:\n\n1. Copy some Python code from my IDE\n2. Run `moncode format -l python` in a terminal window.\n   Now the Python code in my clipboard has been repaced by syntax-highlighted Python code.\n3. Paste the result into Google Slides (or Powerpoint or whatever.)\n\nThere are a bunch of other ways to use the tool,\ntaking input from stdin or a file on disk,\nand sending the results to stdout or a file on disk.\nThe command options are fully documented:\n\n```bash\n# Copy code from the clipboard, format it as RTF and then copy the result to the clipboard.\nmoncode format\n\n# Specify the language if the guess is wrong:\nmoncode format --language ruby\n\n# Read code from stdin and copy result to clipboard:\ncat sample_inputs/sample.js | moncode format\n\n# Read from sample.py and write to output.rtf:\nmoncode format -i sample.py -o output.rtf\n\n# Read from the clipboard, and write to stdout:\nmoncode format -o -\n\n# Format the code from the clipboard as HTML and write to output.html\nmoncode format -o output.html -f html\n```\n\n```text\nOptions:\n  -l, --language TEXT      The programming language to be formatted. If not\n                           supplied, this will be guessed from the file name\n                           or content. It's better to supply it if you can.\n                           Run `moncode languages` to see a list of supported\n                           input languages.\n\n  -i, --input FILENAME     The path to a code file to be formatted. If not\n                           supplied, either code will be read from stdin, or\n                           else copied from the clipboard.\n\n  -o, --output FILENAME    The path to write output to.\n  -f, --format [html|rtf]  The output format. Defaults to 'rtf' (which is good\n                           for copy-pasting).\n\n  -q, --quiet              Run quietly.\n  -v, --verbose            Run loudly.\n  --help                   Show this message and exit.\n```\n\nWhen running `moncode format`, I recommend you pass the `-l` flag,\nspecifying the programming language of the input code.\nIf you don't, moncode will guess the language, and likely get it wrong.\nWhat languages are supported?\nGlad you asked...\n\n### moncode languages\n\nTo get a list of all the supported input languages, run `moncode languages`.\nThe result will look something like this...\n\n```text\n$ moncode languages\nabap, abnf, ada, adl, agda, aheui, ahk, alloy, ampl, antlr, antlr-as, antlr-cpp, antlr-csharp, antlr-java, antlr-objc, antlr-perl, antlr-python, antlr-ruby, apacheconf, apl, applescript, arduino, as, as3, aspectj, aspx-cs, aspx-vb, asy, at, augeas, autoit, awk\nbasemake, bash, bat, bbcbasic, bbcode, bc, befunge, bib, blitzbasic, blitzmax, bnf, boa, boo, boogie, brainfuck, bst, bugs\nc, c-objdump, ca65, cadl, camkes, capdl, capnp, cbmbas, ceylon, cfc, cfengine3, cfm, cfs, chai, chapel, charmci, cheetah, cirru, clay, clean, clojure, clojurescript, cmake, cobol, cobolfree, coffee-script, common-lisp, componentpascal, console, control, coq, cpp, cpp-objdump, cpsa, cr, crmsh, croc, cryptol, csharp, csound, csound-document, csound-score, css, css+django, css+erb, css+genshitext, css+lasso, css+mako, css+mozpreproc, css+myghty, css+php, css+smarty, cucumber, cuda, cypher, cython\nd, d-objdump, dart, dasm16, delphi, dg, diff, django, docker, doscon, dpatch, dtd, duel, dylan, dylan-console, dylan-lid\nearl-grey, easytrieve, ebnf, ec, ecl, eiffel, elixir, elm, emacs, email, erb, erl, erlang, evoque, extempore, ezhil\nfactor, fan, fancy, felix, fennel, fish, flatline, floscript, forth, fortran, fortranfixed, foxpro, freefem, fsharp\ngap, gas, genshi, genshitext, glsl, gnuplot, go, golo, gooddata-cl, gosu, groff, groovy, gst\nhaml, handlebars, haskell, haxeml, hexdump, hlsl, hsail, hspec, html, html+cheetah, html+django, html+evoque, html+genshi, html+handlebars, html+lasso, html+mako, html+myghty, html+ng2, html+php, html+smarty, html+twig, html+velocity, http, hx, hybris, hylang\ni6t, icon, idl, idris, iex, igor, inform6, inform7, ini, io, ioke, irc, isabelle\nj, jags, jasmin, java, javascript+mozpreproc, jcl, jlcon, js, js+cheetah, js+django, js+erb, js+genshitext, js+lasso, js+mako, js+myghty, js+php, js+smarty, jsgf, json, json-object, jsonld, jsp, julia, juttle\nkal, kconfig, kmsg, koka, kotlin\nlagda, lasso, lcry, lean, less, lhs, lidr, lighty, limbo, liquid, live-script, llvm, llvm-mir, llvm-mir-body, logos, logtalk, lsl, lua\nmake, mako, maql, mask, mason, mathematica, matlab, matlabsession, md, mime, minid, modelica, modula2, monkey, monte, moocode, moon, mosel, mozhashpreproc, mozpercentpreproc, mql, ms, mscgen, mupad, mxml, myghty, mysql\nnasm, ncl, nemerle, nesc, newlisp, newspeak, ng2, nginx, nim, nit, nixos, notmuch, nsis, numpy, nusmv\nobjdump, objdump-nasm, objective-c, objective-c++, objective-j, ocaml, octave, odin, ooc, opa, openedge\npacmanconf, pan, parasail, pawn, peg, perl, perl6, php, pig, pike, pkgconfig, plpgsql, pony, postgresql, postscript, pot, pov, powershell, praat, prolog, properties, protobuf, ps1con, psql, pug, puppet, py2tb, pycon, pypylog, pytb, python, python2\nqbasic, qml, qvto\nracket, ragel, ragel-c, ragel-cpp, ragel-d, ragel-em, ragel-java, ragel-objc, ragel-ruby, raw, rb, rbcon, rconsole, rd, reason, rebol, red, redcode, registry, resource, rexx, rhtml, ride, rnc, roboconf-graph, roboconf-instances, robotframework, rql, rsl, rst, rts, rust\nsarl, sas, sass, sc, scala, scaml, scdoc, scheme, scilab, scss, sgf, shen, shexc, sieve, silver, slash, slim, slurm, smali, smalltalk, smarty, sml, snobol, snowball, solidity, sourceslist, sp, sparql, spec, splus, sql, sqlite3, squidconf, ssp, stan, stata, swift, swig, systemverilog\ntads3, tap, tasm, tcl, tcsh, tcshcon, tea, termcap, terminfo, terraform, tex, text, thrift, todotxt, toml, trac-wiki, treetop, ts, tsql, ttl, turtle, twig, typoscript, typoscriptcssdata, typoscripthtmldata\nucode, unicon, urbiscript, usd\nvala, vb.net, vbscript, vcl, vclsnippets, vctreestatus, velocity, verilog, vgl, vhdl, vim\nwdiff, webidl, whiley\nx10, xml, xml+cheetah, xml+django, xml+erb, xml+evoque, xml+lasso, xml+mako, xml+myghty, xml+php, xml+smarty, xml+velocity, xorg.conf, xquery, xslt, xtend, xul+mozpreproc\nyaml, yaml+jinja\nzeek, zephir, zig\n```\n\nPhew! That's a lot of languages, isn't it?\nAny of these values are supported by the `-l` option to `moncode format`\n\n## Development\n\nRun the following to install the project (and dev dependencies) into your active virtualenv:\n\n```bash\npip install -e .[dev]\n```\n\nRun tests with:\n\n```bash\nmake test\n```\n\nRun tests under different versions of Python with:\n\n```bash\ntox\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjudy2k%2Fmoncode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjudy2k%2Fmoncode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjudy2k%2Fmoncode/lists"}