Skip to content

Commit b6fa7ad

Browse files
committed
Store uncompressed man pages.
1 parent 8092baf commit b6fa7ad

File tree

3 files changed

+80
-3
lines changed

3 files changed

+80
-3
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ install-lib:
2828

2929
install-man:
3030
find man -type d -printf %P\\0 | xargs -0r -I__ install -d $(DESTDIR)$(mandir)/__
31-
find man -type f -name \*.[12345678].gz -printf %P\\0 | xargs -0r -I__ install -m644 man/__ $(DESTDIR)$(mandir)/__
31+
find man -type f -name \*.[12345678] -printf %P\\0 | xargs -0r -I__ install -m644 man/__ $(DESTDIR)$(mandir)/__
32+
find man -type f -name \*.[12345678] -printf %P\\0 | xargs -0r -I__ gzip $(DESTDIR)$(mandir)/__
3233

3334
uninstall: uninstall-lib uninstall-man
3435

@@ -38,7 +39,7 @@ uninstall-lib:
3839
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(pydir)/cloudformation || true
3940

4041
uninstall-man:
41-
find man -type f -name \*.[12345678].gz -printf %P\\0 | xargs -0r -I__ rm -f $(DESTDIR)$(mandir)/__
42+
find man -type f -name \*.[12345678] -printf %P\\0 | xargs -0r -I__ rm -f $(DESTDIR)$(mandir)/__.gz
4243
find man -depth -mindepth 1 -type d -printf %P\\0 | xargs -0r -I__ rmdir $(DESTDIR)$(mandir)/__ || true
4344
rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(mandir) || true
4445

@@ -79,7 +80,6 @@ deploy-pypi:
7980
man:
8081
find man -name \*.ronn | xargs -n1 ronn \
8182
--manual="python-cloudformation" --organization=DevStructure --style=toc
82-
find man -name \*.[12345678] | xargs gzip
8383

8484
gh-pages: man
8585
mkdir -p gh-pages

man/man7/python-cloudformation.7

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.\" generated with Ronn/v0.7.3
2+
.\" http://github.com/rtomayko/ronn/tree/0.7.3
3+
.
4+
.TH "PYTHON\-CLOUDFORMATION" "7" "July 2011" "DevStructure" "python-cloudformation"
5+
.
6+
.SH "NAME"
7+
\fBpython\-cloudformation\fR \- tools for creating CloudFormation templates
8+
.
9+
.SH "SYNOPSIS"
10+
.
11+
.nf
12+
13+
import cloudformation
14+
import sys
15+
16+
t = cloudformation\.Template()
17+
t\.Description = \'Demo of python\-cloudformation\.\'
18+
t\.add_user_data(sys\.stdin)
19+
20+
t\.Outputs\.add(\'DemoIp\',
21+
Description=\'Public IP address of DemoInstance\',
22+
Value={\'Fn::GetAtt\': [\'DemoInstance\', \'PublicIp\']})
23+
24+
t\.Parameters\.add(\'DemoParam\',
25+
Description=\'DemoParam description\.\',
26+
Type=\'String\')
27+
t\.Parameters\.add(\'ImageId\',
28+
Default=\'ami\-e2af508b\',
29+
Description=\'AMI to use for all EC2 instances\.\',
30+
Type=\'String\')
31+
t\.Parameters\.add(\'InstanceType\',
32+
Default=\'m1\.small\',
33+
Description=\'Instance type to use for all EC2 instances\.\',
34+
Type=\'String\')
35+
36+
t\.Resources\.add(\'DemoInstance\',
37+
Properties={\'ImageId\': {\'Ref\': \'ImageId\'},
38+
\'InstanceType\': {\'Ref\': \'InstanceType\'},
39+
\'KeyName\': {\'Ref\': \'KeyName\'},
40+
\'SecurityGroups\': [{\'Ref\': \'DemoSecurityGroup\'}],
41+
\'UserData\': t\.ref_user_data({\'Ref\': \'DemoParam\'})},
42+
Type=\'AWS::EC2::Instance\')
43+
44+
t\.Resources\.add(\'DemoSecurityGroup\',
45+
Properties={
46+
\'GroupDescription\': \'Unrestricted SSH and HTTP\.\',
47+
\'SecurityGroupIngress\': [{\'CidrIp\': \'0\.0\.0\.0/0\',
48+
\'FromPort\': \'22\',
49+
\'IpProtocol\': \'tcp\',
50+
\'ToPort\': \'22\'},
51+
{\'CidrIp\': \'0\.0\.0\.0/0\',
52+
\'FromPort\': \'80\',
53+
\'IpProtocol\': \'tcp\',
54+
\'ToPort\': \'80\'}]},
55+
Type=\'AWS::EC2::SecurityGroup\')
56+
57+
print(t\.dumps())
58+
.
59+
.fi
60+
.
61+
.SH "DESCRIPTION"
62+
\fBpython\-cloudformation\fR transforms Python source code representations of AWS CloudFormation templates into JSON\. It\'s most useful for automating tedious user data manipulation in its very rudimentary "templating language\."
63+
.
64+
.P
65+
After constructing a \fBcloudformation\.Template\fR object there are two main classes of APIs available\. The first is a \fBdict\fR/\fBset\fR\-like API to \fBDescription\fR, \fBMappings\fR, \fBOutputs\fR, \fBParameters\fR, and \fBResources\fR\. \fBDescription\fR should be get and set as a string property\. The rest may be treated like dictionaries or sets via the \fBadd\fR method, which takes a \fBkey\fR and arbitrary keyword arguments\. These data structures will be faithfully reproduced in the JSON output\.
66+
.
67+
.P
68+
EC2 user data is handled separately\. The \fBadd_user_data\fR method accepts a file\-like object which it reads, parses, and stores for later\. The parsing step is very rudimentary: it splits the input on "\fB____\fR"\. Later, the \fBref_user_data\fR method will replace the "\fB____\fR" markers with its positional parameters in the order they appear\. Use \fBref_user_data\fR as the value of the \fBUserData\fR key in the \fBProperties\fR dictionary of a \fBResource\fR with \fBType=\'AWS::EC2::Instance\'\fR\.
69+
.
70+
.SH "THEME SONG"
71+
Led Zeppelin \- "Night Flight"
72+
.
73+
.SH "AUTHOR"
74+
Richard Crowley \fIrichard@devstructure\.com\fR
75+
.
76+
.SH "SEE ALSO"
77+
Blueprint I/O Server can create user data scripts for EC2 instance configuration\. See \fIhttp://devstructure\.com/docs/endpoints\.html#GET\-user\-data\fR for more information\.

man/man7/python-cloudformation.7.gz

-1.46 KB
Binary file not shown.

0 commit comments

Comments
 (0)