change project structure

This commit is contained in:
ge 2022-09-30 01:23:56 +03:00
parent e73b957161
commit da516c96bd
2 changed files with 5 additions and 2 deletions

View File

@ -43,13 +43,14 @@ This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
"""
__version__ = '0.1.0'
__version__ = '0.1.1'
import os
import sys
import shutil
import datetime
import logging
import importlib.resources
import toml
import jinja2
@ -350,7 +351,7 @@ def build(config: dict):
write_to_file(html_file_path, html_page)
# Copy additional files to build_dir
log.info("Copy static files from '{}' and '{}' to '{}'".format(
log.info("Copying static files from '{}' and '{}' to '{}'".format(
config['dirs']['static_dir'],
config['dirs']['content_dir'],
config['dirs']['build_dir']))
@ -377,6 +378,8 @@ def init(dirname: str = '.', no_makefile: bool = False):
# Make Makefile
if not no_makefile:
makefile = render_template('Makefile.jinja2',
templates_dir = os.path.dirname(
importlib.resources.path('rsw', 'Makefile.jinja2')),
content_dir = DEFAULT_CONFIG['dirs']['content_dir'],
static_dir = DEFAULT_CONFIG['dirs']['static_dir'],
build_dir = DEFAULT_CONFIG['dirs']['build_dir'],