Clock activity: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
m (Reverted edits by 99.92.174.234 (Talk) to last version by Garycmartin)
 
(23 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Activity migrated to sl.o
| homepage=http://wiki.sugarlabs.org/go/Activities/Clock
| download=http://activities.sugarlabs.org/en-US/sugar/addon/4191
| git=http://git.sugarlabs.org/projects/clock
}}

{{Olpcboxtop|toptext=[[{{PAGENAME}}|Clock Activity]]}}
{{Olpcboxtop|toptext=[[{{PAGENAME}}|Clock Activity]]}}
{{ OBX activity |[[Image:Activity-clock.svg|75px]]|extra<!--|{{{text}}}--> }}
{{ OBX activity |[[Image:Activity-clock.svg|75px]]|extra<!--|{{{text}}}--> }}
{{ OBX xobundle|http://wiki.laptop.org/images/5/5a/Clock-2.xo|Clock}}
{{ OBX xobundle|http://wiki.laptop.org/images/4/45/Clock-5.xo|Clock}}
{{ OBX test }}
{{ OBX test |[[Tests/Activity/Clock]]|2008-10-07}}
<!-- {{ OBX devtickets |clock-activity}} -->
<!-- {{ OBX devtickets |clock-activity}} -->
{{ OBX pot
{{ OBX pot
Line 8: Line 14:
}}
}}
<!-- {{ OBX source dev|projects/clock}} -->
<!-- {{ OBX source dev|projects/clock}} -->
<!-- {{ OBX test |[[Tests/Clock|Clock]]|2008-02-02 }} -->
<!-- {{ OBX devtickets |clock-activity}} -->
<!-- {{ OBX devtickets |clock-activity}} -->
<!-- {{ OBX pootle|1=http://dev.laptop.org/git?p=projects/clock;a=blob_plain;f=po/Clock.pot;hb=HEAD|2=extra}} -->
<!-- {{ OBX pootle|1=http://dev.laptop.org/git?p=projects/clock;a=blob_plain;f=po/Clock.pot;hb=HEAD|2=extra}} -->
Line 18: Line 23:
==Description & Goals==
==Description & Goals==


[[Image:clock-nice.jpg|right|300px|thumb|What time is it?]]
[[Image:clock-nice.png|right|300px|thumb|What time is it?]]


===Summary===
===Summary===
Line 26: Line 31:
* To give the children a way to know the time it is, with their XO, even they don't own a watch.
* To give the children a way to know the time it is, with their XO, even they don't own a watch.
The presentation on screen has been kept simple enough to reach these two objectives.
The presentation on screen has been kept simple enough to reach these two objectives.



===Current Use & Goals===
===Current Use & Goals===


Click on right button to change display mode.
Click on the Clock toolbar buttons to change display mode and options.
* Simpler display
* Simple analog display with hours numbers
* With hours numbers
* Date and day
* Nice clock face
* Nice clock face
* Digital clock view
* Digital clock view
* Time in full letters
* Weekday and date
* Talking clock


A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.
A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.
Line 51: Line 56:
|-
|-
| valign="top"|
| valign="top"|
[[Image:clock-simple.jpg|300px|thumb|center|The basic clock face (v1)]]
[[Image:clock-simple.png|300px|thumb|center|The basic clock face (v5)]]
| valign="top"|
| valign="top"|
[[Image:clock-nice.jpg|300px|thumb|center|The nice clock face (v1)]]
[[Image:clock-nice-spanish.png|300px|thumb|center|The nice clock face (v5)]]
|-
|-
| valign="top"|
| valign="top"|
[[Image:clock-simple-hours.jpg|300px|thumb|center|The basic clock face showing hours marks (Roman digits used by the French localization) (v1)]]
[[Image:clock-digital-french.png|300px|thumb|center|French digital clock (v5)]]
| valign="top"|
| valign="top"|
[[Image:clock-nice-date.jpg|300px|thumb|center|The nice clock face displaying the date with French localization (v1)]]
[[Image:clock-simple-spanish.png|300px|thumb|center|Learning time in spanish (v5)]]
|-
|-
|}
|}



===Setting the time on your XO===
===Setting the time on your XO===


You can set the date and time of your XO with the [http://wiki.laptop.org/go/Sugar_Control_Panel#Time Sugar Control Panel].
You can set the date and time of your XO with the [http://wiki.laptop.org/go/Sugar_Control_Panel#Time Sugar Control Panel].



===Packages and History===
===Packages and History===
Line 72: Line 75:
As a Python application, the full source is included in the package for you to enjoy.
As a Python application, the full source is included in the package for you to enjoy.


* Version 2 [[:Image:Clock-2.xo|Clock-2.xo package]]
* Version 5 [[:Image:Clock-5.xo|Clock-5.xo package]]
** Re-coded from scratch to better integrate with Sugar.
* Added Digital Clock.
** Display the current time in full letters, to learn how to write time.
* Better localization support.
** TTS (Time To Speech) support in the talking clock.
* Color code.

* Version 1 [[:Image:Clock-1.xo|Clock-1.xo package]]
* Version 4 [[:Image:Clock-4.xo|Clock-4.xo package]]
* Analog clocks: simple and nice.
** Be a better Sugar citizen: do not draw the clock when the activity does not have the focus, to save resources for other running activities.
* Initial version.
** Run with old Sugar versions.


Version 3 or older versions of Clock activity uses a lot of CPU time, slowing down all other activities that run at the same time. Please upgrade to version 4 (for OS 650, 656 or 8.2) or newer (8.2 and up).


{{Developers}}
{{Developers}}
Line 85: Line 90:
==Development==
==Development==


This code is released in Public Domain, so you can do whatever you want with it. This is simple enough that Python learners can try to add or change features. The whole clock code, with many detailed comments, is a 500 lines Python source.
This code is released in Public Domain, so you can do whatever you want with it. This is simple enough that Python learners can try to add or change features.


Point of interests:
Point of interests:
* PyGTK events programming, when one clicks on right button.
* PyGTK events programming.
* Cairo drawing and Pango layout.
* GTK/GDK drawing and Pango layout.
* Localization. Though a clock face should look quite similar in all cultures, you can adapt the way it displays hours numbers and date. Use of Pango markup allows to adapt the views to cultural representations of date and time.
* Localization. Though a clock face should look quite similar in all cultures, you can adapt the way it displays hours numbers and date. Use of Pango markup allows to adapt the views to cultural representations of date and time.
* SVG rendering. The nice clock background is the SVG file clock.svg (drawn with [http://www.inkscape.org Inkscape]). You can change it to your liking.
* SVG rendering. The nice clock background is the SVG file clock.svg (drawn with [http://www.inkscape.org Inkscape]). You can change it to your liking.
* How to call an external process (espeak) to read the current time aloud.
* A small inference engine to translate time to full letters, where the set of rules can be adapted to new languages.


Look at the README file for notes and ideas.
Look at the README file for notes and ideas.
Line 102: Line 109:
I've provided 3 localizations for French, English and Spanish, but others are welcome!
I've provided 3 localizations for French, English and Spanish, but others are welcome!


Also, the Clock displays the time in full letters and reads it aloud with the espeak command. The translation from a numeric time (3:45) to full letters (a quarter to three AM) is done using a set of inference rules, which are totaly localizable.
:I haven't downloaded it yet to check that it implements this, but did you know that Swahili clocks are angled differently? [[wikipedia:Swahili#Swahili_time]]


=Functional Test=
=Functional Test=
Line 107: Line 116:
* Open the clock activity.
* Open the clock activity.
* Check that it display the current time of the XO.
* Check that it display the current time of the XO.
* On the Clock toolbar, select the display modes from the toolbar buttons.
* Click on right button to change clock face display. Display mode loops (simple + hours + day and date + nice clock + digital).
* Close the activity; ensure that it closes properly.
* Close the activity; ensure that it closes properly.


=Enhancements=
=Enhancements=


* Add continuous display; current display stops after a few minutes requiring a click.
* Better Sugar integration; current display stops after 50 seconds when power saving fires up.
* Context menu to set the date, time, timezone, etc.
* Ability to set the date, time, timezone, etc.
* Add a Big Ben chime and turn it to an alarm clock.
* Add a Calendar toolbar, with locale variations, to learn the current day and month.




[[Category:Software]]
[[Category:Developers]]
[[Category:Sugar]]
{{Activity page
{{Activity page
|icon=Image:Activity-clock.svg
|icon=Image:Activity-clock.svg
|genre=General Search and Discovery
|genre=General Search and Discovery
|short description=The Clock activity aims at two simple goals:
|short description=The Clock activity aims at two simple goals:
* As a teaching tool to help children learn how to read time.

* To give the children a way to know the time it is, with their XO, even they don't own a watch.
* As a teaching tool to help children learn how to read time.
* To give the children a way to know the time it is, with their XO, even they don't own a watch.
|long description=Current Use & Goals
|long description=Current Use & Goals


Select the display mode and options from the Clock toolbar buttons.
Click on right button to change display mode.
* Simple analog display to learn how to read time.
* Nice clock face
* Digital clock view
* Date and day
* Time in full letters
* Talking clock


A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.
* Simpler display
* With hours numbers
* Date and day
* Nice clock face
* Digital clock view

A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.
|contact person=User:Genepi
|contact person=User:Genepi
|language=English, French, Spanish
}}
|language codes=en, es, fr
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/5/5a/Clock-2.xo
|bundle URL=http://wiki.laptop.org/images/4/45/Clock-5.xo
|activity version=2
|activity version=5
|releases=8.2.0 (767)
}}
|devel status=5. Production-stable
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/d/db/Clock-1.xo
|activity version=1
}}
}}

Latest revision as of 18:47, 28 February 2010

?Sugar icon}}    This activity is now hosted at the Sugar Activity Library.

The information here is likely to be out-of-date. Consult the new pages for "Clock activity" first:

Activity-clock.svg
.xo BundleClock.xo
TST Tests/Activity/Clock
Need re-test: 2008-10-07
Translate-icon-55px.svg Localization
.POT file NEEDED

see more templates or propose new


  For the general public

Description & Goals

What time is it?

Summary

The Clock activity aims at two simple goals:

  • As a teaching tool to help children learn how to read time.
  • To give the children a way to know the time it is, with their XO, even they don't own a watch.

The presentation on screen has been kept simple enough to reach these two objectives.

Current Use & Goals

Click on the Clock toolbar buttons to change display mode and options.

  • Simple analog display with hours numbers
  • Nice clock face
  • Digital clock view
  • Time in full letters
  • Weekday and date
  • Talking clock

A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.


Other uses

Learn how to find geographical North (or South, depending in which hemisphere you are located) using the clock hands: Findind True North Without a Compass. And from there, build a solar clock!


Screenshots

The basic clock face (v5)
The nice clock face (v5)
French digital clock (v5)
Learning time in spanish (v5)

Setting the time on your XO

You can set the date and time of your XO with the Sugar Control Panel.

Packages and History

As a Python application, the full source is included in the package for you to enjoy.

  • Version 5 Clock-5.xo package
    • Re-coded from scratch to better integrate with Sugar.
    • Display the current time in full letters, to learn how to write time.
    • TTS (Time To Speech) support in the talking clock.
  • Version 4 Clock-4.xo package
    • Be a better Sugar citizen: do not draw the clock when the activity does not have the focus, to save resources for other running activities.
    • Run with old Sugar versions.

Version 3 or older versions of Clock activity uses a lot of CPU time, slowing down all other activities that run at the same time. Please upgrade to version 4 (for OS 650, 656 or 8.2) or newer (8.2 and up).


Development

This code is released in Public Domain, so you can do whatever you want with it. This is simple enough that Python learners can try to add or change features.

Point of interests:

  • PyGTK events programming.
  • GTK/GDK drawing and Pango layout.
  • Localization. Though a clock face should look quite similar in all cultures, you can adapt the way it displays hours numbers and date. Use of Pango markup allows to adapt the views to cultural representations of date and time.
  • SVG rendering. The nice clock background is the SVG file clock.svg (drawn with Inkscape). You can change it to your liking.
  • How to call an external process (espeak) to read the current time aloud.
  • A small inference engine to translate time to full letters, where the set of rules can be adapted to new languages.

Look at the README file for notes and ideas.


Localization

The Clock activity has been written with localization in mind, though a clock should look similar in all cultures. The POT file contains strftime patterns and Pango markup, so that translators can localize the application with more freedom. For instance, they can change the way date or time are displayed, the fonts to use or the size of characters.

I've provided 3 localizations for French, English and Spanish, but others are welcome!

Also, the Clock displays the time in full letters and reads it aloud with the espeak command. The translation from a numeric time (3:45) to full letters (a quarter to three AM) is done using a set of inference rules, which are totaly localizable.

I haven't downloaded it yet to check that it implements this, but did you know that Swahili clocks are angled differently? wikipedia:Swahili#Swahili_time

Functional Test

  • Open the clock activity.
  • Check that it display the current time of the XO.
  • On the Clock toolbar, select the display modes from the toolbar buttons.
  • Close the activity; ensure that it closes properly.

Enhancements

  • Better Sugar integration; current display stops after 50 seconds when power saving fires up.
  • Ability to set the date, time, timezone, etc.
  • Add a Big Ben chime and turn it to an alarm clock.
  • Add a Calendar toolbar, with locale variations, to learn the current day and month.


Activity Summary

Icon: Sugar icon::Image:Activity-clock.svg
Genre: Activity genre::General Search and Discovery
Activity group: ,|x|Activity group::x}}
Short description: [[Short description::The Clock activity aims at two simple goals:
  • As a teaching tool to help children learn how to read time.
  • To give the children a way to know the time it is, with their XO, even they don't own a watch.]]
Description: [[Description::Current Use & Goals

Select the display mode and options from the Clock toolbar buttons.

  • Simple analog display to learn how to read time.
  • Nice clock face
  • Digital clock view
  • Date and day
  • Time in full letters
  • Talking clock

A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.]]

Maintainers: ,|x|Contact person::x}}
Repository URL:
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://wiki.laptop.org/images/4/45/Clock-5.xo
Last tested version number: Activity version::5
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: Devel status::5. Production-stable
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :