Ejemplo n.º 1
0
    def test_extract_file_tarfile(self):
        src_files = sorted(os.listdir(self.source))

        extracted = extract_file(self.tar, self.base)

        extracted_files = sorted(os.listdir(extracted))

        self.assertEqual(extracted_files, src_files)
Ejemplo n.º 2
0
    def run(self, args=None):
        self.parse_args(args)

        if self.url:
            try:
                response = request.urlretrieve(self.url)
                self.path = response[0]
            except Exception:
                raise

        move_and_replace(
            extract_file(self.path),
            os.path.join(os.path.dirname(flask_reveal.__file__), 'static/'))
Ejemplo n.º 3
0
    def run(self, args=None):
        self.parse_args(args)

        if self.url:
            try:
                response = request.urlretrieve(self.url)
                self.path = response[0]
            except Exception:
                raise

        move_and_replace(
            extract_file(self.path),
            os.path.join(os.path.dirname(flask_reveal.__file__), 'static/')
        )
Ejemplo n.º 4
0
    def run(self, args=None):
        self.parse_args(args)

        print('Downloading reveal.js...')

        if self.url:
            try:
                response = urlretrieve(self.url)
                self.path = response[0]
            except Exception:
                raise

        print('Installing reveal.js...')

        move_and_replace(
            extract_file(self.path),
            os.path.join(os.path.dirname(flask_reveal.__file__), 'static/')
        )

        print('Installation complete!')