- Status Closed
- Percent Complete
- Task Type Patches
- Category Plugins
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Release 3.4
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#10820 - Shopper, a shopping list plugin
This is a shopping list plugin. I used the text editor plugin as a starting point, so in theory this plugin should run on any of the devices the text editor can run on, although I’ve only tested it on the Sansa Fuze v1.
To apply the patch, go to the level above your rockbox source directory and do patch -p0 < shopper.patch.
Hope you will find it of use; I’ve been using it for some time for my weekly food shopping!
Description
Shopper is a shopping list plugin which allows you to maintain reusable shopping lists. You should create a text file called <name>.list, for example shopping.list, and use a text editor to make a list the items you might want to buy. You will later be able to select which of these items you want to buy at a particular time. If you want to separate the items you can do so by creating categories, which are prepended with ‘#’.
For example, shopping.list could contain
# groceries
bananas
cucumber
4 apples
6 apples
# dairy
milk
cheese
Note that it isn’t possible to choose exact quantities, so I often create a number of entries with different quantities in the name of the item, such as for the apples in the above example.
Once you’ve made your list, if you select the filename in the file viewer in Rockbox, Shopper will load it automatically.
There are two modes, edit mode and view mode. The edit mode shows all the items, and it allows you to select which of the items you want to buy. When you have finished selecting the items, use the menu to go to the view mode, and you will see only the items you wish to buy. If you ‘select’ an item in view mode then that item will be removed from the list.
When you exit Shopper the last view is saved, including which items you have selected, so if you re-open the shopping list it will be as you left it. There are additional menu options for clearing the list, selecting all items, showing and hiding the categories, toggling the categories, and displaying the playback menu.
2010-08-18 09:11
Reason for closing: Accepted
Additional comments about closing: Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407
committed in r 27842, thanks.
btw a
manual page would be nice ;)
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
hi, sounds like a useful thing.
some comments.
* the category for this plugin in apps/plugins/CATEGORIES should probably be “viewers” instead of “apps” since it just returns an error if started without parameter so there’s no need to have it in the apps list.
* you break some style guidelines, see docs/CONTRIBUTING specifically “structs are structs, not typedefs” and “Braces for function declarations are put in a new line under the name”
also, ther’s no overflow checking in load_file() it the list is too long this seems like it could overwrite arbitrary memory
Hi Nils, many thanks for the feedback.
I’ve taken your comments into consideration and have provided a new patch, which should adhere to the style guidelines. As you suggested, I’ve also added some checks to the file load function which should take care of long lists, and also some checks that the view information contained at the end of the file is valid.
Let me know if you’d like me to make any further changes, as I’m quite keen to get Shopper included in the Rockbox distribution