home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.advocacy      Torvalds farts & fans know what he ate      164,974 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 163,815 of 164,974   
   Gremlin to All   
   Quick and Dirty right click MID lookup w   
   25 Jan 26 04:59:20   
   
   XPost: alt.computer.workshop   
   From: nobody@haph.org   
      
   Here's a script designed to be added to your right click menu. Allows you   
   to lookup the MID. Just copy/paste it with brackets included. It'll create   
   a new file with the contents. You can alter the script as desired to make   
   it create files with the same naming convention as the first script, if   
   you want. I claim no authorship over this script. Google Gemini created it   
   on the first try after I requested it   
      
      
   BEGIN SCRIPT   
   #!/bin/bash   
      
   # --- Configuration ---   
   SERVER="paganini.bofh.team"  # Replace with your NNTP server   
   PORT=119                     # Default NNTP port   
   # ---------------------   
      
   # 1. Ask for the Message-ID (MID)   
   MID=$(zenity --entry \   
       --title="NNTP Fetcher" \   
       --text="Enter the Message-ID (including <>):" \   
       --entry-text="")   
      
   # 2. Exit if user cancelled   
   if [ -z "$MID" ]; then   
       exit 0   
   fi   
      
   # 3. Connect to the server and request the article   
   # We send 'ARTICLE ' followed by 'QUIT'   
   (   
     echo "ARTICLE $MID"   
     sleep 1   
     echo "QUIT"   
   ) | nc -w 5 $SERVER $PORT > "article_$(date +%s).txt"   
      
   # 4. Notify the user   
   zenity --info --text="Fetch attempted. Check the generated .txt file in   
   your folder."   
   END SCRIPT. C/P BETWEEN THIS LINE AND THE FIRST ONE.   
      
   It does use zenity, so you need to install that before you can use this   
   script. Once you save the file, chmod +x it or use your GUI to grant it   
   execute permissions. Then sudo cp rightclk.sh /usr/bin/rightclk   
      
      
   To add it to Thunar right click menu do this:   
      
   Install zenity if you don't already have it   
   sudo apt install zenity   
      
   save the script as rightclk.sh   
   open a terminal in the same folder as where you just saved rightclk.sh   
   chmod +x rightclk.sh   
   sudo cp rightclk.sh /usr/bin/rightclk   
      
   Close the terminal Window.   
      
   Open Thunar   
      
   Click Edit>>configure custom actions   
   Click + to create a new action   
   Give it a name. I chose Lookup MID   
   For description I put "Looks up MIDs" without the quotes.   
   Command is set to /usr/bin/rightclk   
      
   Under Appearance Conditions the first two entries have a single *   
   And all of the boxes are checked below. This ensures that Lookup MID will   
   be available regardless of the content of the folder you might be in when   
   you right click.   
   Click ok   
   Click close   
      
      
      
      
      
   --   
   Liar, lawyer; mirror show me, what's the difference?   
   Kangaroo done hung the guilty with the innocent   
   Liar, lawyer; mirror for ya', what's the difference?   
   Kangaroo be stoned. He's guilty as the government   
      
      
      
   --   
   Liar, lawyer; mirror show me, what's the difference?   
   Kangaroo done hung the guilty with the innocent   
   Liar, lawyer; mirror for ya', what's the difference?   
   Kangaroo be stoned. He's guilty as the government   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca