Skip to main content

Trollformatter: Troll your fellow devs and compsci teachers

Ever wanted to troll someone by formatting your C/C++/Java code like this?

ew.jpg

Well now you can.

What is this?

Trollformatter is a formatter inspired by the image above. It basically moves all your semicolons, braces, etc. to the edge of the file to make it appear to not have semicolons or braces. The generated code looks much cleaner (/s), and still runs the same as the original file.

DISCLAIMER: DO NOT USE THIS IN ANY KIND OF PRODUCTION ENVIRONMENT. THE TROLLFORMATTER PROGRAM IS IN ALPHA AND IS NOT GUARANTEED TO WORK PROPERLY AT ALL TIMES. THE DEVELOPERS OF THIS PROGRAM ARE NOT RESPONSIBLE IF YOU LOSE YOUR JOB OR GET A FAILING GRADE BECAUSE YOU USED THIS.

How do I run Trollformatter?

HEADS UP! Trollformatter is now available on PyPI! To install via PyPI (recommended):

  1. Get Python.
  2. Get the pip package manager.
  3. Run pip3 install trollformatter.

To install via source (for development or latest version):

  1. Get Python.
  2. Run python3 setup.py install. (you may need sudo or --user).

To run:

  1. Get your code.
  2. Run trollformatter file.java (or .c or .cpp)
  3. Check the file_troll.java file. If you are satisfied with the result, you may remove the original and rename this one.
  4. Watch your compsci teacher explode.

Sounds interesting. How can I contribute?

If you want to help out the trollformatter project, check out the issues board on Gitlab (or test the program and log undiscovered issues). You can assign an issue to yourself, fork the project, and send in a merge request when you're ready to merge your code.

Metadata

Release files for trollformatter 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trollformatter 1.0.2
File Size Uploaded
trollformatter-1.0.2.tar.gz 15.6 kB Details

Release files / trollformatter-1.0.2.tar.gz

Download URL trollformatter-1.0.2.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
502f66c6c9cabe735814e74b5c48059bc2eee96649f91acbe5b40f16a070d027
BLAKE2b-256 checksum
How to use checksums
625f8ade37258f73592335099b6a7f7ba901ef29bb9489270fab493638fa4882
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page