Straw handles data coming from news feeds, gconf, dbus, environment variables, and the user. Data that persists over restarts is stored in the gconf subtree /apps/straw, the pickle file ~/.straw/config, and the BerkeleyDB database ~/.straw/itemstore.db.

OPML category subscription

Class: straw.feeds.OPMLCategorySubscription

Persistent fields:

  • type
  • location
  • username
  • password
  • frequency
  • last_poll
  • error

Non-persistent attributes:

  • contents

Feed categories

Class: straw.feeds.FeedCategory

Persistent fields:

  • title
  • subscription
  • for each feed:
    • id
    • from_subscription

Non-persistent attributes:

  • feedlist

Pseudo categories

Class: straw.feeds.PseudoCategory

Persistent fields:

  • pseudo
  • title
  • for each feed:
    • id
    • from_subscription

News feeds

Class: straw.feeds.Feed

Persistent fields:

  • title
  • location
  • username
  • password
  • id
  • channel_description
  • channel_title
  • channel_link
  • channel_copyright
  • channel_creator
  • error
  • items_stored
  • poll_freq
  • last_poll
  • n_items_unread

Non-persistent slots:

  • parsed
  • items
  • slots
  • channel_lbd
  • channel_editor
  • channel_webmaster
  • process_status
  • router
  • sticky
  • parent

Attributes:

  • item_order_reverse
  • item_stored_num
  • items_loaded

News posts

Class: straw.SummaryItem.SummaryItem

Persistent fields:

  • title
  • link
  • description
  • guid
  • guidislink
  • pub_date
  • source
  • images
  • seen
  • id
  • fm_license
  • fm_changes
  • creator
  • contributors
  • license_urls
  • publication_{name,volume,number,section,starting_page}
  • sticky
  • enclosures

Of these, the following are searchable:

  • title
  • description
  • fm_license
  • fm_changes
  • creator
  • contributors

Non-persistent slots:

  • feed

Database

Classes: straw.ItemStore.ItemStore, straw.ItemStore.MyDB

Schema "key": value:

  • "fids:%d" % feed_id: feed item ids
  • "%d:%d" % (feed_id, item_id): item
  • "images": image urls
  • "imagecount:%s % image_url: image count
  • "image:%s" % image_url: image data
  • "straw_db_version": db version

The BerkeleyDB can be viewed with the command

 db4.2_dump -p ~/.straw/itemstore.db

Config options

Class: straw.Config.Config

In GConf:

  • int: last poll
  • int: items stored
  • bool: item order
  • string: browser command
  • int and int: window size w and h
  • int and int: main and sub pane position
  • bool: offline mode
  • bool: window maximization mode
  • float: magnification
  • int: poll frequency

 $ gconftool-2 -R /apps/straw

In the pickle file:

  • feed id sequence number
  • feeds
  • categories

 >>> import cPickle
 >>> cPickle.load(".straw/config")

Whether ~/.straw exists already:

  • first time

os.getenv('STRAW_RELOAD_CSS') is not None

  • reload css

Proxy configuration

In environment variables:

  • as provided by urllib.getproxies()

If a proxy is not available in the environment variables, refer to gconf instead:

  • subtree /system/http_proxy

Attic/Straw/DataModel (last edited 2018-01-14 21:30:10 by SvitozarCherepii)