1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 12:42:41 +00:00

tons of stuff

This commit is contained in:
Bastian Venthur
2018-07-14 22:02:54 +02:00
parent 4de6909e93
commit afe4173c40
8 changed files with 86 additions and 26 deletions

7
CHANGELOG.md Normal file
View File

@@ -0,0 +1,7 @@
# Changelog
## [1.1.0] - 2018-07-14
* Added proper packaging
* made sg PEP8 compatible
* Changed license from GPL to MIT

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Bastian Venthur
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
markdown==2.6.11

41
setup.py Normal file
View File

@@ -0,0 +1,41 @@
#!/usr/bin/env python
from setuptools import setup
meta = {}
exec(open('./sg/version.py').read(), meta)
meta['long_description'] = open('./README.md').read()
setup(
name='sg',
version=meta['__VERSION__'],
description='Simple static site generator.',
long_description=meta['long_description'],
long_description_content_type='text/markdown',
keywords='markdown site generator cli',
author='Bastian Venthur',
author_email='mail@venthur.de',
url='https://github.com/venthur/sg',
python_requires='>=3',
extras_require={
'dev': [
'pytest',
'pytest-cov',
'flake8',
]
},
packages=['sg'],
entry_points={
'console_scripts': [
'sg = sg.__main__:main'
]
},
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
],
)

0
sg/__init__.py Normal file
View File

15
sg/__main__.py Normal file
View File

@@ -0,0 +1,15 @@
import logging
from sg import sg
def main():
logging.basicConfig(level=logging.DEBUG,
format="%(levelname)s\t%(message)s")
sg.prepare_site()
sg.copy_static_content()
sg.generate_site()
if __name__ == '__main__':
main()

View File

@@ -1,29 +1,11 @@
#!/usr/bin/env python #!/usr/bin/env python
# sg.py -- small, static website generator
# Copyright (C) 2010 Bastian Venthur
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Small static site generator. """Small static site generator.
""" """
__author__ = "Bastian Venthur <venthur@debian.org>" __author__ = "Bastian Venthur <venthur@debian.org>"
__version__ = "1.0"
import os import os
@@ -185,11 +167,3 @@ def render_page(path):
txt = process_embed_meta(txt, meta) txt = process_embed_meta(txt, meta)
check_unused_variables(txt) check_unused_variables(txt)
return txt return txt
if __name__ == "__main__":
logging.basicConfig(level=logging.DEBUG,
format="%(levelname)s\t%(message)s")
prepare_site()
copy_static_content()
generate_site()

1
sg/version.py Normal file
View File

@@ -0,0 +1 @@
__VERSION__ = '1.1.0'