Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryaderv <yajosev@gmail.com>2011-03-22 15:43:27 (GMT)
committer yaderv <yajosev@gmail.com>2011-03-22 15:43:27 (GMT)
commit27c3a0ab2ec2b377f2300e42383fce1ff62b8c2c (patch)
tree9bafcec696471e9f991157b5d8412021c01c6d20
parentc93911fbeb281463d7663db4173260e4fc8cd0ed (diff)
bug fixed
-rwxr-xr-xMANIFEST2
-rw-r--r--archivo.py14
-rw-r--r--calendario.py1
-rw-r--r--dist/Calendario-3.xobin33457 -> 28010 bytes
4 files changed, 10 insertions, 7 deletions
diff --git a/MANIFEST b/MANIFEST
index daa6309..f3d7bd8 100755
--- a/MANIFEST
+++ b/MANIFEST
@@ -11,7 +11,7 @@ activity/icono_calendario.svg
locale/es/activity.linfo
po/es.po
-.calendario.py.swp
+
locale/es/LC_MESSAGES/org.laptop.Calendario.mo
activity/icono2.svg
diff --git a/archivo.py b/archivo.py
index 73e7f13..75748cc 100644
--- a/archivo.py
+++ b/archivo.py
@@ -95,21 +95,23 @@ def abrir_archivo(path, archivo):
archivo.close()
return texto
-def guardar_archivo(path, file_name, archivo):
+def guardar_archivo(path, file_name, tipo_archivo):
'''import, convert and save a new ephemeris/phrases database'''
- if archivo is 1:
+ if tipo_archivo is 1:
path = path + '/data/efemerides.pkl'
- elif archivo is 2:
+ elif tipo_archivo is 2:
path = path + '/data/frase.pkl'
di = {}
archivo = open(file_name, 'r')
lines = archivo.readlines()
for i in range(len(lines)):
- current_text = lines[i][10 : len(lines[i]) - 2]
-
+ if tipo_archivo is 1:
+ current_text = lines[i][10 : len(lines[i]) - 2]
+ else:
+ current_text = lines[i][4 : len(lines[i]) - 2]
for j in range(30, len(current_text),30):
current_text = current_text[:j] + '\n' + current_text[j:]
- if archivo is 1:
+ if tipo_archivo is 1:
current_id = lines[i][0 : 8]
else:
current_id = lines[i][0 : 2]
diff --git a/calendario.py b/calendario.py
index 94dea53..24998a9 100644
--- a/calendario.py
+++ b/calendario.py
@@ -96,6 +96,7 @@ class CalendarioActivity(activity.Activity):
if comprobar_archivo(self.path, 'efemeride'):
self.texto = abrir_archivo(self.path, 'efemeride')
self._log.debug(self.texto)
+ self._log.debug(self.fecha_normal.fecha_especial())
if self.fecha_normal.fecha_especial() in self.texto:
self.buffer.set_text(self.texto[self.fecha_normal.fecha_especial()])
diff --git a/dist/Calendario-3.xo b/dist/Calendario-3.xo
index a7f39e6..687f010 100644
--- a/dist/Calendario-3.xo
+++ b/dist/Calendario-3.xo
Binary files differ