Skip to content

Commit

Permalink
version in man pages from python module
Browse files Browse the repository at this point in the history
  • Loading branch information
ondratu committed Jan 22, 2018
1 parent 2bc545c commit 27804f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion formiko-vim.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ formiko-vim
:date: 18 Jan 2018
:subtitle: reStructuredText and MarkDown editor and live previewer
:author: Ondřej Tůma ([email protected])
:version: 1.3.0
:version: {version}

SYNOPSIS
~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion formiko.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ formiko
:date: 18 Jan 2018
:subtitle: reStructuredText and MarkDown editor and live previewer
:author: Ondřej Tůma ([email protected])
:version: 1.3.0
:version: {version}

SYNOPSIS
~~~~~~~~
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def icons_data():

def man_page(writer, src, dst):
with open(src, encoding="utf-8") as source:
rst = source.read()
rst = source.read().format(version=__version__)
with zopen(dst, 'wb') as destination:
destination.write(publish_string(source=rst, writer=writer))

Expand All @@ -57,6 +57,8 @@ def run(self):
if not path.exists(self.man_base):
makedirs(self.man_base)
for page in ('formiko', 'formiko-vim'):
log.info('manpage %s.rst -> %s/%s.1.gz'
% (page, self.man_base, page))
man_page(writer, page+'.rst', '%s/%s.1.gz' % (self.man_base, page))


Expand Down

0 comments on commit 27804f2

Please sign in to comment.