Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Read the rst file and return a tuple containing the title and
an HTML string for the post.

        def format_post(rst_file, initial_header_level=4):
    """Read the rst file and return a tuple containing the title and
    an HTML string for the post.
    """
    with open(rst_file, 'r') as f:
        body = f.read()
    return format_post_from_string(body, initial_header_level)
        


src/r/s/rst2marsedit-1.4.1/rst2marsedit/main.py   rst2marsedit(Download)
import tempfile
 
from rst2marsedit.rst2post import format_post
import pkg_resources
 
 
    # Convert RST to HTML
    title, content, parsed_tags = format_post(rst_file)
    tags = [t.encode('ascii')
            for t in parsed_tags + options.tags