Results 1 to 9 of 9

Thread: Tracking my posts, helping others

  1. #1
    Join Date
    Aug 2006
    Beans
    1,225

    Tracking my posts, helping others

    I joined the forums because I wanted to give back to the community that had helped me get up and running. I appreciate good, concise information delivered promptly. tseliot is the king of it, in my opinion. The guy posts meaningful, lean content, and he does it fast.

    I wanted to carefully pick and choose the people I responded to. I pick people who are having troubles with things I have a good understanding of: the wg111v2, java/eclipse/tomcat, and bash among other things. Quickly, though, I realized it was difficult to find out if someone I was helping had responded to me. I had no idea which posts I needed to get back to. Even using Search>Find All Your Posts only gave me a list of the things I was involved in. It lists the total responses, but I can't remember the totals over the course of a couple hours, let alone a couple days.

    So, to help myself help others, I wrote a perl script. It's down and dirty, but does the job. Now I go to Search>Find All Your Posts, ctrl-s, and save search.php to my desktop.

    I run the perl script, and then I help people. I know some of you are even more committed (and probably should be, in another sense ) than I am, so I'm sharing:

    [edit] Since I know at least one of you will post a much better, 5-line Python version of this program, I will start using yours as soon as it's available.


    Code:
    #!/usr/bin/perl
    
    #This is a short program to see if any replies have hit my posts.
    #It will simply parse the data I give it and compare it to the stored numbers.
    
    
    #Variables
    $storage = '/home/<user>/Desktop/Ubuntu Forums/storage.txt';
    $file =  "/home/<user>/Desktop/search.php";
    
    
    
    #open the last stored file
    %posts = (); #Create the hash, and load it.
    
    open (SNF, $storage) or die "Cannot read storage file\n";
    @rsi = <SNF>;
    
    #For every entry in the file, load the hash.
    for (@rsi) {
    	if ($_ =~ /(.*):!!:(.*)/) {
    		$posts{$1} = $2;
    	}
    }
    
    
    
    
    #open the posts file.
    open (INF, $file) or die "Cannot open file!";
    @contents = <INF>;
    close (INF);
    
    #See if any posts have been made
    for (@contents) {
    
    	#Search Keys
    	$post =  'a href="showthread.php?p';
    	$s1 = '<strong>';
    	$s2 = '</strong>';
    
    
    
    	#Get # of replies
    	if ($_ =~ /Replies.*$s1(.*)$s2/) {
    		$r = $1;
    	}
    
    	#Get Topic
    	if ($_ =~ /$post.*$s1(.*)$s2/) {
    		$t = $1;
    		if ($posts{$t}) { #if the topic is defined in the hash... 
    			if ($posts{$t} < $r) { #...check to see if the replies have gone up.
    				print "Updated: $t\n";
    				$posts{$t} = $r;
    			}
    		} else { #If the topic isn't defined in the hash, define it.
    			$posts{$t} = $r; 
    			print "New Topic: $t\n";
    		}	
    
    	}
    
    	
    
    }
    
    
    
    #write the storage file
    open (OUF, ">".$storage) or die "Cannot open file for writing\n";
    
    while( my ($k, $v) = each %posts ) {
    	print OUF "$k:!!:$v\n";
    }
    
    close OUF;
    
    unlink($file);
    Last edited by phossal; January 11th, 2007 at 01:13 AM.

  2. #2
    Join Date
    Apr 2006
    Beans
    1,979
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Tracking my posts, helping others

    Uhh. There's already a subscription feature :S

  3. #3
    Join Date
    Aug 2006
    Beans
    1,225

    Re: Tracking my posts, helping others

    lol A what?

  4. #4
    Join Date
    Jun 2005
    Location
    Malta
    Beans
    4,187
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Tracking my posts, helping others

    Quote Originally Posted by Tomosaur View Post
    Uhh. There's already a subscription feature :S
    aye, why bother with this, when you can just check your e-mail?

  5. #5
    Join Date
    Aug 2006
    Beans
    1,225

    Re: Tracking my posts, helping others

    Email?! No Ubuntu stuff goes to my actual email, and the only site email I get are notifications of being banned.

  6. #6
    Join Date
    Apr 2006
    Beans
    1,979
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Tracking my posts, helping others

    Quote Originally Posted by phossal View Post
    Email?! No Ubuntu stuff goes to my actual email, and the only site email I get are notifications of being banned.
    Just create an ubuntu folder and forward all ubuntuforums stuff into that. You can subscribe to threads using the thread tools button.

  7. #7
    Join Date
    Nov 2006
    Location
    NRW, Germany
    Beans
    21
    Distro
    Xubuntu 7.04 Feisty Fawn

    Re: Tracking my posts, helping others

    If you dont like the email notifications, you can also do an advanced search, look for your exact username, leave all the other options on default.
    Will show all the Threads you have been posted in, with the newest replies on top. You can even bookmark this page.

  8. #8
    Join Date
    Oct 2006
    Location
    Austin, Texas
    Beans
    2,715

    Re: Tracking my posts, helping others

    Maybe he/she would rather write something to accomplish it... There's nothing wrong with a programmer wanting to program something for use with the programming boards, is there?

  9. #9
    Join Date
    Nov 2005
    Beans
    593
    Distro
    Kubuntu 7.10 Gutsy Gibbon

    Re: Tracking my posts, helping others

    Turn on automatic subscription for all threads you participate in, with no email notification. Then go to Quick Links -> Subscribed Threads: list of threads you participated in.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •