topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 1:48 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Commandline Helper Tool (Plugins) Coders Requested  (Read 16069 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Commandline Helper Tool (Plugins) Coders Requested
« on: January 07, 2009, 08:31 AM »
I've added a new feature to MPQ that lets it run a commandline tool whose job it is to fetch/generate a random quote.
The most likely use for such a thing would be to grab a quote from a website like: wikiquotes, quotesdaddy, bash, etc.

So basically i'm hoping to pique the interest of someone here who would be willing to write a small commandline tool for some of these services that will fetch a random quote from them (most have an xml based api).

Note that for size and speed reasons, ideally these commandline tools would be built using c++ or some other native compiled language, rather thank ahk, .net, delphi, etc.,  but that is not mandatory.

Can i interest anyone?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #1 on: January 07, 2009, 08:34 AM »
I should say that downloading images for the screensaver is also possible by the commandline tools -- so i'd also be interested in someone who would be willing to code some commandline tools that can grab random images from flickr, etc.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #2 on: January 07, 2009, 04:48 PM »
It would probably be a good idea if developers pulling stuff from webservices can agree on using libCURL - that way, the curl.dll could be shipped with the screensaver, and allowing for tiny plugins. That, or use WinINet - that's really tiny :) (since it ships with windows)
- carpe noctem

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #3 on: January 07, 2009, 09:20 PM »
Thats a very good idea.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #4 on: January 11, 2009, 08:41 AM »
I've successfully used the free commandline tool pscrape to fetch random quotes on demand from the www.quotesdaddy.com page  :up:

It will be in the next release.  If anyone wants to try scraping other random info please post what you find.

(note that you can use this feature to show other info besides quotes).

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #5 on: January 11, 2009, 11:55 AM »
I've successfully used the free commandline tool pscrape to fetch random quotes on demand from the www.quotesdaddy.com page  :up:

It will be in the next release.  If anyone wants to try scraping other random info please post what you find.

(note that you can use this feature to show other info besides quotes).

Hi Mouser,

Could you share with us the commandline commands that you used for the to extract from www.quotesdaddy.com

I think at least one of the examples given on http://www.webscrape.com/ are broken due to changes in the urls.

This was also mentioned in

"Broken Examples
So it appears that some of the examples on the website are now broken I haven't been checking them lately and hadn't noticed! This is a fundamental problem encountered when screen scraping, when the target screen format changes your scrapes may well stop working."
http://pagescrape.blogspot.com/

The syntax was somewhat Greek to me also because I'm trying to get used to Regex syntax and there seems to be differing flavours of Regex too.

Thanks.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #6 on: January 11, 2009, 12:06 PM »
here's the entire contents of my dyn_quotesdaddy.txt quotes file which works:

DcQuoteFile|QuotesDaddy.com Quotes|Dynamically fetched quotes from the website quotesdaddy.com|quotesdaddy homepage|http://www.quotesdaddy.com
$$$appcap %appdir%\tools\pscrape.exe -u"http://www.quotesdaddy.com/feed" -e"<item>.*<description>(.*)</description>";;;%lastappcap%;;;$$$html2ascii

in case its not clear, the commandline for pscrape is:
 -u"http://www.quotesdaddy.com/feed" -e"<item>.*<description>(.*)</description>"
« Last Edit: January 11, 2009, 12:08 PM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #7 on: January 12, 2009, 04:18 AM »
The QuotesDaddy "book" addon is now available from the mpq web page.

Installing it will give you a new quote book that fetches quotes dynamically from the quotesdaddy web page; i didn't want to include this with base install because people might get scared when the program tries to connect out to the internet.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Commandline Helper Tool (Plugins) Coders Requested
« Reply #8 on: January 13, 2009, 02:08 AM »
Might be fun to find a random machine generated poetry tool to generate random short poems to show.