(story, sketch_id, export_format='markdown')
Returns a story in a format as requested in export_format.

        Args:
            story: a story object (instance of Story) that is to be exported.
            sketch_id: integer with the sketch ID.
            export_format: string with the name of the format to export the
                story to. Defaults to "markdown".

        Returns:
            The exported story in the format described. This could be a text
            or a binary, depending on the output format.
Returns a story in a format as requested in export_format.
Returns a story in a format as requested in export_format .
def _export_story(story, sketch_id, export_format='markdown'):
        """Returns a story in a format as requested in export_format.

        Args:
            story: a story object (instance of Story) that is to be exported.
            sketch_id: integer with the sketch ID.
            export_format: string with the name of the format to export the
                story to. Defaults to "markdown".

        Returns:
            The exported story in the format described. This could be a text
            or a binary, depending on the output format.
        """
        exporter_class = story_export_manager.StoryExportManager.get_exporter(
            export_format)
        if not exporter_class:
            return b''

        with exporter_class() as exporter:
            data_fetcher = story_api_fetcher.ApiDataFetcher()
            data_fetcher.set_sketch_id(sketch_id)

            exporter.set_data_fetcher(data_fetcher)
            exporter.set_title(story.title)
            exporter.set_creation_date(story.created_at.isoformat())
            if story.user:
                exporter.set_author(story.user.username)
            exporter.set_exporter(current_user.username)

            exporter.from_string(story.content)
            return exporter.export_story()
def _export_story ( story , sketch_id , export_format = 'markdown' ) : exporter_class = story_export_manager . StoryExportManager . get_exporter ( export_format ) if not exporter_class : return b'' with exporter_class ( ) as exporter : data_fetcher = story_api_fetcher . ApiDataFetcher ( ) data_fetcher . set_sketch_id ( sketch_id ) exporter . set_data_fetcher ( data_fetcher ) exporter . set_title ( story . title ) exporter . set_creation_date ( story . created_at . isoformat ( ) ) if story . user : exporter . set_author ( story . user . username ) exporter . set_exporter ( current_user . username ) exporter . from_string ( story . content ) return exporter . export_story ( )