예제 #1
0
    def GetTextRtf(self):
        str = "\\par {} {}\\tab {}\\tab ".format(
            self.date,
            GCStrings.GetDayOfWeek(self.date.dayOfWeek)[:2],
            self.GetFullTithiName())

        if GCDisplaySettings.getValue(39):
            str += GCStrings.GetPaksaChar(self.astrodata.nPaksa) + ' '
        else:
            str += '  '

        if GCDisplaySettings.getValue(37):
            str += '\\tab {}'.format(
                GCStrings.GetYogaName(self.astrodata.nYoga))

        if GCDisplaySettings.getValue(36):
            str += '\\tab {}'.format(
                GCStrings.GetNaksatraName(self.astrodata.nNaksatra))

        if GCDisplaySettings.getValue(
                38) and self.nFastType != FastType.FAST_NULL:
            str += "\\tab *"
        else:
            str += "\\tab  "

        if GCDisplaySettings.getValue(41):
            rasi = GCRasi.GetRasi(self.astrodata.moon.longitude_deg,
                                  self.astrodata.msAyanamsa)
            if GCDisplaySettings.getValue(41) == 1:
                str += "\\tab {}".format(GCStrings.GetSankrantiName(rasi))
            else:
                str += "\\tab {}".format(GCStrings.GetSankrantiNameEn(rasi))

        str += "\r\n"
        return str
예제 #2
0
    def GetTextA(self):
        str = "{} {}  {} ".format(
            self.date.__str__().rjust(12, ' '),
            GCStrings.GetDayOfWeek(self.date.dayOfWeek)[:2],
            self.GetFullTithiName().ljust(34, ' '))

        if GCDisplaySettings.getValue(39):
            str += GCStrings.GetPaksaChar(self.astrodata.nPaksa) + ' '
        else:
            str += '  '

        if GCDisplaySettings.getValue(37):
            str += '{}'.format(
                GCStrings.GetYogaName(self.astrodata.nYoga).ljust(10, ' '))

        if GCDisplaySettings.getValue(36):
            str += '{}'.format(
                GCStrings.GetNaksatraName(self.astrodata.nNaksatra).ljust(
                    15, ' '))

        if GCDisplaySettings.getValue(
                38) and self.nFastType != FastType.FAST_NULL:
            str += " *"
        else:
            str += "  "

        if GCDisplaySettings.getValue(41):
            rasi = GCRasi.GetRasi(self.astrodata.moon.longitude_deg,
                                  self.astrodata.msAyanamsa)
            if GCDisplaySettings.getValue(41) == 1:
                str += "   {}".format(
                    GCStrings.GetSankrantiName(rasi).ljust(15, ' '))
            else:
                str += "   {}".format(
                    GCStrings.GetSankrantiNameEn(rasi).ljust(15, ' '))
        return str
예제 #3
0
 def EventText(self):
     if self.nType == CCTYPE_S_ARUN:
         return 'arunodaya'
     elif self.nType == CCTYPE_S_RISE:
         return "sunrise"
     elif self.nType == CCTYPE_S_NOON:
         return "noon"
     elif self.nType == CCTYPE_S_SET:
         return "sunset"
     elif self.nType == CCTYPE_TITHI:
         return GCStrings.GetTithiName(self.nData) + " Tithi starts"
     elif self.nType == CCTYPE_NAKS:
         return GCStrings.GetNaksatraName(self.nData) + " Naksatra starts"
     elif self.nType == CCTYPE_YOGA:
         return GCStrings.GetYogaName(self.nData) + " Yoga starts"
     elif self.nType == CCTYPE_SANK:
         return "Sun enters {}".format(
             GCStrings.GetSankrantiName(self.nData))
     elif self.nType == CCTYPE_CONJ:
         return "conjunction in {} rasi".format(
             GCStrings.GetSankrantiName(self.nData))
     elif self.nType == CCTYPE_KALA_START:
         return GCStrings.GetKalaName(self.nData) + " starts"
     elif self.nType == CCTYPE_KALA_END:
         return GCStrings.GetKalaName(self.nData) + " ends"
     elif self.nType == CCTYPE_M_RISE:
         return "moonrise"
     elif self.nType == CCTYPE_M_SET:
         return "moonset"
     elif self.nType == CCTYPE_ASCENDENT:
         return GCStrings.GetSankrantiName(self.nData) + " ascendent"
     elif self.nType == CCTYPE_M_RASI:
         return "Moon enters {}".format(
             GCStrings.GetSankrantiName(self.nData))
     else:
         return ''
예제 #4
0
    def WriteTodayInfo(self,sb,p):
        sb.AppendLine()
        stream = sb.Target

        for ed in p.dayEvents:
            if 'disp' not in ed or ed['disp'] == -1 or GCDisplaySettings.getValue(ed['disp']):
                if 'spec' in ed:
                    sb.AppendHeader3(ed['text'],fillChar='-')
                else:
                    sb.AppendString(ed['text'])
                sb.AppendLine()

        if GCDisplaySettings.getValue(45):
            tda = p.astrodata.sun.rise
            sb.AppendLine()
            stream.write("Brahma Muhurta {} - {} ({})".format(tda.short(-96), tda.short(-48), GCStrings.GetDSTSignature(p.hasDST)))

        if GCDisplaySettings.getValue(29):
            sb.AppendLine()
            tda = p.astrodata.sun.rise
            stream.write("{} {} ".format(GCStrings.getString(51), tda.short() ))
            if (GCDisplaySettings.getValue(32)):
                stream.write(" sandhya {} - {} ", tda.short(-24), tda.short(24))
            stream.write(" ({})".format(GCStrings.GetDSTSignature(p.hasDST)))
            sb.AppendLine()


        if (GCDisplaySettings.getValue(30)):
            sb.AppendLine()
            tda = p.astrodata.sun.noon
            stream.write("{} {} ".format(GCStrings.getString(857), tda.short() ))
            if (GCDisplaySettings.getValue(32)):
                stream.write(" sandhya {} - {} ", tda.short(-24), tda.short(24))
            stream.write(" ({})".format(GCStrings.GetDSTSignature(p.hasDST)))
            sb.AppendLine()

        if (GCDisplaySettings.getValue(31)):
            sb.AppendLine()
            tda = p.astrodata.sun.set
            stream.write("{} {} ".format(GCStrings.getString(52), tda.short() ))
            if (GCDisplaySettings.getValue(32)):
                stream.write(" sandhya {} - {} ", tda.short(-24), tda.short(24))
            stream.write(" ({})".format(GCStrings.GetDSTSignature(p.hasDST)))
            sb.AppendLine()

        if (GCDisplaySettings.getValue(33)):
            sb.AppendLine()
            sb.AppendString(GCStrings.getString(51) + " info")
            sb.AppendLine()
            sb.AppendString("   Moon in {} {}".format(GCStrings.GetNaksatraName(p.astrodata.nNaksatra), GCStrings.getString(15)))

            if (GCDisplaySettings.getValue(47)):
                sb.AppendString(", {:.1f}% passed ({} Pada)".format(p.astrodata.nNaksatraElapse, GCStrings.getString(811+int(p.astrodata.nNaksatraElapse/25))))

            if (GCDisplaySettings.getValue(46)):
                sb.AppendString(", Moon in {} {}".format( GCStrings.GetSankrantiName(p.astrodata.nMoonRasi), GCStrings.getString(105)))

            sb.AppendString(", {} {}".format(GCStrings.GetYogaName(p.astrodata.nYoga), GCStrings.getString(104)))
            sb.AppendLine()
            sb.AppendString("   Sun in {} {}.".format(GCStrings.GetSankrantiName(p.astrodata.nSunRasi), GCStrings.getString(105)))
            sb.AppendLine()

        sb.AppendNote()
        sb.AppendDocumentTail()