1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ruby script to sort articles by word count (good for large collections of PLR)

Discussion in 'Black Hat SEO Tools' started by FatherCarbon, Dec 14, 2008.

  1. FatherCarbon

    FatherCarbon Registered Member

    Joined:
    Sep 30, 2008
    Messages:
    96
    Likes Received:
    63
    Occupation:
    Chemist and Web Developer/Marketer
    Location:
    Everywhere!
    I whipped up this ruby script tonight to sort through all of my PLR and move all of the articles that did not meet the minimum word count to another folder.

    There's not much else I can say about it really, just a simple tool for a simple job and I thought some of you might find it useful.

    Everything you need to know is in the comments at the beginning of the file.

    This should work on any system that can run Ruby. (Linux, Windows, etc)
    Please note that I've only tested it on Linux though.

    If you don't have the ruby interpreter, get it here:

    http://www.ruby-lang.org/en/downloads/

    -------------------------------------------------------------------------------------------------
    Here's a quick rundown:

    ruby words.rb /articles 400

    Moves all files in /articles with a wordcount less than 400 to /articles/Under400
    -------------------------------------------------------------------------------------------------

    Enjoy! :D
     

    Attached Files:

    • Thanks Thanks x 1
  2. FatherCarbon

    FatherCarbon Registered Member

    Joined:
    Sep 30, 2008
    Messages:
    96
    Likes Received:
    63
    Occupation:
    Chemist and Web Developer/Marketer
    Location:
    Everywhere!
    UPDATE

    For some unknown reason I didn't put in the simple ability to display the wordcount.

    So, here is the updated version that displays the wordcount and quits when used with the 'count' parameter.

    USAGE:
    ruby word.rb count /articles/prostitutiononthecheap.txt

    LINUX HINT
    If you're in Linux, remove the .rb extension and chmod +x it, then just:
    ./word count /articles/polesitting.txt

    NOTE: It still has the same functionality as before to sort articles. :p
     

    Attached Files:

    • Thanks Thanks x 1
  3. FatherCarbon

    FatherCarbon Registered Member

    Joined:
    Sep 30, 2008
    Messages:
    96
    Likes Received:
    63
    Occupation:
    Chemist and Web Developer/Marketer
    Location:
    Everywhere!
    C'mon, no one has any use for this? :(
     
  4. YSL

    YSL Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 27, 2007
    Messages:
    379
    Likes Received:
    1,132
    Is this for windows or linux?


    This message is too short.... :p
     
  5. FatherCarbon

    FatherCarbon Registered Member

    Joined:
    Sep 30, 2008
    Messages:
    96
    Likes Received:
    63
    Occupation:
    Chemist and Web Developer/Marketer
    Location:
    Everywhere!
    Both, since ruby runs on both operating systems. Honestly though, I haven't tested it on Windows since I don't have a copy installed (except my XP virtual machine, but it's screwed up for some reason).

    If you or anyone tries this in Windows, please report your results here. I don't see why it wouldn't work though. Ruby is beautiful like that. ;)
     
  6. flow

    flow Regular Member

    Joined:
    Oct 3, 2008
    Messages:
    356
    Likes Received:
    112
    It's perfect, thank you!! This will save me a lot of time sorting through articles for word count.

    ps I'll test on Windows and report soon.
     
    • Thanks Thanks x 1
  7. FatherCarbon

    FatherCarbon Registered Member

    Joined:
    Sep 30, 2008
    Messages:
    96
    Likes Received:
    63
    Occupation:
    Chemist and Web Developer/Marketer
    Location:
    Everywhere!
    Glad it helped! :D

    <tooshort></tooshort>
     
  8. nikhil88

    nikhil88 Regular Member

    Joined:
    Jun 12, 2008
    Messages:
    208
    Likes Received:
    97
    Occupation:
    E&TC Engineering Student
    Location:
    Pune,India
    great going fathercarbon
    i just love it when ppl make their own scripts/software, maybe cause i have been experimenting on python a lot myself lately lol
     
    • Thanks Thanks x 1
  9. FatherCarbon

    FatherCarbon Registered Member

    Joined:
    Sep 30, 2008
    Messages:
    96
    Likes Received:
    63
    Occupation:
    Chemist and Web Developer/Marketer
    Location:
    Everywhere!
    I've come to believe, after trying so many blackhat tools, that the only way to have a truly satisfactory product is to make it yourself. :D