~mtrovo/pomodoro-indicator/main

« back to all changes in this revision

Viewing changes to bin/pomodoro-indicator

  • Committer: Marcos Alejandro Vanetta
  • Date: 2011-08-26 04:56:46 UTC
  • Revision ID: git-v1:706dcfdd0e620ba9c2a7a9423bcd1fefc9902621
reconfigure towards setup.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
#-*- coding:utf-8 -*-
 
3
 
 
4
#
 
5
# Copyright 2011 malev.com.ar
 
6
#
 
7
# Author: Marcos Vanetta <marcosvanetta@gmail.com>
 
8
#
 
9
# This program is free software: you can redistribute it and/or modify it
 
10
# under the terms of either or both of the following licenses:
 
11
#
 
12
# 1) the GNU Lesser General Public License version 3, as published by the
 
13
# Free Software Foundation; and/or
 
14
# 2) the GNU Lesser General Public License version 2.1, as published by
 
15
# the Free Software Foundation.
 
16
#
 
17
# This program is distributed in the hope that it will be useful, but
 
18
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
19
# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
 
20
# PURPOSE.  See the applicable version of the GNU Lesser General Public
 
21
# License for more details.
 
22
#
 
23
# You should have received a copy of both the GNU Lesser General Public
 
24
# License version 3 and version 2.1 along with this program.  If not, see
 
25
# <http://www.gnu.org/licenses/>
 
26
#
 
27
 
 
28
# ICONS
 
29
# http://www.softicons.com/free-icons/food-drinks-icons/veggies-icons-by-icon-icon/tomato-icon
 
30
 
 
31
import sys
 
32
import os
 
33
# this will be replaced at install time
 
34
 
 
35
INSTALLED_BASE_DIR = "@ INSTALLED_BASE_DIR @"
 
36
 
 
37
# get the replaced-at-install-time name if exists, or the project one
 
38
if os.path.exists(INSTALLED_BASE_DIR):
 
39
    project_basedir = INSTALLED_BASE_DIR
 
40
else:
 
41
    project_basedir = os.path.abspath(os.path.dirname(os.path.dirname(
 
42
                                            os.path.realpath(sys.argv[0]))))
 
43
 
 
44
if project_basedir not in sys.path:
 
45
    sys.path.insert(0, project_basedir)
 
46
 
 
47
from pomodoro-indicator import visual
 
48
 
 
49
indicator = visual.PomodoroIndicator()
 
50
indicator.main()
 
51
 
 
52
 
 
53