Permalink
Browse files

Insert newlines around markers (#3)

  • Loading branch information...
marcoceppi authored and johnsca committed Sep 8, 2017
1 parent d8bdb49 commit af9f535f6666784977ccdc9d7d687d3c5fc0d523
Showing with 8 additions and 2 deletions.
  1. +4 −0 README.md
  2. +4 −2 update_readme.py
View
@@ -37,6 +37,7 @@ List of Base Layers
===================
<!-- list-of-layers -->
| ID | Name | Summary |
| --- | --- | --- |
| [ansible-base](https://github.com/chuckbutler/ansible-base) | ansible-base | Base / charm layer for charming w/ Ansible |
@@ -124,12 +125,14 @@ List of Base Layers
| [uwsgi](https://github.com/marcoceppi/layer-uwsgi) | uWSGI | uWSGI layer |
| [vnfproxy](https://github.com/AdamIsrael/vnfproxy.git) | vnfproxy | A layer to ease development of "proxy" charms that operate against VNF images |
| [zabbix-base](https://github.com/jamesbeedy/layer-zabbix-base) | zabbix-base | Reactive base layer for zabbix charms |
<!-- /list-of-layers -->
List of Interface Layers
========================
<!-- list-of-interfaces -->
| ID | Name | Summary |
| --- | --- | --- |
| [apache-website](https://github.com/juju-solutions/interface-apache-website.git) | apache-website | Interface layer for the apache-website interface protocol |
@@ -252,4 +255,5 @@ List of Interface Layers
| [zeppelin](https://github.com/juju-solutions/interface-zeppelin) | zeppelin | Interface layer for interacting with charms for Apache Zeppelin |
| [zookeeper-quorum](https://github.com/juju-solutions/interface-zookeeper-quorum.git) | zookeeper quorum | This interface layer handles the communication among Apache Zookeeper peers |
| [zookeeper](https://github.com/juju-solutions/interface-zookeeper.git) | zookeeper | This interface layer handles the communication between Apache Zookeeper and its clients |
<!-- /list-of-interfaces -->
View
@@ -10,12 +10,14 @@
start = readme.index('<!-- list-of-{} -->'.format(layer_type))
end = readme.index('<!-- /list-of-{} -->'.format(layer_type))
del readme[start+1:end]
readme.insert(start+1, '| ID | Name | Summary |')
readme.insert(start+2, '| --- | --- | --- |')
readme.insert(start+1, '')
readme.insert(start+2, '| ID | Name | Summary |')
readme.insert(start+3, '| --- | --- | --- |')
for layer_file in sorted(Path(layer_type).glob('*.json')):
end = readme.index('<!-- /list-of-{} -->'.format(layer_type))
layer = json.loads(layer_file.read_text())
readme.insert(
end, '| [{id}]({repo}) | {name} | {summary} |'.format(**layer))
readme.insert(end+1, '')
readme_file.write_text(''.join('{}\n'.format(l) for l in readme))

0 comments on commit af9f535

Please sign in to comment.