(self, expression, pause="", no_trunc="")
Print search header and loop over search results
Print search header and loop over search results
Print search header and loop over search results
def _search_repositories(self, expression, pause="", no_trunc=""):
        """Print search header and loop over search results"""
        term_lines, dummy = HostInfo().termsize()
        term_lines -= 2
        fmt = "%-55.80s %8.8s %-70.70s %5.5s"
        if no_trunc:
            fmt = "%-55s %8s %-70s %5s"
        while True:
            lines = term_lines
            while lines > 0:
                repo_list = \
                        self.dockerioapi.search_get_page(expression, term_lines)
                if not repo_list:
                    return self.STATUS_OK
                if lines == term_lines:
                    Msg().out(fmt % \
                        ("NAME", "OFFICIAL", "DESCRIPTION", "STARS"), l=Msg.INF)
                if len(repo_list["results"]) > lines:
                    print_lines = lines
                else:
                    print_lines = len(repo_list["results"])
                lines -= print_lines
                self._search_print_lines(repo_list, print_lines, fmt)
            if pause and not self.dockerioapi.search_ended:
                if GET_INPUT("[return or q to quit]") in ('q', 'Q', 'e', 'E'):
                    return self.STATUS_OK
def _search_repositories ( self , expression , pause = "" , no_trunc = "" ) : term_lines , dummy = HostInfo ( ) . termsize ( ) term_lines -= 2 fmt = "%-55.80s %8.8s %-70.70s %5.5s" if no_trunc : fmt = "%-55s %8s %-70s %5s" while True : lines = term_lines while lines > 0 : repo_list = self . dockerioapi . search_get_page ( expression , term_lines ) if not repo_list : return self . STATUS_OK if lines == term_lines : Msg ( ) . out ( fmt % ( "NAME" , "OFFICIAL" , "DESCRIPTION" , "STARS" ) , l = Msg . INF ) if len ( repo_list [ "results" ] ) > lines : print_lines = lines else : print_lines = len ( repo_list [ "results" ] ) lines -= print_lines self . _search_print_lines ( repo_list , print_lines , fmt ) if pause and not self . dockerioapi . search_ended : if GET_INPUT ( "[return or q to quit]" ) in ( 'q' , 'Q' , 'e' , 'E' ) : return self . STATUS_OK