Ejemplo n.º 1
0
Archivo: feeds.py Proyecto: kaszak/dots
def main():
    try:
        with open(CACHE_FILE, 'rb') as last_entries_file:
            last_entries = pickle.load(last_entries_file)
    except FileNotFoundError:
        last_entries = []
       
    new_entries = []
    
    try:
        with open(RSS_FILE) as rss_file:
            rss_urls = rss_file.read().split()
    except FileNotFoundError:
        print('The configuration file with feed urls is missing, fix it!')
        sys.exit(1)

    for url in rss_urls:
        parsed = feedparser.parse(url)
        for entry in parsed.entries:
            if entry not in last_entries:
                chromium(entry.link)
                print('Opened {}'.format(entry.link))
            new_entries.extend(parsed.entries)
    
    with open(CACHE_FILE, 'wb') as last_entries_file:
        pickle.dump(new_entries, last_entries_file)
Ejemplo n.º 2
0
    def start(self):
        if self._type == "tabs_outliner":
            chromium("--app=chrome-extension://eggkanocgddhmamlbiijnphhppkpkmkl/activesessionview.html")
            self.window = _find_tabs_outliner()

        elif self._type == "rover":
            self.connection.command("exec ~/.config/scripts/terminal.sh rover --name=rover_panel")
            sleep(0.095) # TODO : This is Hacky
            self.window = self._find_rover()
        
        self.is_running = True
Ejemplo n.º 3
0
def runBrowser():
    print("Opening in browser...")
    sh.chromium(url)