Mercurial > hgrepos > Python > libs > ConfigMix
changeset 77:025005f1234f
Print the date of the docu more intelligently: use |today| together with keyword expansion
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Wed, 14 Mar 2018 23:44:37 +0100 |
| parents | 6553fbdcd4ae |
| children | 3a8f712d27df |
| files | .hgkwarchive README.txt doc/conf.py |
| diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgkwarchive Wed Mar 14 23:43:54 2018 +0100 +++ b/.hgkwarchive Wed Mar 14 23:44:37 2018 +0100 @@ -1,3 +1,4 @@ [patterns] configmix/**.py = path:README.txt = reST +path:doc/conf.py =
--- a/README.txt Wed Mar 14 23:43:54 2018 +0100 +++ b/README.txt Wed Mar 14 23:44:37 2018 +0100 @@ -5,7 +5,7 @@ :Author: Franz Glasner :Version: |release| -:Date: |VCSHGshortdate| +:Date: |today| :Revision: |VCSRevision| :Repository: |VCSHGpath|
--- a/doc/conf.py Wed Mar 14 23:43:54 2018 +0100 +++ b/doc/conf.py Wed Mar 14 23:44:37 2018 +0100 @@ -30,6 +30,14 @@ # The full version, including alpha/beta/rc tags release = configmix.__version__ +today = '$Date$' +if len(today) == 6 \ + and today[0] == '$' and today[1:-2] == 'Date' \ + and today[-1] == '$': + del today +else: + today = today[7:today.find(' ', 7)] + # -- General configuration ---------------------------------------------------
