Resource Programming in MS Paint [UPDATED]

Discussion in 'Spigot Plugin Development' started by RubbaBoy, Dec 11, 2017.

  1. People joke about what IDE they use often, things like Word, MS Notepad, sometimes even Eclipse, and then often times MS Paint. People joke about MS Paint because it's not even a text editor, people joke about it because it doesn't have one feature in common with IDEs. Well, this application gives MS Paint a boost, and lets MS Paint highlight, compile, and execute code, with just a few clicks of a button, and only text coming from MS Paint. It is now much more practical than things like Word, Notepad, and obviously Eclipse.

    Links:
    Website | GitHub | Demo video

    How it works
    There is now an installation and demo video, for anything not explained fully here, or just for those who want to see the IDE in action:


    MS Paint IDE can be used in two different ways. You can either just run the jar (Following the instructions below), or you can run the installer as administrator, which provides a much cleaner way of using the program, and also allows you to right click any text file and edit it with MS Paint.

    Usage Tutorial
    First to open the program, if you intend to compile your application, you must run the jar from your JDK. This can be done by doing something like C:\Program Files\Java\jdk1.8.0_144\bin\java.exe -jar MSPaintIDE-2.0-SNAPSHOT.jar in your command line. This should be modified for your location of java.exe in your JDK's directory.

    With the Installer
    The easiest way of using MS Paint IDE is via the installer. All is required for you to do is run the commandprompt as administrator, and run java -jar MSPaintIDE.jar install with MSPaintIDE.jar pointing to your downloaded MS Paint IDE jar. It will then remove the downloaded file and replace it with a shortcut with an icon. The shortcut is bound to ran with your latest installed JDK on your machine, so running the IDE doesn't require anything but running the shortcut. To uninstall the program, all is needed is to run the uninstaller in %LocalAppData%\MSPaintIDE.

    Without the Installer
    First to open the program, if you intend to compile your application, you **must** run the jar from your JDK. This can be done by doing something like "C:\Program Files\Java\jdk1.8.0_144\bin\java.exe" -jar MSPaintIDE-2.1.1-SNAPSHOT.jar in your commandline. This should be modified for your location of `java.exe` in your JDK's directory.

    After Initial Installation
    Before you do anything with highlighting, compiling and executing, you must set some paths first. You can manually input them in the text boxes, or click _Change_ and select files, or type in names in the selector. Here is what the following options do and should be set at:

    Input Image/Image Folder
    The only image (or folder of images) you are saving from MS Paint.

    Highlighted Out Directory
    The path of the directory for input files that will be highlighted to. This should be separate from your input.

    Cache File Directory
    The location of where the .txt documents should be save to as the cache of the image. If the input image hasn't changed since this file has been modified, it will read from this and not the input image. This is to save a lot of time reading text.

    Class File Output
    A folder to put all the compiled files.

    Compiled Jar Output
    The file which the compiled .jar should be placed.

    Library jar(s) path
    The location of any libraries to be compiled in the classpath of your project. This can be a single .jar file, or a directory containing multiple .jars.

    Compile other file(s) path
    The location for other files (eg. META-INF, plugin.yml, etc) to be compiled in the jar. This may be one singular file or a directory of files to be placed into the jar.

    Letter Directory
    The directory of all the letters, this should have come packaged with the release, so select that folder's location.

    Compiler Output
    The image file that will contain all compiler output, like status, times, and errors. If no image is found by this name and location, one will be created.

    Program Output
    The image file that will contain all of the compiled program's output, like status, times, and errors. If no image is found by this name and location, one will be created.

    Git Features
    MS Paint IDE has only the important Git features, allowing you to do anything you would normally do on an IDE.

    Create Repo
    The Create Repo button simply does git init for your project, relative to the input image directory/file.

    Add Files
    Clicking the Add Files button will open a dialog for you to select as many files/directories as you want that will be added to the Git repo. If an image file is found, it will be scanned with the OCR, and that scanned version will be added to Git.

    Add Remote
    The Add Remote button will add whatever is in the text field to the right of the button as a remote origin.

    The text box must contain an SSH origin containing authentication. A template for what is required is:
    https://Username:[email protected]/Username/Repo.git
    Please note the token in the template can be an authentication token to your account (Accessed/managed by going to GitHub's Settings > Developer Settings > Personal access tokens and generating a token) or the password for your account.

    If you don't want the remote origin to be visible in the text box and in the console output to the right (for use in tutorials or demonstrations) you can click the visibility button to the right in the text field, and it will toggle the visibility for the origin.

    Commit
    Clicking the Commit button will simply make a commit with the message in the text box to the right.

    Push
    The Push button will push all unpushed commits to the remote origin.

    File Editing
    Note: This only works if you used the installer


    MS Paint IDE allows you to edit any text file on your system in MS Paint, allowing you to make whole projects just with MS Paint; no need to make your README's in MS Notepad any more!

    To use this feature, right click any file (Preferably a text file) and click Edit With MS Paint IDE
    [​IMG]

    After you click the context menu button, a MS Paint window will pop up with an image version of your file. You may edit this, and upon saving, the program's OCR will convert the image to text, saving it again.

    Here's a video example of this feature being used from beginning to end.

    Note: All options are saved in a file named options.txt in the same directory of your jar, to keep you from re choosing everything every restart

    Once you have all of the options set, you can be free to program in MS Paint, saving to the file you set earlier. The font must be in font size 16, with the font family being Verdana. If people are super interested in this (Which I doubt, but who knows) I would make it support more fonts, but right now that's not a top priority.

    Screenshots
    [​IMG]

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    [​IMG]


    Examples of a program with errors


    [​IMG]

    [​IMG]



    Changelog
    12/11/17 - Release 1.0:
    - Initial release

    12/13/17 - Release 1.1:
    - Added "Probe" mode, making scans over 10x faster
    - Added library support
    - Added .jar compilation support

    12/14/17 - Release 1.2:
    - Added multiple class support

    4/16/2018 - Release 2.0:
    - Redesigned program GUI
    - Remade website
    - Made scanning much more efficient
    - Everything is faster and easier to use

    5/3/2018 - Release 2.0.1:
    - Fixed bugs

    6/12/2018 - Release 2.0.2:
    - Added dark themes to both the website and application

    8/30/2018 - Release 2.1.0:

    - Increased performance by ~33%, added git features such as:
    - Creating a repo
    - Adding files
    - Committing
    - Pushing
    - Adding remote origins
    - Also removed common leading spaces, making much cleaner files.

    9/9/2018 - Release 2.1.1:
    - Made configuration/usage easier
    - Scrolling on separate sides

    Donations
    If anyone would like to support me with donations, I would be extremely grateful, and would help support for future suggested projects :) If you donate and would like your name posted here, please PM me!

    Thank you to:
    @Mr.Midnight

    @Stef
    @Meepidy
    @iCodeHaven

    Feel free to donate via PayPal
     
    #1 RubbaBoy, Dec 11, 2017
    Last edited: Sep 11, 2018
    • Winner x 94
    • Funny x 36
    • Creative x 8
    • Like x 6
    • Optimistic x 4
    • Agree x 3
    • Informative x 2
    • Friendly x 1
    • Useful x 1
  2. what the fuck
     
    #2 loidsemus, Dec 11, 2017
    Last edited: Jun 29, 2018
    • Agree x 51
    • Funny x 12
    • Optimistic x 2
    • Like x 1
    • Winner x 1
  3. That is real art
     
    • Agree Agree x 20
  4. Thank you. Code is art, so it should be created in a workspace that allows for all kinds of art, not just textual.
     
    • Agree Agree x 6
    • Winner Winner x 1
  5. That is art, and as Bob Ross once said..
    "I guess I’m a little weird. I like to talk to trees and animals. That’s okay though; I have more fun than most people.”
    - Bob Ross
     
    • Like Like x 1
    • Funny Funny x 1
  6. Thank the lord a reliable IDE exists now.
    Note: Ms paint was killed by Microsoft.
    Also a Linux user.
     
    • Winner Winner x 4
  7. Now I can finally move away from this IntelliJ bullshit to a truly SUPERIOR IDE. God bless.
     
    • Funny Funny x 10
    • Agree Agree x 3
    • Like Like x 2
    • Winner Winner x 2
  8. Yep, so full of themselves they included themselves in the name..
     
  9. MS Paint will never die, it will always be with us. And for being a Linux user, as long as you run the jar with your JDK, it should work with you.
     
  10. Amen Brother!
     
  11. Mas

    Mas

    "The perfect IDE doesn't exi-"
     
    • Like Like x 3
    • Agree Agree x 3
    • Funny Funny x 3
  12. Is that a.... CHALLENGE??? If I get enough support on this project, I'll accept your offer. Hell, I'll add multi-class support, the only thing holding me back is loading times.
     
  13. Mylescomputer

    Supporter

    I've been looking for something to increase my productivity...
     
    • Funny Funny x 9
  14. What kind of support are you looking for? If it means donations to get multi-class and external library support, so be it
     
  15. Nah just likes and views, I could put up a donation link if people would actually consider donating :p which would help. I just haven't made worth much donating for in the past xD
     
  16. I'll donate. Put that link up.
     
  17. Thank you, check the bottom of the post :)
     
  18. Done, I've donated :D
    Also, read the message with it :p
     
    • Like Like x 1
    • Informative Informative x 1
  19. Is it April 1st already?
     
    • Funny Funny x 5
  20. You can check the GitHub, I can promise that everything is 100% legit. It uses an OCR to get all the letters from the images and assembles into a 2D grid of rows and columns, with all X and Y coordinates saved. The program then truncates any null elements in the grid. Then, it converts it into a String, then uses a library, JHighlight, with a custom class for it to read to and from strings, only giving a grid of colors. Then it does the process of going through each letter and setting each letter object's color to the one specified by the JHighlight thing. The program loops through each letter and draws them to an image, setting all non-white pixels to the highlighted color to give the syntax highlighted color effect. After that, if selected, it gets the text and uses the Java tools.jar to compile the class from an in-memory String, then converting any errors into "Angry Squiggles" as referred to in the program. It gets the locations of each column and row and draws those to the specific lengths with a padding of 3 pixels on either side to make it prettier. If no errors are present, it loads the compiled class, and invokes the main method in the class. All output from the program and compiler is routed through a custom PrintStream that writes to images, and is saved after everything is completed, to keep things fast (In relative terms).

    TL;DR
    It's real.
     
    • Like Like x 1
    • Funny Funny x 1
    • Winner Winner x 1

Share This Page