Permalink
Browse files

Simply run from Terminal - Check README file

  • Loading branch information...
1 parent 9c16727 commit 5aefe885962a86545ee0b7527bfcc029959b8212 Prasanna Venkadesh committed Apr 15, 2012
Showing with 103 additions and 4 deletions.
  1. +45 −0 Gilly
  2. +40 −0 Gillylive
  3. +10 −2 README.md
  4. +4 −1 fedora_install.sh
  5. +4 −1 ubuntu_install.sh
View
45 Gilly
@@ -0,0 +1,45 @@
+#!/usr/bin/env python
+"""
+Application Name:- Gilly
+Version:- 1.0
+Author:- Prasanna Venkadesh (http://prasopensource.wordpress.com)
+License:- GNU GPL V3.0
+CopyLeft April, 2012 Prasanna Venkadesh
+
+"""
+from Tkinter import *
+import feedparser
+import pynotify
+import os
+
+def parsing():
+ T.delete(1.0,END)
+ source=['http://static.cricinfo.com/rss/livescores.xml']
+ file = open("feeds", "w+")
+ for url in source:
+ data = feedparser.parse(url)
+ for entry in data.entries:
+ file.write(entry.title + "\n\n")
+ file.close()
+
+ pynotify.init("Gilly Cricket")
+ notification = pynotify.Notification ("Success!", "Score fetched.", "dialog-information")
+ notification.show()
+
+ file_read = open("feeds","r+")
+ content = file_read.read()
+ T.insert(INSERT, content)
+ file_read.close()
+ os.remove("feeds")
+
+
+root = Tk()
+root.title("Gilly V-1.0")
+
+content =StringVar()
+T=Text(root,height=10,width=60)
+T.pack()
+B=Button(root, text="Update", command=parsing)
+B.pack()
+
+root.mainloop()
View
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+"""
+Application Name:- Gilly
+Version:- 1.0
+Authors:- Prasanna Venkadesh (http://prasopensource.wordpress.com)
+ Ganesh Katrapati (neshmailsu@gmail.com)
+License:- GNU GPL V3.0
+CopyLeft April, 2012 Prasanna Venkadesh
+
+"""
+import feedparser
+import pynotify
+import threading
+import time
+import sys
+
+minutes = sys.argv[1]
+
+#Thread for running Gilly every 30 seconds
+
+class Gilly (threading.Thread):
+ def run (self):
+ while True:
+ self.parsing()
+ time.sleep(60*int(minutes))
+ def parsing(self):
+
+ source=['http://static.cricinfo.com/rss/livescores.xml']
+ text = ""
+ pynotify.init("Gilly Cricket")
+ for url in source:
+ data = feedparser.parse(url)
+ for entry in data.entries:
+ notification = pynotify.Notification (entry.title, "Score fetched.", "dialog-information")
+ notification.show()
+
+pynotify.init("Gilly Cricket")
+notification = pynotify.Notification ("Gilly Cricket Active!", "Score will be fetched every "+minutes+" minutes", "dialog-information")
+notification.show()
+Gilly().start()
View
@@ -9,19 +9,27 @@ Extract the files.
How to use it in Linux (Fedora 16, Ubuntu - Tested)
==================================================
* Run the fedora_install.sh / ubuntu_install.sh file with respect to your operating system from terminal like this
+
sudo sh fedora_install.sh
sudo sh ubuntu_install.sh
* Enter password when it prompts
-* After the installation is completed, make sure your system is connected to internet and double click the "Gilly.py" file, Press the Run button on the pop-up windows that appears
+* After the installation is completed, make sure your system is connected to internet and double click the "Gilly" file, Press the Run button on the pop-up windows that appears
+
+* You can also now delete this downloaded, extracted folders if you don't need to be in your system or if you don't need the code yourself and just to use the application. After deleting you can run from terminal in very simple mannner:
+
+```
+Gilly &
+Gillylive 2
+```
* When everything went fine you will get a windows with empty white spaces and Update button. Click on it. To refresh scores, press Update button when required.
* This also supports live updating of the score with notifications. You can set interval time in minutes. Run this in your terminal
- python Gillilive.py (interval time in minutes)
+ Gillilive (interval time in minutes)
View
@@ -1,4 +1,7 @@
#!/bin/bash
yum install tkinter python-feedparser
-chmod +x Gilly.py
+chmod +x Gilly Gillylive
+cp Gilly Gillylive /opt/
+ln -s /opt/Gilly /usr/bin/Gilly
+ln -s /opt/Gillylive /usr/bin/Gillylive
View
@@ -1,3 +1,6 @@
#! /bin/bash
apt-get install python-feedparser python-tk
-chmod +x Gilly.py
+chmod +x Gilly Gillylive
+cp Gilly Gillylive /opt/
+ln -s /opt/Gilly /usr/bin/Gilly
+ln -s /opt/Gillylive /usr/bin/Gillylive

0 comments on commit 5aefe88

Please sign in to comment.