biweeklybudget.wishlist2project module

class biweeklybudget.wishlist2project.WishlistToProject[source]

Bases: object

_do_project(list_url, project)[source]

Update a project with information from its wishlist.

Parameters:
  • list_url (str) – Amazon wishlist URL
  • project (Project) – the project to update
Returns:

whether or not the update was successful

Return type:

bool

_get_wishlist(list_name)[source]

Workaround for a bug in wishlist==0.1.2

Parameters:list_name (str) – wishlist name to get
Returns:list of items in wishlist
Return type:list
_get_wishlist_projects()[source]

Find all projects with descriptions that begin with a wishlist URL.

Returns:list of (url, Project object) tuples
Return type:list
_project_items(proj)[source]

Return all of the BoMItems for the specified project, as a dict of URL to BoMItem.

Parameters:proj (Project) – the project to get items for
Returns:item URLs to BoMItems
Return type:dict
static _url_is_wishlist(url)[source]

Determine if the given string or URL matches a wishlist.

Parameters:url (str) – URL or string to test
Returns:whether url is a wishlist URL
Return type:bool
_wishlist_items(list_url)[source]

Get the items on the specified wishlist.

Parameters:list_url (str) – wishlist URL
Returns:dict of item URL to item details dict
Return type:dict
run()[source]

Run the synchronization.

Returns:2-tuple; count of successful syncs, total count of projects with associated wishlists
Return type:tuple
biweeklybudget.wishlist2project.main()[source]
biweeklybudget.wishlist2project.parse_args()[source]