Example #1
0
def render(template, filename, **kwargs):
    """
    Render Content from *argv to filename with template.
    """
    with open(directorymaker(filename), 'w') as f:
        t = jinja.get_template(template)
        f.write(t.render(**kwargs))
Example #2
0
def render(template, filename, **kwargs):
    """
    Render Content from *argv to filename with template.
    """
    with open(directorymaker(filename), 'w') as f:
        t = jinja.get_template(template)
        f.write(t.render(**kwargs))
Example #3
0
def pygments_css(formatter):
    with open(directorymaker('css/pygments.css'), "w") as f:
        f.write(formatter.get_style_defs('.pygments_default'))
Example #4
0
 def test_simpledir(self):
     self.assertEqual(directorymaker("test"), "dst/test")
     self.assertTrue(access("dst", F_OK))
     self.assertFalse(access("dst/test", F_OK))
Example #5
0
 def test_simpledir(self):
     self.assertEqual(directorymaker("test"), "dst/test")
     self.assertTrue(access("dst", F_OK))
     self.assertFalse(access("dst/test", F_OK))
Example #6
0
def pygments_css(formatter):
    with open(directorymaker('css/pygments.css'), "w") as f:
        f.write(formatter.get_style_defs('.pygments_default'))