Close
0%
0%

PrintSCII

A simple java tool that converts text (ASCII ART) from a provided file into printable statements for various languages (java, python, etc).

Similar projects worth following
A simple command line tool written in java that takes in a text file containing text or ASCII art, allows you to select a language (java, batch, etc) and then creates a new output file containing the text or ASCII art file converted to suitable print statements for your selected language,

---------------------------------------------------------------------------------------------------------------------------------------

       INPUT               LANGUAGE              OUTPUT

********************                      ********************
*                  *                      *                  *
*  some text       *        BATCH         *  echo some text  *
*                  *                      *                  *
********************                      ********************

I often create little command line programs to help with projects or generally just do or automate stuff for me, I like to add ASCII art to the print out statements or create stylized instructions rather than just plain text instructions that get printed.

To do this I often create the ASCII art design in a text file but then afterwards I have to manually enclose each line in a print command, This project is aimed at creating a simple tool that will do this for me for various languages.

  • FUTURE PLANS

    TAIBHSE DESIGNS01/06/2015 at 20:43 0 comments

    After my college exams (which start in a few days) I intend to return to this project,. I intend to add a few more languages to be supported and also add the option to create ascii art comments in a selected language besides just created printable statements.

  • SOURCE CODE

    TAIBHSE DESIGNS01/03/2015 at 21:27 0 comments

    package printscii;
    
    import java.awt.List;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.PrintWriter;
    import java.util.Scanner;
    
    /**
     *
     * @author TAIBHSE
     */
    public class PrintSCII
    {
    
        /**
         * given a file containing text, this 
         * method returns an array list of each line of the file
         * @param file
         * @return
         * @throws FileNotFoundException 
         */
        public static List readFile(String file) throws FileNotFoundException
        {
            Scanner s = new Scanner(new File(file));
            List list = new List();
            while (s.hasNextLine())
            {
                list.add(s.nextLine());
            }
            s.close();
            
            return list;
        }
        
        public static void intro()
        {
            System.out.println("");
    System.out.println(" ##################################################################################################");
    System.out.println(" ##################################################################################################");
    System.out.println(" ###                                       __,__                                                ###");
    System.out.println(" ###                              .--.  .-\"     \"-.  .--.                                       ###");
    System.out.println(" ###                             / .. \\/  .-. .-.  \\/ .. \\                                      ###");
    System.out.println(" ###                            | |  \'|  /   Y   \\  |\'  | |                                     ###");
    System.out.println(" ###                            | \\   \\  \\ 0 | 0 /  /   / |                                     ###");
    System.out.println(" ###                             \\ \'- ,\\.-\"`` ``\"-./, -\' /                                      ###");
    System.out.println(" ###                              `\'-\' /_   ^ ^   _\\ \'-\'`                                       ###");
    System.out.println(" ###                              .--\'|  \\._ _ _./  |\'--.                                       ###");
    System.out.println(" ###                            /`    \\   \\.-.  /   /    `\\                                     ###");
    System.out.println(" ###                           /       \'._/  |-\' _.\'       \\                                    ###");
    System.out.println(" ###                          /          ;  /--~\'   |       \\                                   ###");
    System.out.println(" ###                         /        .\'\\|.-\\--.     \\       \\                                  ###");
    System.out.println(" ###                        /   .\'-. /.-.;\\  |\\|\'~\'-.|\\       \\                                 ###");
    System.out.println(" ###                        \\       `-./`|_\\_/ `     `\\\'.      \\                                ###");
    System.out.println(" ###                         \'.      ;     ___)        \'.`;    /  /\'\'\'\'\'\'\\                      ###");
    System.out.println(" ###                           \'-.,_ ;     ___)          \\/   /  /  ___   \\                     ###");
    System.out.println(" ###                            \\   ``\'------\'\\       \\   `  /  /  /   \\   \\                    ###");
    System.out.println(" ###                             \'.    \\       \'.      |   ;/__/  /     \\   \\                   ###");
    System.out.println(" ###                           ___>     \'.       \\_ _ _/   ,     /       \\__/                   ###");
    System.out.println(" ###                         .\'   \'.   .''''''''/    |--\'`~~~~\'\'                                ###");
    System.out.println(" ###                   _____// / .---\'        _/ / / /__  _____  _____  _____                   ###");
    System.out.println(" ###                  | ___((_(_/  (_)       |(_(_(_|___|/  __ \\|_   _||_   _|                  ###");
    System.out.println(" ###                  | |_/ / _ __  _  _ __  | |_ \\ `--. | /  \\/  | |    | |                    ###");
    System.out.println(" ###                  |  __/ |  __|| ||  _ \\ | __| `--. \\| |      | |    | |                    ###");
    System.out.println(" ###                  | |    | |   | || | | || |_ /\\__/ /| \\__/\\ _| |_  _| |_                   ###");
    System.out.println(" ###                  \\_|    |_|   |_||_| |_| \\__|\\____/  \\____/ \\___/  \\___/                   ###");
    System.out.println(" ###                                                                                            ###");
    System.out.println(" ###                                    CREATED BY TAIBHSE                                      ###");
    System.out.println(" ###                                                                                            ###");
    System.out.println(" ###          -------------------------------------------------------------------------         ###");
    System.out.println(" ###          |                             INSTRUCTIONS                              |         ###");
    System.out.println(" ###          |-----------------------------------------------------------------------|         ###");
    System.out.println(" ###          |      1) Provide input file to convert to print statements,            |         ###");
    System.out.println(" ###          |                e.g. C:\\someFolder\\file.txt                            |         ###");
    System.out.println(" ###          |		                                                              |         ###");
    System.out.println(" ###          |      2) Type name of language to create print statements for,         |         ###");
    System.out.println(" ###          |                e.g. Java, python, batch                               |         ###");
    System.out.println(" ###          |                                                                       |         ###");
    System.out.println(" ###          |      3) Provide output location to save file to,                      |         ###");
    System.out.println(" ###          |            e.g. C:\\folder\\giveFileName.txt                            |         ###");
    System.out.println(" ###          -------------------------------------------------------------------------         ###");
    System.out.println(" ###                                                                                            ###");
    System.out.println(" ##################################################################################################");
    System.out.println(" ##################################################################################################");
        }
        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) throws FileNotFoundException
        {  
            intro();
            
            Scanner in = new Scanner(System....
    Read more »

  • IDEATION

    TAIBHSE DESIGNS01/03/2015 at 17:19 0 comments

    So the idea is to have a command line tool that takes in a text file and creates printable statements for a selected programming language from that file, line by line. The idea is that I can create the ASCII art or text in a file without having to worry about manually placing each line into a print statement or worry about having to escape special characters for the selected language, this tool should carry all that out for me.

View all 3 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates