def writeFromDataTheVersionNumber(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheVersionNumber

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = ( str(self.logotherasdata.informations.version_number),
                  )

        article = article.setAsSimpleArticle( artiname = VERSION_NUMBER_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheDictName(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheDictName

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = ( str(self.logotherasdata.informations.dictname),
                  )

        article = article.setAsSimpleArticle( artiname = ARTINAME_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheArtCategories(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheArtCategories

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = []
        for art_category in self.logotherasdata.informations.articlecategories:
            lines.append( art_category )

        article = article.setAsSimpleArticle( artiname = ARTCATEGORIES_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheCreationDate(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheCreationDate

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        # format @003
        lines = ( datetime.datetime.strftime(self.logotherasdata.informations.creation_date,
                                             CREATION_DATE_FORMAT),
                  )

        article = article.setAsSimpleArticle( artiname = CREATION_DATE_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheDictLanguage(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheDictLanguage

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        textdbdict_dictlanguages = DictLanguages(self.errors)
        textdbdict_dictlanguages.initFromInfosDictLanguages( \
                                                self.logotherasdata.informations.dict_languages)

        lines = ( textdbdict_dictlanguages.getTextDBDictRepr(),
                  )

        article = article.setAsSimpleArticle( artiname = FILE_LANGUAGES_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheEditions(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheEditions

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = []
        for edition in self.logotherasdata.informations.editions:
            value = self.logotherasdata.informations.editions[edition]
            lines.append( "{0:30} {1} {2}".format(edition,
                                                  INFOFILE_MAINSEPARATOR,
                                                  value ))

        article = article.setAsSimpleArticle( artiname = EDITIONS_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheAuthorsGroups(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheAuthorsGroups

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = []
        for authors_group in self.logotherasdata.informations.authors_groups:
            value = self.logotherasdata.informations.authors_groups[authors_group]
            lines.append( "{0:30} {1} {2:06X}".format(authors_group,
                                                  INFOFILE_MAINSEPARATOR,
                                                  value ))


        article = article.setAsSimpleArticle( artiname = AUTHORS_GROUPS_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheTranslSources(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheTranslSources

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = []
        for tsource in self.logotherasdata.informations.translations_sources:
            value = self.logotherasdata.informations.translations_sources[tsource]
            lines.append( "{0:30} {1} {2}".format(tsource,
                                                  INFOFILE_MAINSEPARATOR,
                                                  value ))


        article = article.setAsSimpleArticle( artiname = TRANSCRIPTIONS_SOURCES_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheLicenses(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheLicenses

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        # we use "_license" instead of "license" to avoid a message from Pylint :
        lines = []
        for _license in self.logotherasdata.informations.licenses:
            value = self.logotherasdata.informations.licenses[_license]
            lines.append( "{0:30} {1} {2}".format(_license,
                                                  INFOFILE_MAINSEPARATOR,
                                                  value))

        article = article.setAsSimpleArticle( artiname = LICENSES_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheAuthors(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheAuthorsGroups

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = []
        for author in self.logotherasdata.informations.authors:
            value = self.logotherasdata.informations.authors[author]
            lines.append( "{0:30} {1} {2} {3} {4}".format(author,
                                                          INFOFILE_MAINSEPARATOR,
                                                          value.localized_name,
                                                          INFOFILE_SECONDARYSEPARATOR,
                                                          value.group,
                                                          ))

        article = article.setAsSimpleArticle( artiname = AUTHORS_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())
    def writeFromDataTheWorksTitles(self, destfile):
        """
                TextDBDictInfoFile.writeFromDataTheWorksTitlesGroups

                destfile        :       (file descriptor)
        """
        article = Article( errors = self.errors,
                           logotherasdata = self.logotherasdata)

        lines = []
        for works_title in self.logotherasdata.informations.works_titles:
            value = self.logotherasdata.informations.works_titles[works_title]
            lines.append( "{0:30} {1} {2} {3} {4}".format(works_title,
                                                          INFOFILE_MAINSEPARATOR,
                                                          value.author,
                                                          INFOFILE_SECONDARYSEPARATOR,
                                                          value.localized_title,
                                                          ))

        article = article.setAsSimpleArticle( artiname = WORKS_TITLES_ARTICLE,
                                              lines = lines)

        destfile.write(article.getTextDBDictRepr())