import sys, os

from eclaircie import *

dest_filename = os.path.join(os.path.dirname(__file__), "generated_page.rst")

if need_update([__file__], [dest_filename]):
  write_file(dest_filename, """
.. lang:: fr

Page générée
%%%%%%%%%%%%

Cette page est générée à partir d'un script Python :

.. lang:: en

Generated page
%%%%%%%%%%%%%%

This page is generated by a Python script:

.. lang:: all

.. code-block:: python

   import sys, os

   from eclaircie import *

   dest_filename = os.path.join(os.path.dirname(__file__), "generated_page.rst")

   if need_update([__file__], [dest_filename]):
       write_file(dest_filename, " < put your text here > ")

""")
