Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca717e4

Browse files
Switch “make sync” to write to in-repository docs/
1 parent 2afd02a commit ca717e4

File tree

21 files changed

+6717
-2
lines changed

21 files changed

+6717
-2
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,12 @@ dummy:
228228

229229
.PHONY: sync
230230
sync: dirhtml
231-
rsync -av --chmod=a+rX \
232-
_build/dirhtml/ wf-rhodesmill:webapps/python_patterns/
231+
mkdir -p docs
232+
cp -ru \
233+
_build/dirhtml/fowler-refactoring \
234+
_build/dirhtml/gang-of-four \
235+
_build/dirhtml/index.html \
236+
_build/dirhtml/python \
237+
_build/dirhtml/_images \
238+
docs/
239+
cp -ru _static docs/

docs/_images/sine.png

26.7 KB
Loading
28.9 KB
Binary file not shown.
Binary file not shown.

docs/_static/style.css

Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
2+
/* Compressed with: yui-compressor --line-break 1 normalize.css */
3+
4+
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
5+
audio,canvas,video{display:inline-block}
6+
audio:not([controls]){display:none;height:0}
7+
[hidden],template{display:none}
8+
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
9+
body{margin:0}
10+
a{background:transparent}
11+
a:focus{outline:thin dotted}
12+
a:active,a:hover{outline:0}
13+
h1{font-size:2em;margin:.67em 0}
14+
abbr[title]{border-bottom:1px dotted}
15+
b,strong{font-weight:bold}
16+
dfn{font-style:italic}
17+
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
18+
mark{background:#ff0;color:#000}
19+
code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}
20+
pre{white-space:pre-wrap}
21+
q{quotes:"\201C" "\201D" "\2018" "\2019"}
22+
small{font-size:80%}
23+
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
24+
sup{top:-0.5em}
25+
sub{bottom:-0.25em}
26+
img{border:0}
27+
svg:not(:root){overflow:hidden}
28+
figure{margin:0}
29+
fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}
30+
legend{border:0;padding:0}
31+
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
32+
button,input{line-height:normal}
33+
button,select{text-transform:none}
34+
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
35+
button[disabled],html input[disabled]{cursor:default}
36+
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
37+
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
38+
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
39+
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
40+
textarea{overflow:auto;vertical-align:top}
41+
table{border-collapse:collapse;border-spacing:0}
42+
43+
/* End of normalize.css */
44+
/* Skyfield custom styles */
45+
/* Colors darkened and lightened with http://gka.github.io/chroma.js/ */
46+
47+
@font-face {
48+
font-family: 'Gentium Basic';
49+
font-style: normal;
50+
font-weight: 400;
51+
src: local('Gentium Basic'), local('GentiumBasic'),
52+
url('gentium-basic-v11-latin-regular.woff') format('woff');
53+
}
54+
@font-face {
55+
font-family: 'Gentium Basic';
56+
font-style: italic;
57+
font-weight: 400;
58+
src: local('Gentium Basic Italic'), local('GentiumBasic-Italic'),
59+
url('gentium-basic-v11-latin-italic.woff') format('woff');
60+
}
61+
62+
body, body > img {
63+
display: block;
64+
margin-left: auto;
65+
margin-right: auto;
66+
}
67+
body {
68+
padding: 0 1em;
69+
line-height: 1.4em;
70+
font-family: "Gentium Basic", sans-serif, serif;
71+
max-width: 36em;
72+
}
73+
img {
74+
max-width: 100%;
75+
}
76+
h1, h2 {
77+
color: #002664;
78+
}
79+
#skyfield h1 {
80+
margin-bottom: 0;
81+
height: 1px;
82+
text-indent: -9999px; /* so screen reader will still read the title */
83+
}
84+
.logo {
85+
margin: 0 auto;
86+
display: block;
87+
}
88+
.headerlink {
89+
color: white;
90+
}
91+
.headerlink {
92+
text-decoration: none;
93+
}
94+
:hover > .headerlink {
95+
color: #eee;
96+
}
97+
:hover > .headerlink:hover {
98+
color: #ddd;
99+
}
100+
.admonition {
101+
border: 1em solid white;
102+
padding: 0em 2em;
103+
background-color: #eee;
104+
}
105+
.admonition-warning {
106+
background-color: #edd;
107+
}
108+
.admonition-title {
109+
text-align: center;
110+
font-weight: bold;
111+
}
112+
.motto {
113+
margin-bottom: 1.75em;
114+
text-align: center;
115+
}
116+
.motto em {
117+
padding-bottom: 0.75em;
118+
border-bottom: 1px solid black;
119+
}
120+
code, pre, tt, dt {
121+
font-family: "Ubuntu Mono Custom", monospace, serif;
122+
}
123+
code, pre, tt {
124+
background-color: #FDF6E3;
125+
}
126+
code, tt {
127+
border-radius: 3px;
128+
border: 1px solid #e3dcca;
129+
padding: 1px 2px 2px;
130+
font-size: 0.8em;
131+
}
132+
code {
133+
/* Prevent paragraph lines featuring inline code from being taller than
134+
the surrounding lines. */
135+
line-height: 0px;
136+
}
137+
a code:hover, a tt:hover {
138+
border-color: #827c6b;
139+
}
140+
code.py-obj {
141+
border: none;
142+
border-radius: 0;
143+
background: none;
144+
font-family: "Gentium Basic", sans-serif, serif;
145+
}
146+
dt {
147+
display: inline-block;
148+
padding-left: 4em;
149+
text-indent: -4em;
150+
color: #790000
151+
}
152+
dt em {
153+
font-style: normal;
154+
}
155+
dt code {
156+
border: none;
157+
padding: 0;
158+
background: none;
159+
}
160+
li {
161+
margin-top: 0.3em;
162+
margin-bottom: 0.3em;
163+
}
164+
pre {
165+
border: 1px dashed #93A1A1;
166+
padding: 0.5em 0.8em;
167+
line-height: 1.25;
168+
font-size: 0.8em;
169+
}
170+
.highlight-none pre {
171+
border: none;
172+
}
173+
pre tt {
174+
padding: 0;
175+
font-size: 1.25em;
176+
}
177+
table[border="1"] {
178+
margin: 1em auto;
179+
border: none;
180+
}
181+
td {
182+
border: none;
183+
border-bottom: 1px solid #eee;
184+
padding: 0.2em 0.5em 0.2em 0;
185+
}
186+
tr:last-child td {
187+
border: none;
188+
}
189+
.viewcode-link {
190+
float: right;
191+
margin-left: 1em;
192+
color: #888;
193+
}
194+
.copyright {
195+
text-align: center;
196+
opacity: 0.5;
197+
}
198+
@media screen and (min-width: 480px) {body {font-size: 1.125em;}}
199+
@media screen and (min-width: 640px) {body {max-width: 42em;}}
200+
201+
/* To regenerate the following Pygments palette, run:
202+
pip install pygments-style-solarized
203+
pygmentize -S solarizedlight -f html > solarizedlight.css */
204+
205+
.hll { background-color: #ffffcc }
206+
.c { color: #93a1a1; font-style: italic } /* Comment */
207+
.err { color: #dc322f } /* Error */
208+
.g { color: #657b83 } /* Generic */
209+
.k { color: #859900 } /* Keyword */
210+
.l { color: #657b83 } /* Literal */
211+
.n { color: #586e75 } /* Name */
212+
.o { color: #657b83 } /* Operator */
213+
.x { color: #657b83 } /* Other */
214+
.p { color: #657b83 } /* Punctuation */
215+
.cm { color: #93a1a1; font-style: italic } /* Comment.Multiline */
216+
.cp { color: #93a1a1; font-style: italic } /* Comment.Preproc */
217+
.c1 { color: #93a1a1; font-style: italic } /* Comment.Single */
218+
.cs { color: #93a1a1; font-style: italic } /* Comment.Special */
219+
.gd { color: #657b83 } /* Generic.Deleted */
220+
.ge { color: #657b83 } /* Generic.Emph */
221+
.gr { color: #657b83 } /* Generic.Error */
222+
.gh { color: #657b83 } /* Generic.Heading */
223+
.gi { color: #657b83 } /* Generic.Inserted */
224+
.go { color: #000000 } /* Generic.Output (customized) */
225+
.gp { color: #cb4b16 } /* Generic.Prompt (customized) */
226+
.gs { color: #657b83 } /* Generic.Strong */
227+
.gu { color: #657b83 } /* Generic.Subheading */
228+
.gt { color: #657b83 } /* Generic.Traceback */
229+
.kc { color: #859900 } /* Keyword.Constant */
230+
.kd { color: #859900 } /* Keyword.Declaration */
231+
.kn { color: #cb4b16 } /* Keyword.Namespace */
232+
.kp { color: #cb4b16 } /* Keyword.Pseudo */
233+
.kr { color: #859900 } /* Keyword.Reserved */
234+
.kt { color: #859900 } /* Keyword.Type */
235+
.ld { color: #657b83 } /* Literal.Date */
236+
.m { color: #2aa198 } /* Literal.Number */
237+
.s { color: #2aa198 } /* Literal.String */
238+
.na { color: #657b83 } /* Name.Attribute */
239+
.nb { color: #268bd2 } /* Name.Builtin */
240+
.nc { color: #268bd2 } /* Name.Class */
241+
.no { color: #b58900 } /* Name.Constant */
242+
.nd { color: #cb4b16 } /* Name.Decorator */
243+
.ni { color: #cb4b16 } /* Name.Entity */
244+
.ne { color: #cb4b16 } /* Name.Exception */
245+
.nf { color: #268bd2 } /* Name.Function */
246+
.nl { color: #657b83 } /* Name.Label */
247+
.nn { color: #b58900 } /* Name.Namespace */
248+
.nx { color: #657b83 } /* Name.Other */
249+
.py { color: #268bd2 } /* Name.Property */
250+
.nt { color: #859900 } /* Name.Tag */
251+
.nv { color: #cd4b16 } /* Name.Variable */
252+
.ow { color: #859900 } /* Operator.Word */
253+
.w { color: #fdf6e3 } /* Text.Whitespace */
254+
.mf { color: #2aa198 } /* Literal.Number.Float */
255+
.mh { color: #2aa198 } /* Literal.Number.Hex */
256+
.mi { color: #2aa198 } /* Literal.Number.Integer */
257+
.mo { color: #2aa198 } /* Literal.Number.Oct */
258+
.sb { color: #2aa198 } /* Literal.String.Backtick */
259+
.sc { color: #2aa198 } /* Literal.String.Char */
260+
.sd { color: #2aa198 } /* Literal.String.Doc */
261+
.s2 { color: #2aa198 } /* Literal.String.Double */
262+
.se { color: #cb4b16 } /* Literal.String.Escape */
263+
.sh { color: #2aa198 } /* Literal.String.Heredoc */
264+
.si { color: #cb4b16 } /* Literal.String.Interpol */
265+
.sx { color: #2aa198 } /* Literal.String.Other */
266+
.sr { color: #2aa198 } /* Literal.String.Regex */
267+
.s1 { color: #2aa198 } /* Literal.String.Single */
268+
.ss { color: #2aa198 } /* Literal.String.Symbol */
269+
.bp { color: #268bd2; font-weight: bold } /* Name.Builtin.Pseudo */
270+
.vc { color: #268bd2 } /* Name.Variable.Class */
271+
.vg { color: #268bd2 } /* Name.Variable.Global */
272+
.vi { color: #268bd2 } /* Name.Variable.Instance */
273+
.il { color: #2aa198 } /* Literal.Number.Integer.Long */

docs/fowler-refactoring/index.html

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Refactoring by Martin Fowler</title>
7+
<link rel="stylesheet" type="text/css"
8+
href="../_static/style.css">
9+
</head>
10+
<body>
11+
12+
<p class="motto">
13+
14+
<a href="/">Home Page</a>
15+
16+
</p>
17+
18+
<article>
19+
<div class="section" id="refactoring-by-martin-fowler">
20+
<h1><em>Refactoring</em> by Martin Fowler<a class="headerlink" href="#refactoring-by-martin-fowler" title="Permalink to this headline"></a></h1>
21+
<div style="float: right; margin: 0 0 1em 1em">
22+
<a href="https://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672/ref=as_li_ss_il?ie=UTF8&linkCode=li3&tag=letsdisthemat-20&linkId=e549473394af986311bf51e95f7a8b81&language=en_US" target="_blank"><img border="0" src="//ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=0201485672&Format=_SL250_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=letsdisthemat-20&language=en_US" ></a><img src="https://ir-na.amazon-adsystem.com/e/ir?t=letsdisthemat-20&language=en_US&l=li3&o=1&a=0201485672" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
23+
<div><a href="https://amzn.to/2JDGgOY"
24+
><i>Amazon Affiliate link</i></a></div>
25+
<div><a href="https://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672"
26+
><i>Amazon raw link</i></a></div>
27+
</div><p>Martin Fowler’s <em>Refactoring: Improving the Design of Existing Code</em>
28+
is more heavy focused on object oriented programming
29+
than will typically be useful for a Python codebase,
30+
but it is still valuable for its practical approach to code.
31+
Instead of comparing grand high-level architectures,
32+
its habit is to explain a pattern
33+
by starting down in the weeds of a tangled example
34+
and then finding an incremental way forward
35+
that keeps the code running
36+
while making stepwise improvements to its organization.</p>
37+
<p>The <a class="reference internal" href="../python/sentinel-object/#null-object"><span class="std std-ref">The Null Object Pattern</span></a> is the only one
38+
to which this Python Patterns site so far makes reference,
39+
but the book can still be recommended
40+
as a solid classic that has helped many readers
41+
get traction with an existing codebase
42+
and develop habits that makes even their own code
43+
easier to maintain and understand.</p>
44+
<div style="clear: right"></div></div>
45+
46+
</article>
47+
<hr>
48+
<p class="copyright">
49+
© 2018–2020 <a href="http://rhodesmill.org/brandon/">Brandon Rhodes</a>
50+
</p>
51+
</body>
52+
</html>

0 commit comments

Comments
 (0)