1
0
mirror of https://github.com/gryf/pygtkworldclock.git synced 2025-12-17 11:30:21 +01:00
2018-06-10 20:25:29 +02:00
2018-06-10 20:25:29 +02:00
2018-06-10 20:25:29 +02:00
2018-06-10 20:25:29 +02:00
2018-06-10 20:25:29 +02:00

This is simple world clock application written in Python and Cairo.

Requirement

  • Python3

  • PyCairo

  • PyGObject

Configuration

See example.yaml for reference. Basically config file is a YAML file, which contain a definition of timezone and the label, which in the end maps as python dictionary:

{'tz': 'string of timezone'
 'label': 'string of some label'}

For example, single clock can be represended as:

---
-
  tz: UTC
  label: The real world clock

which would have an effect:

single clock

Note, that it have to be a list in YAML format (line started with -) followed by a definition of key-value of timezone and a label. Analogically, several clocks (let's take an example of US timezones) can be vertically arranged by providing a list of key-values:

---
-
  tz: US/Hawaii
  label: Honolulu, Hawaii, US
-
  tz: US/Alaska
  label: Anchorage, Alaska, US
-
  tz: US/Pacific
  label: Portland, Oregon, US
-
  tz: US/Mountain
  label: Salt Lake City, Utah, US
-
  tz: US/Central
  label: Austin, Texas, US
-
  tz: US/Eastern
  label: New York, US

and the result:

single clock

Same in horizontal arragement:

---
-
  -
    tz: US/Hawaii
    label: Honolulu, Hawaii, US
  -
    tz: US/Alaska
    label: Anchorage, Alaska, US
  -
    tz: US/Pacific
    label: Portland, Oregon, US
  -
    tz: US/Mountain
    label: Salt Lake City, Utah, US
  -
    tz: US/Central
    label: Austin, Texas, US
  -
    tz: US/Eastern
    label: New York, US

obviously the result would be:

single clock

And finally the same in two rows, three columns:

---
-
  -
    tz: US/Hawaii
    label: Honolulu, Hawaii, US
  -
    tz: US/Alaska
    label: Anchorage, Alaska, US
  -
    tz: US/Pacific
    label: Portland, Oregon, US
-
  -
    tz: US/Mountain
    label: Salt Lake City, Utah, US
  -
    tz: US/Central
    label: Austin, Texas, US
  -
    tz: US/Eastern
    label: New York, US

which will look like that:

single clock

You can experiment to get the layout of your choice.

License

Description
Simple world clock application written in Python and Cairo
Readme Multiple Licenses 181 KiB
Languages
Python 100%