User Tools

Site Tools


article_queue.py

article_queue.py

This python script is intended to keep track of a list of articles you intend to read (but don't need permanent bookmarks to). This script is designed with uzbl_tabbed.py in mind. I developed this because I have a strong tenancy to open a ton of tabs, and then not feel like reading the article right now. This behavior resulted in me regularly topping 100 tabs. This script allows me to close out tabs by appending them to the queue, and then when I feel like reading something, I can pop articles out

Download

Experimental

Configuration

@cbind    qpu             = spawn @scripts_dir/article_queue.py push
@cbind    qpo             = spawn @scripts_dir/article_queue.py pop
@cbind    qp _            = spawn @scripts_dir/article_queue.py pop %s
@cbind    qap             = spawn @scripts_dir/article_queue.py append
@cbind    qsh             = spawn @scripts_dir/article_queue.py shift
@cbind    q>              = spawn @scripts_dir/article_queue.py forward
@cbind    q<              = spawn @scripts_dir/article_queue.py back
@cbind    ql              = spawn @scripts_dir/article_queue.py list

Dependencies

Required

  • python 2.5-2.6 (May work on 2.4 but un-tested on that version)
  • simplejson (python json library)

Usage

This script will let you queue articles that you have opened for later consumption. The script offers the basic queue commands:

  • append - appends the current article to the queue (the article will now be at the end queue). Exits the current uzbl process after the article is queued (closes the tab)
  • pop - pops the top uri off of the top of the queue, and loads it in the current uzbl window/tab. can take a number to pop a specific article from the middle of the queue.
  • push - pushes the current article onto the queue, treating it like a stack (the article will now be in the front of the queue). Exits the current uzbl process after the article is queued (closes the tab)
  • shift - shifts the bottom uri off of the queue, and loads it in the current uzbl window/tab.

There are also some other commands for dealign with the queue:

  • forward - appends the current article to the queue, and pops the top of the queue and loads it in the current uzbl window/tab
  • back - pushs the current article onto the queue, and shifts the bottom of the queue and loads it in the current uzbl
  • list - pops up a javascript alert listing the current queue's titles.

Note

article_queue.py assumes that you have the XDG_CONFIG_HOME environment variable set, and that the directory pointed at contains a uzbl directory.

article_queue.py.txt · Last modified: 2016/08/31 14:10 (external edit)