This commit is contained in:
Myles Braithwaite
2014-09-19 11:05:11 -04:00
parent ae3afe1f60
commit bc9dab219c
2 changed files with 75 additions and 23 deletions

View File

@ -5,22 +5,22 @@ A static web site generator is an application that takes plain text files and co
- [Awesome Static Web Site Generators](#awesome-static-web-site-generators) - [Awesome Static Web Site Generators](#awesome-static-web-site-generators)
- [Blogs](#blogs) - [Blogs](#blogs)
- [Wikis](#wikis)
- [Frameworks](#frameworks) - [Frameworks](#frameworks)
- [Wikis](#wikis)
- [Helpful Tools and Services](#helpful-tools-and-services) - [Helpful Tools and Services](#helpful-tools-and-services)
- [Deploy](#deploy) - [Deploy](#deploy)
- [Web Hosts](#web-hosts) - [Web Hosts](#web-hosts)
- [Static Web Site Generators in Other Awesome Lists](#static-web-site-generators-in-other-awesome-lists)
- [Other Lists of Static Web Site Geneartors](#other-lists-of-static-web-site-generators) - [Other Lists of Static Web Site Geneartors](#other-lists-of-static-web-site-generators)
- [Related Awesome](#related-awesome) - [Related Awesome](#related-awesome)
- [Static Web Site Generators in Other Awesome Lists](#static-web-site-generators-in-other-awesome-lists)
### Blogs ### Blogs
* [Jekyll](https://github.com/jekyll/jekyll) - Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. - `#Ruby`
* [Pelican](https://github.com/getpelican/pelican) - Uses Markdown or ReST for content and Jinja 2 for themes. - `#Python`
* [Hyde](https://github.com/hyde/hyde) - `#Python`
* [Octopress](https://github.com/imathis/octopress) - Similar to Jekyll but where everything you need is already setup. - `#Ruby` `#Jekyll`
* [Hexo](https://github.com/hexojs/hexo) - A fast, simple & powerful blog framework. - `#JavaScript` `#Node.js` * [Hexo](https://github.com/hexojs/hexo) - A fast, simple & powerful blog framework. - `#JavaScript` `#Node.js`
* [Hyde](https://github.com/hyde/hyde) - `#Python`
* [Jekyll](https://github.com/jekyll/jekyll) - Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. - `#Ruby`
* [Octopress](https://github.com/imathis/octopress) - Similar to Jekyll but where everything you need is already setup. - `#Ruby` `#Jekyll`
* [Pelican](https://github.com/getpelican/pelican) - Uses Markdown or ReST for content and Jinja 2 for themes. - `#Python`
* [Spress](https://github.com/spress/Spress/) - `#PHP` * [Spress](https://github.com/spress/Spress/) - `#PHP`
* [Static](https://github.com/nakkaya/static) - Supports org-mode and markdown. - `#Clojure` * [Static](https://github.com/nakkaya/static) - Supports org-mode and markdown. - `#Clojure`
@ -30,24 +30,24 @@ A static web site generator is an application that takes plain text files and co
### Frameworks ### Frameworks
* [Flask-Frozen](https://github.com/SimonSapin/Frozen-Flask) - Freezes a Flask application into a set of static files. - `#Python` `#Flask`
* [MiddleMan](https://github.com/middleman/middleman) - Middleman is a static site generator using all the shortcuts and tools in modern web development. - `#Ruby`
* [Metalsmith](https://github.com/segmentio/metalsmith) - An extremely simple, pluggable static site generator. - `#JavaScript` `#Node.js`
* [DocPad](https://github.com/docpad/docpad) - `#JavaScript` `#CoffeeScript` `#Node.js` * [DocPad](https://github.com/docpad/docpad) - `#JavaScript` `#CoffeeScript` `#Node.js`
* [Flask-Frozen](https://github.com/SimonSapin/Frozen-Flask) - Freezes a Flask application into a set of static files. - `#Python` `#Flask`
* [Hugo](https://github.com/spf13/hugo) - It is optimized for speed, easy use and configurability. - `#Go` * [Hugo](https://github.com/spf13/hugo) - It is optimized for speed, easy use and configurability. - `#Go`
* [LambdaPad](https://github.com/gar1t/lambdapad) - `#Erlang`
* [Metalsmith](https://github.com/segmentio/metalsmith) - An extremely simple, pluggable static site generator. - `#JavaScript` `#Node.js`
* [MiddleMan](https://github.com/middleman/middleman) - Middleman is a static site generator using all the shortcuts and tools in modern web development. - `#Ruby`
* [nanoc](https://github.com/nanoc/nanoc) - Felxiable support for small personal to large corporate web sites. - `#Ruby`
* [Sculpin](https://github.com/sculpin/sculpin) - `#PHP`
* [Sitegen](https://github.com/leafo/sitegen) - `#Lua` `#MoonScript`
* [Tags](https://github.com/braceio/tags) - `#Python` * [Tags](https://github.com/braceio/tags) - `#Python`
* [Wintersmith](https://github.com/jnordberg/wintersmith) - `#JavaScript` `#Node.js` * [Wintersmith](https://github.com/jnordberg/wintersmith) - `#JavaScript` `#Node.js`
* [yst](https://github.com/jgm/yst) - Powered by YAML. - `#Haskell` * [yst](https://github.com/jgm/yst) - Powered by YAML. - `#Haskell`
* [nanoc](https://github.com/nanoc/nanoc) - Felxiable support for small personal to large corporate web sites. - `#Ruby`
* [LambdaPad](https://github.com/gar1t/lambdapad) - `#Erlang`
* [Sculpin](https://github.com/sculpin/sculpin) - `#PHP`
* [Sitegen](https://github.com/leafo/sitegen) - `#Lua` `#MoonScript`
Helpful Tools and Services Helpful Tools and Services
-------------------------- --------------------------
* [Brace Forms](https://forms.brace.io/) - Adds functional forms to your static web sites.
* [Brace Charts](http://charts.brace.io/) - Creats svg based charts for your static web sites. * [Brace Charts](http://charts.brace.io/) - Creats svg based charts for your static web sites.
* [Brace Forms](https://forms.brace.io/) - Adds functional forms to your static web sites.
* [git-annex](http://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/) - Configure git-annex for a public repository for a static web site. * [git-annex](http://git-annex.branchable.com/tips/setup_a_public_repository_on_a_web_site/) - Configure git-annex for a public repository for a static web site.
### Deploy ### Deploy
@ -63,20 +63,20 @@ Helpful Tools and Services
Static Web Site Generators in Other Awesome Lists Static Web Site Generators in Other Awesome Lists
------------------------------------------------- -------------------------------------------------
* [vinta/awesome-python - Static Site Generators](https://github.com/vinta/awesome-python#static-site-generator) * [forhappy/awesome-lua - Static Site Generator](https://github.com/forhappy/awesome-lua#static-site-generator)
* [ziadoz/awesome-php - Static Site Generators](https://github.com/ziadoz/awesome-php#static-site-generators)
* [sindresorhus/awesome-nodejs - Static Site Generators](https://github.com/sindresorhus/awesome-nodejs#static-site-generators)
* [markets/awesome-ruby - Static Site Generators](https://github.com/markets/awesome-ruby#static-site-generation)
* [Sdogruyol/awesome-ruby - Static Page Generation](https://github.com/Sdogruyol/awesome-ruby#static-page-generation)
* [h4cc/awesome-elixir - Static Page Generation](https://github.com/h4cc/awesome-elixir#static-page-generation) * [h4cc/awesome-elixir - Static Page Generation](https://github.com/h4cc/awesome-elixir#static-page-generation)
* [kdabir/awesome-groovy - Static Web](https://github.com/kdabir/awesome-groovy#static-web) * [kdabir/awesome-groovy - Static Web](https://github.com/kdabir/awesome-groovy#static-web)
* [forhappy/awesome-lua - Static Site Generator](https://github.com/forhappy/awesome-lua#static-site-generator) * [markets/awesome-ruby - Static Site Generators](https://github.com/markets/awesome-ruby#static-site-generation)
* [Sdogruyol/awesome-ruby - Static Page Generation](https://github.com/Sdogruyol/awesome-ruby#static-page-generation)
* [sindresorhus/awesome-nodejs - Static Site Generators](https://github.com/sindresorhus/awesome-nodejs#static-site-generators)
* [vinta/awesome-python - Static Site Generators](https://github.com/vinta/awesome-python#static-site-generator)
* [ziadoz/awesome-php - Static Site Generators](https://github.com/ziadoz/awesome-php#static-site-generators)
Other Lists of Static Web Site Geneartors Other Lists of Static Web Site Geneartors
----------------------------------------- -----------------------------------------
* [StaticGen](https://www.staticgen.com/)
* [Static Site Generators](http://staticsitegenerators.net/) * [Static Site Generators](http://staticsitegenerators.net/)
* [StaticGen](https://www.staticgen.com/)
Related Awesome Related Awesome
--------------- ---------------
@ -84,7 +84,7 @@ Related Awesome
Awesome lists that help you with your new static web site. Awesome lists that help you with your new static web site.
* [Awesome Bootstrap](https://github.com/therebelrobot/awesome-bootstrap) - A curated list of free Bootstrap themes. * [Awesome Bootstrap](https://github.com/therebelrobot/awesome-bootstrap) - A curated list of free Bootstrap themes.
* [Awesome HTML5](https://github.com/diegocard/awesome-html5)
* [Awesome Images](https://github.com/heyalexej/awesome-images) - A curated list of amazingly awesome free (stock) photo resources.
* [Creative Commons Media](https://github.com/shime/creative-commons-media) - A curated list of resources that provide media licensed under Creative Commons licenses. * [Creative Commons Media](https://github.com/shime/creative-commons-media) - A curated list of resources that provide media licensed under Creative Commons licenses.
* [Frontend Development](https://github.com/dypsilon/frontend-dev-bookmarks) * [Frontend Development](https://github.com/dypsilon/frontend-dev-bookmarks)
* [Awesome Images](https://github.com/heyalexej/awesome-images) - A curated list of amazingly awesome free (stock) photo resources.
* [Awesome HTML5](https://github.com/diegocard/awesome-html5)

52
sort.py Normal file
View File

@ -0,0 +1,52 @@
# coding: utf-8
"""
FROM: <https://github.com/vinta/awesome-python/blob/master/sort.py>
The approach taken is explained below. I decided to do it simply.
Initially I was considering parsing the data into some sort of
structure and then generating an appropriate README. I am still
considering doing it - but for now this should work. The only issue
I see is that it only sorts the entries at the lowest level, and that
the order of the top-level contents do not match the order of the actual
entries.
This could be extended by having nested blocks, sorting them recursively
and flattening the end structure into a list of lines. Revision 2 maybe ^.^.
"""
def main():
# First, we load the current README into memory as an array of lines
with open('README.md', 'r') as read_me_file:
read_me = read_me_file.readlines()
# Then we cluster the lines together as blocks
# Each block represents a collection of lines that should be sorted
# This was done by assuming only links ([...](...)) are meant to be sorted
# Clustering is done by indentation
blocks = []
last_indent = None
for line in read_me:
s_line = line.lstrip()
indent = len(line) - len(s_line)
if any([s_line.startswith(s) for s in ['* [', '- [']]):
if indent == last_indent:
blocks[-1].append(line)
else:
blocks.append([line])
last_indent = indent
else:
blocks.append([line])
last_indent = None
with open('README.md', 'w+') as sorted_file:
# Then all of the blocks are sorted individually
blocks = [''.join(sorted(block, key=lambda s: s.lower())) for block in blocks]
# And the result is written back to README.md
sorted_file.write(''.join(blocks))
if __name__ == "__main__":
main()