Exemple #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
Exemple #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