3 # ##### BEGIN GPL LICENSE BLOCK #####
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # ##### END GPL LICENSE BLOCK #####
31 data = data.replace("-", "\\-")
32 data = data.replace("\t", " ")
33 # data = data.replace("$", "\\fI")
36 for w in data.split():
38 w = "\\fI" + w[1:] + "\\fR"
42 data = data[:len(data) - len(data.lstrip())] + " ".join(data_ls)
47 blender_bin = os.path.join(os.path.dirname(__file__), "../blender")
49 blender_help = subprocess.Popen([blender_bin, "--help"], stdout=subprocess.PIPE).communicate()[0].decode()
51 blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
52 blender_version = blender_version.split("Build")[0]
54 date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
56 filepath = os.path.splitext(__file__)[0]
58 file = open(filepath, "w")
62 fw('.TH "BLENDER" "1" "%s" "Blender %s"\n' % (date_string, blender_version.replace(".", "\\&.")))
66 blender \- a 3D modelling and rendering package''')
70 .B blender [args ...] [file] [args ...]''')
77 is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
79 Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
81 http://www.blender.org''')
88 lines = [line.rstrip() for line in blender_help.split("\n")]
92 if l.startswith("Environment Variables:"):
93 fw('.SH "ENVIRONMENT VARIABLES"\n')
94 elif l.endswith(":"): # one line
95 fw('.SS "%s"\n\n' % l)
96 elif l.startswith("-") or l.startswith("/"): # can be multi line
99 fw('.B %s\n' % man_format(l))
103 if lines[0].strip() and len(lines[0].lstrip()) == len(lines[0]): # no white space
106 if not l: # second blank line
112 l = l[1:] # remove first whitespace (tab)
114 fw('%s\n' % man_format(l))
120 fw('%s\n' % man_format(l))
131 This manpage was written for a Debian GNU/Linux system by Daniel Mester
132 <mester@uni-bremen.de> and updated by Cyril Brulebois
133 <cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
136 print("written:", filepath)