PageRenderTime 55ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/_build/html/api/file_system_helper.html

https://github.com/MarcinOS/librepy
HTML | 145 lines | 136 code | 9 blank | 0 comment | 0 complexity | f4e79e02b0fb1a3f64a4a1de69ebc90c MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>file_system_helper &mdash; librepy v0.1 documentation</title>
  7. <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '0.1',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <link rel="top" title="librepy v0.1 documentation" href="../index.html" />
  22. <link rel="up" title="API" href="index.html" />
  23. <link rel="next" title="models" href="models.html" />
  24. <link rel="prev" title="epub_gen" href="epub_gen.html" />
  25. </head>
  26. <body>
  27. <div class="related">
  28. <h3>Navigation</h3>
  29. <ul>
  30. <li class="right" style="margin-right: 10px">
  31. <a href="../genindex.html" title="General Index"
  32. accesskey="I">index</a></li>
  33. <li class="right" >
  34. <a href="../py-modindex.html" title="Python Module Index"
  35. >modules</a> |</li>
  36. <li class="right" >
  37. <a href="models.html" title="models"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="epub_gen.html" title="epub_gen"
  41. accesskey="P">previous</a> |</li>
  42. <li><a href="../index.html">librepy v0.1 documentation</a> &raquo;</li>
  43. <li><a href="index.html" accesskey="U">API</a> &raquo;</li>
  44. </ul>
  45. </div>
  46. <div class="document">
  47. <div class="documentwrapper">
  48. <div class="bodywrapper">
  49. <div class="body">
  50. <div class="section" id="module-librepy.file_system_helper">
  51. <span id="file-system-helper"></span><h1>file_system_helper<a class="headerlink" href="#module-librepy.file_system_helper" title="Permalink to this headline"></a></h1>
  52. <p>File system helpers.</p>
  53. <dl class="function">
  54. <dt id="librepy.file_system_helper.create_dir_if_needed">
  55. <tt class="descclassname">librepy.file_system_helper.</tt><tt class="descname">create_dir_if_needed</tt><big>(</big><em>path</em><big>)</big><a class="reference internal" href="../_modules/librepy/file_system_helper.html#create_dir_if_needed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#librepy.file_system_helper.create_dir_if_needed" title="Permalink to this definition"></a></dt>
  56. <dd><p>Creates new directory at given location if there is no such directory</p>
  57. </dd></dl>
  58. <dl class="function">
  59. <dt id="librepy.file_system_helper.generate_file_from_template">
  60. <tt class="descclassname">librepy.file_system_helper.</tt><tt class="descname">generate_file_from_template</tt><big>(</big><em>path</em>, <em>template_name</em>, <em>context</em>, <em>render_method='xml'</em><big>)</big><a class="reference internal" href="../_modules/librepy/file_system_helper.html#generate_file_from_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#librepy.file_system_helper.generate_file_from_template" title="Permalink to this definition"></a></dt>
  61. <dd><p>Generate file at given path using template and given context</p>
  62. <table class="docutils field-list" frame="void" rules="none">
  63. <col class="field-name" />
  64. <col class="field-body" />
  65. <tbody valign="top">
  66. <tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
  67. <li><strong>path</strong> &#8211; path where the file will be generated</li>
  68. <li><strong>template_name</strong> &#8211; name of template which will be used to generate the file content.
  69. It must be in templates dir configured in Genshi.</li>
  70. <li><strong>context</strong> &#8211; dictionary containing values which will be injected into template slots</li>
  71. <li><strong>render_method</strong> &#8211; document rendering method. See Genshi documentation.</li>
  72. </ul>
  73. </td>
  74. </tr>
  75. </tbody>
  76. </table>
  77. </dd></dl>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="sphinxsidebar">
  83. <div class="sphinxsidebarwrapper">
  84. <h4>Previous topic</h4>
  85. <p class="topless"><a href="epub_gen.html"
  86. title="previous chapter">epub_gen</a></p>
  87. <h4>Next topic</h4>
  88. <p class="topless"><a href="models.html"
  89. title="next chapter">models</a></p>
  90. <h3>This Page</h3>
  91. <ul class="this-page-menu">
  92. <li><a href="../_sources/api/file_system_helper.txt"
  93. rel="nofollow">Show Source</a></li>
  94. </ul>
  95. <div id="searchbox" style="display: none">
  96. <h3>Quick search</h3>
  97. <form class="search" action="../search.html" method="get">
  98. <input type="text" name="q" size="18" />
  99. <input type="submit" value="Go" />
  100. <input type="hidden" name="check_keywords" value="yes" />
  101. <input type="hidden" name="area" value="default" />
  102. </form>
  103. <p class="searchtip" style="font-size: 90%">
  104. Enter search terms or a module, class or function name.
  105. </p>
  106. </div>
  107. <script type="text/javascript">$('#searchbox').show(0);</script>
  108. </div>
  109. </div>
  110. <div class="clearer"></div>
  111. </div>
  112. <div class="related">
  113. <h3>Navigation</h3>
  114. <ul>
  115. <li class="right" style="margin-right: 10px">
  116. <a href="../genindex.html" title="General Index"
  117. >index</a></li>
  118. <li class="right" >
  119. <a href="../py-modindex.html" title="Python Module Index"
  120. >modules</a> |</li>
  121. <li class="right" >
  122. <a href="models.html" title="models"
  123. >next</a> |</li>
  124. <li class="right" >
  125. <a href="epub_gen.html" title="epub_gen"
  126. >previous</a> |</li>
  127. <li><a href="../index.html">librepy v0.1 documentation</a> &raquo;</li>
  128. <li><a href="index.html" >API</a> &raquo;</li>
  129. </ul>
  130. </div>
  131. <div class="footer">
  132. &copy; Copyright 2011, Marcin Świerczyński.
  133. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
  134. </div>
  135. </body>
  136. </html>