How to add/import an ephemeris database in Calendario 3
Publicado: 28/12/2010 Archivado en: Uncategorized | Tags: sugar Deja un comentario »Hi people..
On the after christmas days I interested to inprove my sugar activity Calendario, I had been thinking add a new feature that allows to import an ephemeris database, so I worked in the way to convert from a conventional format and save it like a file that the activity would read.
First I thought in the convertion algorithm, and I wrote a funny python script that take a file saved such as .csv with OpenOffice Calc and create a new file including python objects, in this case a data dictionary. Afterwards I worked in the graphic interface, I added a customized toolbox with special buttons.
Step 1 Create a .csv
A comma-separated values or character-separated values (CSV) file is a simple text format for a datebase table.
Via Wikipedia: http://en.wikipedia.org/wiki/Comma-separated_values
We have to create a new csv file, I use to work with OpenOffice Calc, but I assume excel would do the same. This is an example of one file:
The date format is DAY/MONTH/YEAR all in number, this is very important for the aplication.
Now we save the document like .cvs, be carefully in indicate just one ‘ for separate the text
Step 2 Import the file
The activity has a new toolbar and two news buttons the first one with the laptop icon is for the calendar interface and the other for the file navigator.
Now we search our file, and click over the button… and done. Now we have to restart the activity and we’ll see the ephemeris.


