I'd like to propose a couple of minor modifications to the current spec :
KatieParlante20050624
Those modifications will not modify the spirit of the spec and will make implementation easier.
Those are:
- Add a # character to the description row: this will make the code resilient to typos in those lines. It will also allow testers to add comments to the doc.
- Kind appear in each line: this will make parsing easier without burdening the user. It will also allow for items to be listed out of order without breaking the code.
- Reference by displayName: this was listed as a "nice to have" in the spec but it turns out it's easier to implement that way in Python (thanks Python!... :))
- If reference name doesn't exist a new item will be created: was also listed in the "nice to have" and easier to implement than error handling.
- Add a startTime parameter in Note, Task, CalendarEvent, EventTask
- Mail message item available
The translation of those changes in the spec example matrix are in
red in the following table:
collection and email separator = ';'
| #Collection | displayName | | | | | | | | |
| Collection | Home | | | | | | | | |
| Collection | Work | | | | | | | | | |
| |
| #Note | displayName | collection | creationDate | creationTime | | | | | | |
| Note | reading list | Home; Work | 1/11/2005 | | | | | | | |
| Note | restauraunt recommendations | Home | 5/5/2005 | 3:25:00 PM | | | | | | |
| |
| #Task | displayName | collection | dueDate | dueTime | | | | | | |
| Task | read paper | Home | 6/25/2005 | | | | | | | |
| |
| #CalendarEvent | displayName | collection | startDate | startTime | anyTime | allDay | duration | reminderTime | location | importance |
| CalendarEvent | party | | 7/4/2005 | 1:30:00 AM | | TRUE | 120 | | PARIS | |
| |
| #EventTask | displayName | collection | startDate | startTime | anyTime | allDay | duration | reminderTime | location | importance |
| EventTask | meeting | NewCollection; Work | 6/30/2005 | * | | | * | | Office | |
| |
| #MailMessage | subject | collection | dateSent | timeSent | fromAdress | toAdress | outgoing | stampEvent | stampTask | body |
| MailMessage | How are you? | Message | 7/15/2005 | 4:00:00 PM | foo@tralala.org | fifi@bar.com; zaza@tutu.fr | TRUE | | | Hello, How are you fifi... |
Notes on implementation :
- The python script will parse a CSV file (generated from a spreadsheet tool)
- When the token (*) is used for a field the script generate semi-random data for the field
- If a field is not filled a default value is used
- US and EU hour format are allowed
How to invoque the script :
- From the "Generate data from a file" dialog invoked from the "Test" menu
- From the command line using the --createData parameter: ~> release/RunChandler --createData=/User/Home/file.csv
About CSV file format :
- choose field separator = ','
- an example of Excel file : data.xls
- This script is tested to work with the Excel CSV (comma separated) export
- With OpenOffice CSV export choose nothing for text delimiter