Thread moving project

Discussion in 'Hard Gay Shitpost Metropolis' started by Call me Tim, Dec 6, 2017.

Encyclopedia Dramatica Forums
Encyclopedia Dramatica Forums

Encyclopedia Dramatica is being sued by a very wealthy serial litigator. This is not just another "gimme shekels for server" - the future of ED is at stake. We are asking for donations to fund our legal battle, all money raised goes entirely towards attorney fees. Please help with whatever you can, every donation is deeply appreciated.

Donate to the Encyclopedia Dramatica Legal FundJoin the Discussion Thread

  1. uberfukken

    uberfukken
    Expand Collapse
    obsolete mule

    Joined:
    Nov 22, 2011
    Messages:
    23,625
    It was initially restored up to about mid 2016, so about 6 months were posted straight to Hard Gay, which wasn't many threads. HGC has never been organized to begin with because people knew threads posted to outside boards didn't get as much attention. Moving these threads to the proper category has been on the to-do list since at least 2013.
     
    • Informative Informative x 3
    • List
  2. uberfukken

    uberfukken
    Expand Collapse
    obsolete mule

    Joined:
    Nov 22, 2011
    Messages:
    23,625
    Here's how I remade the categories. Restoring from backup was not an option without losing 6-8 months worth of posts.

    1) Archive.org. Last cached copy with categories, open each category, open every page of threads on each category, save all as HTML.
    2) Combine all html files into one txt file. Used command line
    3) Open text file in Notepad+. Million lines. Remove all lines that do not contain "/threads/"
    4) Open in Excel as delimited, separated by /. Save the column that contains threadname.1111. Remove duplicates. Save result to text file
    5) Python

    Code:
    list = []
    list2 = []
    with open('input', 'r') as f:
        for line in f:
            line = line.replace('\n', '')
            list.append(line)
    for i in list:
        value = ('URL GOTO=https://forum.encyclopediadramatica.rs/threads/'+i+'/move\nWAIT SECONDS=1\nTAG POS=1 TYPE=SELECT FORM=ACTION:threads/'+i+'/move ATTR=ID:ctrl_node_id CONTENT=%95\nTAG POS=1 TYPE=INPUT:RADIO FORM=ACTION:threads/'+i+'/move ATTR=ID:ctrl_create_redirect_none\nTAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:threads/'+i+'/move ATTR=NAME:send_alert CONTENT=NO\nTAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:threads/'+i+'/move ATTR=*\nWAIT SECONDS=1')
        list2.append(value)
    with open('output', 'w') as f:
        for i in list2:
            f.write("%s\n" % i)
    
    Generates a block I can put into the iMacro chrome plugin

    Code:
    URL GOTO=https://forum.encyclopediadramatica.rs/threads/100-micro-hitlers.21980/move
    WAIT SECONDS=1
    TAG POS=1 TYPE=SELECT FORM=ACTION:threads/100-micro-hitlers.21980/move ATTR=ID:ctrl_node_id CONTENT=%95
    TAG POS=1 TYPE=INPUT:RADIO FORM=ACTION:threads/100-micro-hitlers.21980/move ATTR=ID:ctrl_create_redirect_none
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:threads/100-micro-hitlers.21980/move ATTR=NAME:send_alert CONTENT=NO
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:threads/100-micro-hitlers.21980/move ATTR=*
    WAIT SECONDS=1
    URL GOTO=https://forum.encyclopediadramatica.rs/threads/12-most-powerful-feminist-hashtags-of-2014.19960/move
    WAIT SECONDS=1
    TAG POS=1 TYPE=SELECT FORM=ACTION:threads/12-most-powerful-feminist-hashtags-of-2014.19960/move ATTR=ID:ctrl_node_id CONTENT=%95
    TAG POS=1 TYPE=INPUT:RADIO FORM=ACTION:threads/12-most-powerful-feminist-hashtags-of-2014.19960/move ATTR=ID:ctrl_create_redirect_none
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ACTION:threads/12-most-powerful-feminist-hashtags-of-2014.19960/move ATTR=NAME:send_alert CONTENT=NO
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:threads/12-most-powerful-feminist-hashtags-of-2014.19960/move ATTR=*
    WAIT SECONDS=1
    
    There's a few thousand lines of that so I just set the browser to go and leave the computer. The CONTENT=%95 is the subforum its being moved to, each board has its own number. I turn off images, flash, and javascript to speed things up. I'd say the whole process took maybe 3 hours.
     
    • Informative Informative x 2
    • Like Like x 1
    • Tl;dr Tl;dr x 1
    • List
  3. fascistJester

    fascistJester
    Expand Collapse
    Ediot

    Joined:
    Mar 11, 2017
    Messages:
    247
    Occupation:
    svengali
    This is EDF's version of a sense of urgency.
     
    • Like Like x 3
    • I Agree I Agree x 1
    • List
  4. fascistJester

    fascistJester
    Expand Collapse
    Ediot

    Joined:
    Mar 11, 2017
    Messages:
    247
    Occupation:
    svengali
    I wish I could like python. After so much time with javascript, I just can't.
     
    • Shots Fired Shots Fired x 1
    • Nobody Cares Nobody Cares x 1
    • List
  5. uberfukken

    uberfukken
    Expand Collapse
    obsolete mule

    Joined:
    Nov 22, 2011
    Messages:
    23,625
    js is an abomination
     
    • I Agree I Agree x 1
    • Shots Fired Shots Fired x 1
    • Nobody Cares Nobody Cares x 1
    • List
  6. fascistJester

    fascistJester
    Expand Collapse
    Ediot

    Joined:
    Mar 11, 2017
    Messages:
    247
    Occupation:
    svengali
    blasphemy
     
    • Shots Fired Shots Fired x 1
    • Nobody Cares Nobody Cares x 1
    • Fuck off retard Fuck off retard x 1
    • List
  7. uberfukken

    uberfukken
    Expand Collapse
    obsolete mule

    Joined:
    Nov 22, 2011
    Messages:
    23,625
    this.sucks()
     
    • Like Like x 1
    • Informative Informative x 1
    • Shots Fired Shots Fired x 1
    • List
  8. dropdatwat

    dropdatwat
    Expand Collapse
    Does Not Appreciate Title Changes

    Joined:
    Apr 10, 2017
    Messages:
    964
    Occupation:
    a pimp named slickback
    @uberfukken @fasictJester i know both JS and Phython idk what's the big deal both are fine though i think it's annoying how JS makes you do "===" instead of just "=="

    i also know C++ btw
     
    • Nobody Cares Nobody Cares x 2
    • lol fgt u suk bals ololoololollololoolollollol lol fgt u suk bals ololoololollololoolollollol x 1
    • List
  9. fascistJester

    fascistJester
    Expand Collapse
    Ediot

    Joined:
    Mar 11, 2017
    Messages:
    247
    Occupation:
    svengali
    Code:
    return Promise.all([javascript, python])
      .then(javascript => {
        let tier = "God";
      })
      .then(python => {
        let tier = "shit";
      })
     
    #29 fascistJester, Dec 7, 2017
    Last edited: Dec 7, 2017
  10. fascistJester

    fascistJester
    Expand Collapse
    Ediot

    Joined:
    Mar 11, 2017
    Messages:
    247
    Occupation:
    svengali
    C++ programmers usually hate javascript b/c it's loosely typed, which I find nice. It is a little too forgiving with function signatures though.
     
  11. uberfukken

    uberfukken
    Expand Collapse
    obsolete mule

    Joined:
    Nov 22, 2011
    Messages:
    23,625
    My biggest frustration with js was dealing with promises and subscriptions. I had to write a mobile app and certain events were triggering two or three times. Porting to iOS was a nightmare.
     
  12. fascistJester

    fascistJester
    Expand Collapse
    Ediot

    Joined:
    Mar 11, 2017
    Messages:
    247
    Occupation:
    svengali
    It certainly takes some getting used to, I know what you mean. Async await solves some of those headaches.
     
    • Informative Informative x 1
    • List

Share This Page