-
Notifications
You must be signed in to change notification settings - Fork 13
/
doc.py
154 lines (118 loc) · 5.96 KB
/
doc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
###########################################################################
#
# Copyright 2015-2018 Robert B. Lowrie (http://github.com/lowrie)
#
# This file is part of pyRouterJig.
#
# pyRouterJig is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# pyRouterJig is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# pyRouterJig; see the file LICENSE. If not, see <http://www.gnu.org/licenses/>.
#
###########################################################################
'''
Defines documentation helpers.
'''
import spacing
class Doc(object):
'''
Defines documentation strings.
'''
def __init__(self, units):
self.sunits = units.units_string(verbose=True)
self.transl = units.transl
self._short_desc = self.transl.tr(
'<i>pyRouterJig</i> is a joint layout tool for woodworking.')
self._license = self.transl.tr('<p>\
Copyright 2015-2018 Robert B. Lowrie (pyrouterjig@lowrielodge.org)\
<p>\
<i>pyRouterJig</i> is free software: you can redistribute it and/or modify it under\
the terms of the GNU General Public License as published by the Free Software\
Foundation, either version 3 of the License, or (at your option) any later\
version.\
<p>\
<i>pyRouterJig</i> is distributed in the hope that it will be useful, but WITHOUT ANY\
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\
A PARTICULAR PURPOSE. See the GNU General Public License for more details.\
You should have received a copy of the GNU General Public License along with\
<i>pyRouterJig</i>; see the file LICENSE. If not, see \
<a href=http://www.gnu.org/licenses/>http://www.gnu.org/licenses/</a>.\
<p>\
This software and its output is not an INCRA product. The authors have no\
connection with INCRA (or Taylor Design Group, Inc.), aside from being users\
themselves of their products.\
<p>\
<h3>USE AT YOUR OWN RISK!</h3>')
self._board_width = self.transl.tr('<b>Board Width</b> is the board width (in%s) of'
' the joint.')
self._bit_width = self.transl.tr('<b>Bit Width</b> is the maximum cutting width (in%s) of'
' the router bit.')
self._bit_depth = self.transl.tr('<b>Bit Depth</b> is the cutting depth (in%s) of the'
' router bit.')
self._bit_angle = self.transl.tr('<b>Bit Angle</b> is the angle (in degrees) of the router'
' bit for dovetail bits. Set to zero for straight bits.')
self._top_board = self.transl.tr(
'<b>Top Board</b> is the wood image to use for the top board.')
self._bottom_board = self.transl.tr(
'<b>Bottom Board</b> is the wood image to use for the bottom board.')
self._double_board = self.transl.tr(
'<b>Double Board</b> is the wood image to use for the double board.'
' If NONE, there is no double board.')
self._dd_board = self.transl.tr(
'<b>Double-Double Board</b> is the wood image to use for the double-double board.'
' If NONE, there is no double-double board.')
self._double_thickness = self.transl.tr(
'<b>Thickness</b> is the thickness (in%s) of the double board.')
self._dd_thickness = self.transl.tr(
'<b>Thickness</b> is the thickness (in%s) of the double-double board.')
self._es_slider0 = self.transl.tr('<b>%s</b> slider allows you to specify additional \
spacing between the fingers')
self._es_slider1 = self.transl.tr('<b>%s</b> slider allows you to specify additional \
width added to the fingers.')
self._es_centered = self.transl.tr('Check <b>%s</b> to force a finger to be centered on \
the board.')
self._cb_vsfingers = self.transl.tr('<b>%s</b> specifies the approximate number of \
fingers. At its minimum value, the width of the center finger is \
maximized. At its maximum value, the width of the center finger is \
minimized, and the result is the roughly the same as equally-spaced \
using zero "Spacing", zero "Width", and the "Centered" option \
checked.')
def short_desc(self):
return self._short_desc
def license(self):
return self._license
def board_width(self):
return self._board_width % self.sunits
def bit_width(self):
return self._bit_width % self.sunits
def bit_depth(self):
return self._bit_depth % self.sunits
def bit_angle(self):
return self._bit_angle
def top_board(self):
return self._top_board
def bottom_board(self):
return self._bottom_board
def double_board(self):
return self._double_board
def dd_board(self):
return self._dd_board
def double_thickness(self):
return self._double_thickness % self.sunits
def dd_thickness(self):
return self._dd_thickness % self.sunits
def es_slider0(self):
return self._es_slider0 % spacing.Equally_Spaced.keys[0]
def es_slider1(self):
return self._es_slider1 % spacing.Equally_Spaced.keys[1]
def es_centered(self):
return self._es_centered % spacing.Equally_Spaced.keys[2]
def cb_vsfingers(self):
return self._cb_vsfingers % spacing.Variable_Spaced.keys[0]