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

tool for filtering out tweets >140 characters from a .txt file

Discussion in 'Social Networking Sites' started by pokerface19, Oct 30, 2011.

  1. pokerface19

    pokerface19 Newbie

    Joined:
    Mar 9, 2011
    Messages:
    26
    Likes Received:
    0
    heya!

    is there something like this?

    how can i filter out lines with more than 140 characters, without doing it manually, the file has over 60,000 lines..

    thanks in advance guys!

    greets
     
  2. HoNeYBiRD

    HoNeYBiRD Jr. VIP Jr. VIP

    Joined:
    May 1, 2009
    Messages:
    5,875
    Likes Received:
    7,115
    Gender:
    Male
    Occupation:
    Geographer, Tourism Manager
    Location:
    Ghosted
    i'm sure there are more sophisticated ways to do this, but here's one solution:
    - sort the lines by length:
    Code:
    http://textmechanic.com/Sort-Text-Lines.html
    1. you need to put a line into the mix which is exactly 141-character-long, type zero as the first character of the line
    why you need to do this?
    2. you need to identify this line later to separate the lines which are longer than 140 characters from the lines which are shorter than 140 characters/exactly 140 characters
    3. Order the lines "Alphabetically / Numerically": hopefully your 141-character-long line starting with zero will be at the top
    4. then hit sort by "Length"
    5. Ctrl+F: type/copy-paste your line starting with zero
    6. below your line starting with zero, you'll find the lines which are 140 characters long or shorter
     
    • Thanks Thanks x 1
  3. tonyy

    tonyy Junior Member

    Joined:
    Jun 20, 2010
    Messages:
    165
    Likes Received:
    32
    1)Go to any webpage
    2) Write the following in your browser: ('PRHASE TO SHRINK'.substring(0,# OF CHARACTERS)) i.e ('dshjdshjds'.substring(0,5))
    3)Hit enter
    4) You will see the shrunk line in your own browser, you can automate it woth imacros or yahoo pipe
     
    • Thanks Thanks x 1
  4. pokerface19

    pokerface19 Newbie

    Joined:
    Mar 9, 2011
    Messages:
    26
    Likes Received:
    0
    thank you guys.

    i also used textmechanic for some other tasks, seems like an excellent tool.