PyFunceble/iana.py
def update(self):
        """
        Update the content of the `iana-domains-db` file.
        """

        if not PyFunceble.CONFIGURATION["quiet"]:
            # * The quiet mode is not activated.

            # We print on screen what we are doing.
            print("Update of iana-domains-db", end=" ")

        # We loop through the line of the iana website.
        for extension, referer in self._extensions():

            if extension not in self.iana_db or self.iana_db[extension] != referer:
                # We add the extension to the databae.
                self.iana_db[extension] = referer

                # We save the content of the constructed database.
                Dict(self.iana_db).to_json(self.destination)

        if not PyFunceble.CONFIGURATION["quiet"]:
            # The quiet mode is not activated.

            # We indicate that the work is done without any issue.
            print(PyFunceble.INTERN["done"])
def update(self):
        """
        Update the content of the `iana-domains-db` file.
        """

        if not PyFunceble.CONFIGURATION["quiet"]:
            # * The quiet mode is not activated.

            # We print on screen what we are doing.
            print("Update of iana-domains-db", end=" ")

        # We loop through the line of the iana website.
        for extension, referer in self._extensions():

            if extension not in self.iana_db or self.iana_db[extension] != referer:
                # We add the extension to the databae.
                self.iana_db[extension] = referer

                # We save the content of the constructed database.
                Dict(self.iana_db).to_json(self.destination)

        if not PyFunceble.CONFIGURATION["quiet"]:
            # The quiet mode is not activated.

            # We indicate that the work is done without any issue.
            print(PyFunceble.INTERN["done"])
def update ( self ) : if not PyFunceble . CONFIGURATION [ "quiet" ] : # * The quiet mode is not activated. # We print on screen what we are doing. print ( "Update of iana-domains-db" , end = " " ) # We loop through the line of the iana website. for extension , referer in self . _extensions ( ) : if extension not in self . iana_db or self . iana_db [ extension ] != referer : # We add the extension to the databae. self . iana_db [ extension ] = referer # We save the content of the constructed database. Dict ( self . iana_db ) . to_json ( self . destination ) if not PyFunceble . CONFIGURATION [ "quiet" ] : # The quiet mode is not activated. # We indicate that the work is done without any issue. print ( PyFunceble . INTERN [ "done" ] )
Update the content of the `iana-domains-db` file.
Update the content of the iana - domains - db file .