Skip to content

Commit fbb3c8c

Browse files
committed
added license and readme
1 parent 653ff87 commit fbb3c8c

File tree

7 files changed

+70
-17
lines changed

7 files changed

+70
-17
lines changed

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 - 2022 Arsh
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
Norite is a simple static website generator powered by [Jinja2](https://palletsprojects.com/p/jinja) as the templating engine.
44

5-
Norite's main goal is to act as an easy to use rendering engine for people who like to design their own templates or want to have the option of building a custom structure for their websites. To achive this goal norite exposes the entire content directory as a tree data-structure to the templates along with the rendered content, leaving it upto the template designer how to interpret and display this information.
5+
Norite's main goal is to act as an easy to use rendering engine for people who like to design their own templates or want to have the option of building a custom structure for their websites. To achieve this goal norite exposes the entire content directory as a tree data-structure to the templates along with the rendered content, leaving it up to the template designer how to interpret and display this information.
66

77
Implemented Features:
88
- Markdown to HTML render
99
- Support for using toml or json files in place of markdown
1010
- Jinja2 based HTML templates
1111
- Support for embedding Jinja2 templates in markdown
12-
- Support for nested folders in website content
12+
- Support for nested folders in website content
1313
- Support for custom templates for any subsection of the content folder
1414
- Support for co-locating assets with content
1515
- Syntax highlighting in code blocks
1616
- Sass compilation (via libsass or dart-sass)
17-
- In-built dev server with auto reload on file changes
17+
- In-built dev server with auto reload on file changes
1818
- Support for building custom RSS/Atom feeds and robots.txt using templates
19-
- Automatic sitemap.mxl generation
19+
- Automatic sitemap.xml generation
2020

2121
Todo:
2222
- Tests
@@ -35,17 +35,19 @@ pip install norite
3535

3636
It will install the following additional packages: [jinja2](https://pypi.org/project/Jinja2/), [markdown](https://pypi.org/project/Markdown/), [toml](https://pypi.org/project/toml/), [pygments](https://pypi.org/project/Pygments/) and [watchdog](https://pypi.org/project/watchdog/).
3737

38-
Alternatively, if you want to install it globally as a shell tool within an isolated python environment, install via [pipx](https://pypa.github.io/pipx/)
38+
Alternatively, if you want to install it globally as a shell tool within an isolated python environment, install via [pipx](https://pypa.github.io/pipx/):
3939
```shell
4040
pipx install 'norite'
4141
```
4242

4343
## Documentation
44-
Checkout the documentation for norite here:
44+
Checkout the documentation for norite here: [documentation](https://github.com/prdx23/norite/wiki)
4545

4646

4747
## Inspiration
48-
Norite takes inspiration from [Zola's](https://www.getzola.org/) features and its way of organizing content, borrows a few concepts from [Hugo](https://gohugo.io), and references [Pelican](https://blog.getpelican.com/)'s and [Mkdocs](https://www.mkdocs.org/)'s internal implementations for a few things. I would happily recomend using any of these excellent SSGs!
49-
48+
Norite takes inspiration from [Zola's](https://www.getzola.org/) features and its way of organizing content, borrows a few concepts from [Hugo](https://gohugo.io), and references [Pelican](https://blog.getpelican.com/)'s and [Mkdocs](https://www.mkdocs.org/)'s internal implementations for a few things. I would happily recommend using any of these excellent SSGs!
5049

5150

51+
## License
52+
**MIT License**: Copyright (c) 2022 - 2022 Arsh
53+
[License.txt](https://github.com/prdx23/norite/blob/master/LICENSE.txt)

changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
v0.1.0
3+
- Initial release of norite on pypi

norite/console.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
from norite.utils.init import init
99
from norite.utils.server import serve
10-
from norite.utils.print_helpers import print_success
10+
from norite.utils.print_helpers import print_success, print_error
1111

1212

1313
parser = argparse.ArgumentParser(
1414
prog='norite',
15-
description='A static site generator'
15+
description='A static website generator'
1616
)
1717
subparsers = parser.add_subparsers(
1818
title='Commands',
@@ -23,12 +23,12 @@
2323

2424
init_parser = subparsers.add_parser(
2525
'init',
26-
help='Initialize a new project in current directory'
26+
help='Initialize a new project in the current directory'
2727
)
2828

2929
build_parser = subparsers.add_parser(
3030
'build',
31-
help='Delete output directory and rebuild the site'
31+
help='Delete the output directory and rebuild the site'
3232
)
3333

3434
serve_parser = subparsers.add_parser(
@@ -58,7 +58,7 @@ def console():
5858
return
5959

6060
if not Path('config.toml').exists():
61-
print('config.toml not found')
61+
print_error('Error: config.toml not found')
6262
return
6363

6464
config = parse_toml_config(Path('config.toml'))

norite/utils/rss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def compile_rss(content_tree, global_context):
1010
rss_template_file = Path('source/templates') / filename
1111

1212
if not rss_template_file.exists():
13-
print_error(f'\nrss template "{rss_template_file}" not found\n')
13+
print_error(f'\nError: rss template "{rss_template_file}" not found\n')
1414
return
1515

1616
rss_template = environment.get_template(rss_template_file.name)

norite/utils/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def run(self, output, host, port):
3131
try:
3232
httpd.serve_forever()
3333
except KeyboardInterrupt:
34-
print("\nKeyboard interrupt received, exiting.")
34+
print("\nKeyboard interrupt received, exiting...")
3535

3636

3737
class Watcher:

setup.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,40 @@
11
import setuptools
22

3+
with open('README.md', 'r') as fh:
4+
long_description = fh.read()
35

46
setuptools.setup(
57
name='norite',
6-
version='0.1',
8+
version='0.1.0',
79
author='Arsh',
810
author_email='[email protected]',
9-
description='',
11+
description='A simple static website generator powered by Jinja2',
12+
long_description=long_description,
13+
long_description_content_type="text/markdown",
14+
url='https://github.com/prdx23/norite',
1015
packages=setuptools.find_packages(),
16+
classifiers=[
17+
'Programming Language :: Python :: 3',
18+
'Programming Language :: Python :: 3.6',
19+
'Programming Language :: Python :: 3.7',
20+
'Programming Language :: Python :: 3.8',
21+
'Programming Language :: Python :: 3.9',
22+
'Programming Language :: Python :: 3.10',
23+
'License :: OSI Approved :: MIT License',
24+
'Operating System :: OS Independent',
25+
'Development Status :: 3 - Alpha',
26+
'Environment :: Console',
27+
'Environment :: Web Environment',
28+
'Topic :: Internet :: WWW/HTTP',
29+
'Topic :: Text Processing :: Markup :: Markdown',
30+
'Topic :: Text Processing :: Markup :: HTML',
31+
],
32+
keywords='static web site generator SSG jinja jinja2 markdown',
33+
project_urls={
34+
'Source': 'https://github.com/prdx23/norite',
35+
'Tracker': 'https://github.com/prdx23/norite/issues',
36+
'Documentation': 'https://github.com/prdx23/norite/wiki',
37+
},
1138
python_requires='>=3.6',
1239
install_requires=[
1340
'toml',

0 commit comments

Comments
 (0)