diff --git a/proselint/checks/dfw_uncomparables.py b/proselint/checks/dfw_uncomparables.py index 960fac587..95cbb89af 100644 --- a/proselint/checks/dfw_uncomparables.py +++ b/proselint/checks/dfw_uncomparables.py @@ -6,7 +6,7 @@ error_code: DFW200 source: David Foster Wallace source_url: http://bit.ly/1qudVuC -title: DFW200: Comparing an uncomparable +title: Comparing an uncomparable date: 2014-06-10 12:31:19 categories: writing --- diff --git a/proselint/checks/example_check.py b/proselint/checks/example_check.py index cbd46d042..74207180e 100644 --- a/proselint/checks/example_check.py +++ b/proselint/checks/example_check.py @@ -6,7 +6,7 @@ error_code: ERR100 source: Nobody source_url: ??? -title: ERR100: Firse line is always wrong. +title: Firse line is always wrong. date: 2014-06-10 12:31:19 categories: writing --- diff --git a/proselint/checks/inprogress/wgd_cliches.py b/proselint/checks/inprogress/wgd_cliches.py index fc8447e9b..f62dba55e 100644 --- a/proselint/checks/inprogress/wgd_cliches.py +++ b/proselint/checks/inprogress/wgd_cliches.py @@ -5,7 +5,7 @@ error_code: WGD101 source: write-good source_url: https://github.com/btford/write-good -title: WGD101: Cliches +title: Cliches date: 2014-06-10 12:31:19 categories: writing --- diff --git a/proselint/checks/inprogress/wgd_lexical_illusions.py b/proselint/checks/inprogress/wgd_lexical_illusions.py index 16b2a79b5..3fae21899 100644 --- a/proselint/checks/inprogress/wgd_lexical_illusions.py +++ b/proselint/checks/inprogress/wgd_lexical_illusions.py @@ -5,7 +5,7 @@ error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good -title: WGD200: Lexical illusion present +title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- diff --git a/proselint/checks/inprogress/wgd_weasel_words.py b/proselint/checks/inprogress/wgd_weasel_words.py index 97c3f4f1f..324299835 100644 --- a/proselint/checks/inprogress/wgd_weasel_words.py +++ b/proselint/checks/inprogress/wgd_weasel_words.py @@ -5,7 +5,7 @@ error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good -title: WGD100: Weasel words. +title: Weasel words. date: 2014-06-10 12:31:19 categories: writing --- diff --git a/proselint/checks/strunk_white_eos.py b/proselint/checks/strunk_white_eos.py index ce1dfdacf..7a42ddd25 100644 --- a/proselint/checks/strunk_white_eos.py +++ b/proselint/checks/strunk_white_eos.py @@ -5,7 +5,7 @@ error_code: STW100 source: Strunk & White source_url: ??? -title: STW100: Use of greylisted words +title: Use of greylisted words date: 2014-06-10 12:31:19 categories: writing --- diff --git a/scripts/generate_posts.py b/scripts/generate_posts.py index ced4c1c89..1a0c0b1ed 100755 --- a/scripts/generate_posts.py +++ b/scripts/generate_posts.py @@ -1,6 +1,8 @@ import os import ast import datetime +import re + grandparent = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) checks_dir = os.path.join(grandparent, "proselint", "checks") @@ -14,6 +16,9 @@ def is_check(fn): if is_check(fn): M = ast.parse(''.join(open(os.path.join(checks_dir, fn)))) docstring = ast.get_docstring(M) + error_code = re.search("error_code: (.*)\n", docstring).group(1) + head, sep, tail = docstring.partition("title: ") + docstring = head + sep + " " + error_code + ":" + tail[4:] post_filename = os.path.join( os.path.join(grandparent, "site", "_posts"),