gossyp
gossips from the internet
|
http://sebsauvage.net/python/gossyp/
What ?
It's a weird, useless project of mine. gossyp fetches random gossips from the internet (usenet, web, chat, forums...) and displays them on screen.
Why ?
Think of it as some kind of 'art'.
Or think of it as taking a snapshot of the current thoughts, rants and raves of people all around the world.
You'll find grave truths, clever thoughts, stupid comments, insults, questions, quotes, non-sense, deep sense, facts, out-of-the-context puzzling sentences from all over the world.
How ?
gossyp fetches random messages from different sources (Usenet, web forums, IRC...), extracts sentences, shuffles them and outputs them by various mean (standard output, HTML page, speech, screensaver...)
Technical details
gossyp is written in Python. gossyp has 3 different modules types:
- fetchers, in charge of fetching sentences from the internet.
- the pool, in charge of maintaining a pool of sentences, starting and managing fetchers.
- display, in charge of extracting sentences from the pool and displaying them by various means.
Right now, gossyp has 2 input modules and 2 output modules.
Input modules are:
- gossypFetcher_googleGroups (http://groups.google.com): it's a web gateway to Usenet. This module queries the Google Groups search engine with HTTP to retreive the most recent messages from all usenet international branches, except the comp.* hierarchy.
- gossypFetcher_YahooMessageBoards (http://messages.yahoo.com): it's web-based forums. This module queries the groups with HTTP to explore random categories, topics, discussions and messages within these discussions, starting with the Yahoo! Message Boards home page.
I plan to write more fetcher modules, including IRC.
Output modules are:
- gossypDisplay_stdout: Displays a sentence on standard output every 8 seconds.
- gossypDisplay_html: Generates a new HTML page containing 10 sentences every 30 seconds. The HTML page contains a REFRESH meta tags so that your browser will automatically reload the page. (Can also be used as a desktop background under Windows with ActiveDesktop.)
I plan to write more display modules, including speech, tk, RSS, pyGame, screensaver...
More technical details are available in source code comments.
What does it look like ?
Here are a sample outputs:
Where can I get it ?
A word of warning. Please read:
- This is development, uncomplete code. It works, but it's not bulletproof. Some things (like proxy) are hardcoded. Error handling is not perfect. Source code is not always very well commented. Sentences filtering is not totally perfect, etc. This is an ever-evolving code.
- I provide no support for this program.
- The gossypFetcher_googleGroups, as it is, is illegal. The Google license says you are not allowed to perform automated queries on their search engine. The Google Groups search engine will refuse to reply to gossyp queries (because User-Agent is Python/urllib). You can circurmvent this by using a local proxy which alters the User-Agent (such as the excellent Proxomitron).
- Please do not mirror source code of this program, nor binary versions. Please always link to this page ( http://sebsauvage.net/python/gossyp/ ) so that people always get the latest version.
- You need some knowledge of the Python language if you want to customize modules.
Now you know what you're doing, here's the zip file: gossyp01dev2.zip
How to use it
- Choose a display module (gossypDisplay_stdout or gossypDisplay_html)
- Setup the proxy in the module if you use a proxy (os.environ['http_proxy']='http://myproxy.com:3128')
- If you want to see each module working, change debug=False to debug=True in each module.
- run the module of your choice:
- python gossypDisplay_stdout.py
- python gossypDisplay_html.py, and double-clic gossyp.html. Your browser will automatically reload the page every 30 seconds.
The pool will ask fetcher modules to fetch sentences until the pool has 2000 sentences. Although this works very well with a 56K modem, higher-bandwith internet access is recommended.