Example #1
0
    def view(self, archive, source_fs):
        args = self.args
        import tempfile
        docs_output_path = os.path.join(tempfile.tempdir, '__moyadocs__')
        output_fs = OSFS(docs_output_path, create=True)
        out_path = output_fs.desc('/')

        if args.theme is None:
            from ... import docgen
            theme_path = os.path.join(os.path.dirname(docgen.__file__), 'themes/default')
        else:
            theme_path = args.theme
        theme_fs = self.get_fs(theme_path)

        from ...docgen.builder import Builder
        builder = Builder(source_fs, output_fs, theme_fs)
        index = builder.build()
        import webbrowser
        webbrowser.open(index)
Example #2
0
    def view(self, archive, source_fs):
        args = self.args
        import tempfile
        docs_output_path = os.path.join(tempfile.tempdir, '__moyadocs__')
        output_fs = OSFS(docs_output_path, create=True)
        out_path = output_fs.desc('/')

        if args.theme is None:
            from ... import docgen
            theme_path = os.path.join(os.path.dirname(docgen.__file__),
                                      'themes/default')
        else:
            theme_path = args.theme
        theme_fs = self.get_fs(theme_path)

        from ...docgen.builder import Builder
        builder = Builder(source_fs, output_fs, theme_fs)
        index = builder.build()
        import webbrowser
        webbrowser.open(index)