commit a6b7412a74d48a77a74526ddc5888a7907116c94 Author: Xhacker Liu Date: Fri Oct 31 18:00:00 2014 -0700 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..042b74c --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Awesome GitHub Extensions + +A curated list of awesome browser extensions for GitHub. Inspired by [awesome-python](https://github.com/vinta/awesome-python), which is inspired by [awesome-php](https://github.com/ziadoz/awesome-php). + +## File Management + +* [Octotree](https://github.com/buunguyen/octotree) +![Support Chrome](icons/Chrome.png) +![Support Firefox](icons/Firefox.png) +![Support Opera](icons/Opera.png) +![Support Safari](icons/Safari.png) + +## Source View Enhancement + +* [GitHub Highlight Selected](https://github.com/Nuclides/github-highlight-selected) +![Support Chrome](icons/Chrome.png) + diff --git a/README.template.md b/README.template.md new file mode 100644 index 0000000..0062b29 --- /dev/null +++ b/README.template.md @@ -0,0 +1,15 @@ +# Awesome GitHub Extensions + +A curated list of awesome browser extensions for GitHub. Inspired by [awesome-python](https://github.com/vinta/awesome-python), which is inspired by [awesome-php](https://github.com/ziadoz/awesome-php). + +{% for category in data %} +## {{ category.category }} + +{% for extension in category.extensions %} +* [{{ extension.name }}]({{ extension.url }}) +{% for browser in extension.browsers %} +![Support {{ browser }}](icons/{{ browser }}.png) +{% endfor %} +{% endfor %} + +{% endfor %} diff --git a/data.json b/data.json new file mode 100644 index 0000000..cf1fe18 --- /dev/null +++ b/data.json @@ -0,0 +1,26 @@ +[ + { + "category": "File Management", + "extensions": [ + { + "name": "Octotree", + "description": "Browser extensions to display GitHub code in tree format.", + "url": "https://github.com/buunguyen/octotree", + "browsers": ["Chrome", "Firefox", "Opera", "Safari"], + "support_enterprise": true + } + ] + }, + { + "category": "Source View Enhancement", + "extensions": [ + { + "name": "GitHub Highlight Selected", + "description": "Chrome extension for highlighting selected word in GitHub source view like Sublime Text", + "url": "https://github.com/Nuclides/github-highlight-selected", + "browsers": ["Chrome"], + "support_enterprise": false + } + ] + } +] diff --git a/gen_readme.py b/gen_readme.py new file mode 100755 index 0000000..b5bee7c --- /dev/null +++ b/gen_readme.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import json +from jinja2 import Environment, FileSystemLoader + + +if __name__ == "__main__": + with open("data.json") as f: + data = json.loads(f.read()) + + env = Environment(loader=FileSystemLoader("./"), + trim_blocks=True, lstrip_blocks=True) + template = env.get_template("README.template.md") + + with open("README.md", "w") as f: + f.write(template.render(data=data)) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8ce973e --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Jinja2