Query regarding NFO files...?

Discussion in 'Application Software' started by smallhagrid, Nov 30, 2013.

  1. smallhagrid

    smallhagrid MDL Addicted

    Sep 14, 2013
    608
    445
    30
    Hi Folks.
    I have trouble viewing NFO files with all the extra garbage (sometimes ASCII art) in them because of my eyes.

    I always wonder if anyone has made a utility that will take in the NFO file, clean the extra stuff out of it, and spit it out like a plain old TXT file somehow.

    Over time I've asked and gotten some pretty good suggestions and searched and found some stuff - but only things that require a bunch of steps and don't really do the job 100%.

    Notepad++ sort of does it with a macro, and Textpipe is supposed to do it - but nobody will say how...!?

    This kind of junk:
    ܰܲ ܰܲ ܰܲ
    Üܱ°²ÛÛ° Üܱ°²ÛÛ° Üܱ°²ÛÛ°
    Û ²ÛÛÛÜÜÜÜܲÛÛß°²ÛÛÛ²° ²ÛÛÛÜÜÜÜܲÛÛß°²ÛÛÛ²° ²ÛÛÛÜÜÜÜܲÛÛß°²ÛÛÛ²°
    ÛÝÞ²ÛÛÛ ßßßß °²ÛÛÛÛÛÛ²²Ü Þ²ÛÛÛ ßßßß °²ÛÛÛÛÛÛ²²Ü Þ²ÛÛÛ ßßßß °²ÛÛÛÛÛÛ²²Ü
    Û²°²ÛÛÛ ²ÛÛÛÛÛ²²ß Ü ²ÛÛÛ ²ÛÛÛÛÛ²²ß ²ÛÛÛ ²ÛÛÛÛÛ²²ß°
    Û²°°²ÛÛ Þ²ÛÛ²²ß °ßÜ °²ÛÛ Þ²ÛÛ²²ß °²ÛÛ Þ²ÛÛ²²ß°Ü²
    Û²°Ü°²Û ß²²ß ß °Ü°²Û ß²²ß Ü°²Û ß²²ß ÛÛ²
    Û²°Û²Ü° Üß Û²Ü° Ü°Ü Û²Ü° Û²Û
    Û²°ÛÛÛ² ÜÛÛÜÜÜß ÜÜßß ÛÛÛ² ÜÛÛÜÜÜß ß °ÛÛÛ² ÜÛÛÜÜÜß þ Û²Û
    ÛÝÞÛÛÛÛ ÞÛ²ßßß ÞÛÛÛÛ ÞÛ²ßßß Ü ÜÞÛÛÛÛ ÞÛ²ßßß Ü ÛÛÛ
    ß°ÛÛÛÛÛ°Û² FiGHTiNG °ÛÛÛÛÛ°Û² ßß° ÜÜßß°ÛÛÛÛÛ°Û² Üß ÛÛÛ
    ÜÛÛÛÛÛÛ°ÛÝ Ü ß Ü ÜÛÛÛÛÛÛ°ÛÝ ÜÛÛÛÛÛÛ°ÛÝ Üßß ÛÛÛ
    ßß°°ß²ÛÛÝßÛ ß°Ü²ß° ßÜ ß ßß°°ß²ÛÛÝßÛ FOR Ü ßß°°ß²ÛÛÝßÛ ² ÛÛÛ
    ²ÛÛ °ÛÛÞÝ Ü°²Û° °ÛÛÞÝ Ü Üܲ° ß °ÛÛÞÝ ° ÛÛÛ
    ²ß ÛÜÛ ÞÛ°ß²Ü Ü²ß²Ü ÛÜÛ ßÛ² Ü ÛÜÛ °Ü FUN Û²Û
    ÝÜßþ ÞÛÛ° ²ÛÜ°ß²²ß°Ü°ß²Ü Üßþ ÞÛÛ° ܲßÛÜ Ü²ßÜß Üßþ ÞÛÛ° ÜßÜÜÜÜÜ²ß Û²Û
    Ýß±ÜÜ²ß Û ß²ÛÛÜÜÛ²ßßÛÜ°²ß±ÜÜ²ß Ü°ß ÜÜ ßßß°Üß ß±ÜÜ²ß ÜÜß °ÜÛß° ²ßÛ
    ÛÜ ÜÜ ßßÜÜ ßßßß ßß ß ßß ßß ßßßß ßß ²ß ÜÜ ÜÛÛ
    ²ÛÛÛ²ßßÛÜ Winamp Pro 5.621 ßÜÛßßÛÛÛ²
    °²Û° ÜÛ° Nullsoft °ÛÜ Û²°

    Once the high ASCII is stripped out - is just:

    Winamp Pro 5.621
    Nullsoft

    Minus the eye pain of course.

    Is there any quick, easy way to get this done by drag & drop or in a single step, maybe even with a little something that doesn't need to be installed like a portable or something ??

    Thanks.
     
  2. Paiva

    Paiva MDL Developer

    Apr 9, 2011
    1,275
    1,587
    60
    #2 Paiva, Nov 30, 2013
    Last edited by a moderator: Apr 20, 2017
  3. smallhagrid

    smallhagrid MDL Addicted

    Sep 14, 2013
    608
    445
    30
    I am currently doing this manually (as you suggest) with notepad.

    My post mentions/explains about NPP - the portable of which I already have - and it's not very good for this.

    Fluent Notepad is nothing special - unless one counts that it requires .net 4 - which ain't gonna happen here.

    I will greatly appreciate any info that is really helpful in simplifying this effort.

    Thanks.
     
  4. stonedagain

    stonedagain MDL Junior Member

    Sep 30, 2009
    84
    3
    0
    Search for a program called Damn NFO Viewer.
     
  5. smallhagrid

    smallhagrid MDL Addicted

    Sep 14, 2013
    608
    445
    30
    This is not what I asked about at all.

    I want to clean them - not view them.

    Thanks.
     
  6. BigW

    BigW MDL Member

    Apr 25, 2010
    198
    53
    10
    To clean them in an automatic way you will need a very big database of asci-art-signatures or you have to manualy teach such a application on every new asci-art you encounter. You probatly know that there are an endless number of new, old and deceased release-groups which also change there asci-art every now and then. This would be an uphill battle with a very small userbase to beginn with. Probatly why nobody has coded such an application by now. To code what you want to have of an application would need a lot of money and many working braincells.

    Then there is the thing, that .nfo-files by default aren't opened with a text-editor on a windows-pc. The normal average Jo of downloading stuff is oblivious on what content a .nfo-files contains.

    The next thing of your requrenment to it be in .net 3.5 is also in my minde delusional. No coder in his right mind starts a project in .net 3.5! Every project which also supports .net 3.5 for now dops the support for it and they would stupid to not do so. Even XP supports .net 4! When XP doesn't get any support from MS in April next year many Software-Project will even drop .net 4 in favour of .net 4.5. Even games nowerdays need .net 4 to start.
     
  7. smallhagrid

    smallhagrid MDL Addicted

    Sep 14, 2013
    608
    445
    30
    My Goodness - such an interesting approach !!!
    Better still, the inclusion of reasons to have .net, wow.

    Over time I have tried an assortment of s/w that cleans NFO files, and none have used such an approach AFAIK.
    (Of course - what little I know of coding could be written in big letters on the back of a business card...)

    Text Monkey does pretty well (if it stays running all the time) and many moons ago there was a tool maybe called 'LGEAC' that was pretty good, and I remember a browser script that cleaned 'em too.

    There's also Chugger's nfo cleaner, which has a very messy install that does some very questionable things and resists being made stand-alone.

    None of the ones I've used have databases.

    Some have lists of chars to keep - some have lists of chars to delete (high ASCII) - NPP uses a macro to keep only letters and numbers, but makes a mess - Textpad has a script for cleaning high ASCII that works very poorly.

    Any other suggestions to actually try that are NOT just NFO viewers and NOT suggestions that make this sound impossible ?!?

    And BTW - I am a happy, stubborn XP user who sees anything after .net 2 as being very offensive.
    (I even resisted having ANY .net for a long time.)

    IMO, any s/w that requires a runtime addition that adds hundreds of MB in files as well as system overhead can just be...ignored altogether.

    Thanks !!
     
  8. jellybelly

    jellybelly MDL Member

    Oct 30, 2009
    159
    29
    10
    #9 jellybelly, Dec 4, 2013
    Last edited: Dec 4, 2013
    pystripper dot com works decent, just found it.... there used to be a site that worked good, it's been dead for a while.. online versions will not always be reliable to convenient to use, better to have an offline tool.... although the python source apparently is available, then you need to compile it for windows and thats messy as well

    I made my own cleaner and while it's not 100% perfect it's usually good enough to clean the majority of stuff.. basically removing non-character(ish) ASCII characters.... so some stuff gets left over if it's a normal character used in the design, such as a dash, but generally cleans up well enough.


    Using your example, my tool gives this output:
    which happens to be the same output as the website i linked..

    as for removing anything else, like the fighting for fun ... no tool will be able to do that because it could be part of a title/name/whatever.. so its only safe to remove actual non-readable type ASCII characters

    BigW, you thought about it in a way too complicated way :) While your solution would be a "100% clean" solution, you already outlined why it would be nearly impossible to do.. so the only realistic thing to do is to remove the junk ascii -- and that's easy.
     
  9. smallhagrid

    smallhagrid MDL Addicted

    Sep 14, 2013
    608
    445
    30
    #10 smallhagrid, Dec 5, 2013
    Last edited: Dec 5, 2013
    (OP)
    Hi Jellybelly, and thanks for a great reply !!

    Any chance...?:
    That you might share the tool you've made ??

    I am not seeking perfection and have no gripes about removing a bit of stuff manually if I want to - but trying to clean all that junk out of every NFO file I want to read drives me olde eyes batty !!!

    In a perfect world such a tool would be standalone (rather than needing an install), take in an NFO file...clean out the high ASCII chars - save it out as .TXT, and optionally delete the junky and no longer needed NFO file.

    But in this real world, a tool that is clean and just cleans out most of the excess is a great achievement !!!

    Thanks.
     
  10. asundrus

    asundrus MDL Member

    Apr 24, 2012
    129
    31
    10
    #11 asundrus, Dec 5, 2013
    Last edited by a moderator: Apr 20, 2017
    This is from a very old website I made years back:

    Code:
    <?
    function nfostrip($nfo)
    {
        $match = array("/[^a-zA-Z0-9-+.,&=??????:;*'\"???\/\@\[\]\(\)\s]/", "/((\x0D\x0A\s*){3,}|(\x0A\s*){3,}|(\x0D\s*){3,})/", "/\x0D\x0A|\x0A|\x0D/");
        $replace = array("", "<br />\n<br />\n", "<br />\n");
        $nfo = preg_replace($match, $replace, trim($nfo));
    
    return $nfo;
    }
    
    //echo "<h1>nfo Ripper</h1>";
    
    // NFO STRIP FROM TEXTAREA:
    if (isset($_POST["submit"]))
        echo "<div style=\"margin-left: 100px;\" align=\"left\">".nfostrip($_POST["nfo"])."</div>";
    
    // NFO FILE UPLOAD:
    elseif (isset($_POST["submitup"]) && isset($_FILES["nfofile"]) && !empty($_FILES["nfofile"]["name"])) {
    
        $nfofile = $_FILES['nfofile']['tmp_name'];
        echo "<div style=\"margin-left: 100px;\" align=\"left\">".nfostrip(file_get_contents($nfofile))."</div>";
    }        
        
    ?>
    I had it wrapped in a webpage called nforip.php worked pretty well back then, haven't used it for ages, I know this is not a "program" but it just shows you don't need a "huge" database.
     
  11. jellybelly

    jellybelly MDL Member

    Oct 30, 2009
    159
    29
    10

    Lucky for you we are almost in a perfect world :)

    hXXps://app.box.com/s/ey4n0nlk5vdw624ubihm

    I just made a couple changes to it based on your desires.. but I didn't get into editing the GUI or anything like that so your options are command line based only. There are no in-app settings to configure, so it's not quite "as easy" to use as it could be. The options are geared towards using the included registry file to let you right click on an nfo file and process it.

    Standalone program, no installation .. check!
    Open nfo or copy/paste in and strip ascii... check!
    Save it as a stripped nfo or text file ... check!
    Option to delete the original nfo file ... check!

    Just read the included information and make the necessary changes to the registry file. If I really wanted to I could make it a more user friendly app but like I said this was quickly made for what I needed at the time and was never meant to be a public app.
     
  12. smallhagrid

    smallhagrid MDL Addicted

    Sep 14, 2013
    608
    445
    30
    Jellybelly you have made my day - Sincerest Thanks !!!!!!!!!!!

    :fireworks:StripAscii....savetext...delete... WAHOO !!!!!:woot_jump: