# Path: engine/conf.py
# PATH_TO_HTML = PATH + "/engine/data/html/"
# 
# PATH_TO_TEMPLATE = PATH + "/themes/" + TEMPLATE + "/notes/"  # don't forget about ending /
# 
# PATH_HOMEPAGE = PATH + "/themes/" + TEMPLATE + "/homepage/head_index.html"
# 
# PATH_TO_MD = PATH + '/notes/'
# 
# PATH_TO_TEMPLATE_HTML = PATH_TO_TEMPLATE + 'head.html'


import os
import time
import re
from engine.conf import PATH_TO_HTML, PATH_TO_TEMPLATE, PATH_HOMEPAGE, PATH_TO_MD, PATH_TO_TEMPLATE_HTML  # noqa
            head = head.replace('="css/', '="' + '/css/')
            head = head.replace('="js/', '="' + '/js/')

            # remove demo content
            head = re.sub(r'<!-- start of demo -->.*<!-- end of demo -->',
                          r'', head, flags=re.M | re.DOTALL)

            # insert dataTables  "sorting":true,
            head += """
<style>
body {
  background-color: black;
}</style>

              <!--      "paging": false,
                        -->
              <table id="table_id" class="display compact hover">
                  <thead>
                      <tr>
                          <th>Title</th>
                          <th>Last update</th>
                          <th style="text-align:center">#</th>
                      </tr>
                  </thead>
                  <tbody>
            """
            html = head
        else:
            html = open(PATH_TO_TEMPLATE + '/head.html').read()


# Path: engine/conf.py
# PATH_TO_HTML = PATH + "/engine/data/html/"
# 
# PATH_TO_TEMPLATE = PATH + "/themes/" + TEMPLATE + "/notes/"  # don't forget about ending /
# 
# PATH_HOMEPAGE = PATH + "/themes/" + TEMPLATE + "/homepage/head_index.html"
# 
# PATH_TO_MD = PATH + '/notes/'
# 
# PATH_TO_TEMPLATE_HTML = PATH_TO_TEMPLATE + 'head.html'


# Path: engine/make_index.py
import os
import time
import re
from engine.conf import PATH_TO_HTML, PATH_TO_TEMPLATE, PATH_HOMEPAGE, PATH_TO_MD, PATH_TO_TEMPLATE_HTML  # noqa

            head = head.replace('="css/', '="' + '/css/')
            head = head.replace('="js/', '="' + '/js/')

            # remove demo content
            head = re.sub(r'<!-- start of demo -->.*<!-- end of demo -->',
                          r'', head, flags=re.M | re.DOTALL)

            # insert dataTables  "sorting":true,
            head += """
<style>
body {
  background-color: black;
}</style>

              <!--      "paging": false,
                        -->
              <table id="table_id" class="display compact hover">
                  <thead>
                      <tr>
                          <th>Title</th>
                          <th>Last update</th>
                          <th style="text-align:center">#</th>
                      </tr>
                  </thead>
                  <tbody>
            """
            html = head
        else:
            html = open(PATH_TO_TEMPLATE + '/head.html').read()


            html = html.replace('{{ url_index }}', PATH_TO_HTML + '/' + 'index.html')