FS#11989 - Contacts plugin written in LUA
Rockbox already exists for several years (fortunately), however it doesn't include a contacts list plugin by default, most likely because no one had coded one until now. As it's something that sometimes becomes handy, I decided to write my own, and as it's a simple enough plugin I've written it in LUA, to serve the purpose of a contacts plugin, to have a working example of a LUA plugin (that is not a game) and to explore the (im)possibilities of the LUA interpreter of Rockbox.
So this task will handle the development of a contacts plugin. Attached goes a BETA (but already very complete) version of the plugin. Just copy to your device (any location) and "play" the file.
The database where the contacts are stored is located at the root of your player, in a file called contacts.txt. The name and location of this file is subject to change in future versions, but the way contents are stored will probably keep being the same, so you can start adding your contacts (you can edit the file in the PC as long as you keep the format valid for LUA interpretation).
Key features (already implemented):
- View first, middle and last name of the contacts just after you open the plugin (fixed name order)
- Add contacts (lots of fields, I won't be adding more for now)
- Delete contacts (permanently and without confirmation, take care)
- View contact fields (after selecting it in the menu)
- View specific fields in their own screen (where you can also clear and, in the future, edit them)
- (Should be) Compatible with any Rockbox target that interprets LUA because the interface is entirely made of standard RB menus
- Works (at least) on my iPod Nano 2nd Gen
- Wonderful LACK OF warranty that it will work or that the plugin won't delete your contacts accidentally. Use keeping in mind this is a BETA version
To be implemented (for sure):
- Edit contacts
To be implemented (when I have time):
- Order the way names are displayed (e.g. first->middle->last to last->first->middle)
- Search for contacts by inputing part of any of the fields content
- Order contacts by categories (that's why there's a "Category" field on them)
To be implemented (if my programming skills allow it):
- Associate a image file to a contact, which will be shown when the contact is selected (and if someone codes it, why not a pictureflow of contacts?)
- Import and export contacts as vCards
- More configurable settings
Another additional note is that the current code of the plugin is not in agreement with the Rockbox coding style guidelines, I've tried to keep the number of chars in each line under 80, but there are lines where this is false. Also, the tabs are double-space instead of four spaces. This will be corrected when I finish the plugin.
Please test on your player and share the results, as well as any bugs or suggestions you might find.