packlist 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d070947f5c8ef6872a58f07ebc0b8f3498c5420d
4
+ data.tar.gz: 615a84d4aa70c735fbe2c649b752b0b28a1bcb7e
5
+ SHA512:
6
+ metadata.gz: df2073a12540f8b5acd4192b7730d783381339a9b9a5e2af2005651721d3666753a88624e11655ba1350af61fbe03c03fe5be14b2a550a69f1279f2516fd7675
7
+ data.tar.gz: cc32c50504f7aa6c011baae6b9b672d3d952bd3fcfc84e797c63ab0c4d538b3767939b98012d03092dbdabfda6c4f8b67ccbed660a37ad76073eb7c6a26cc538
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .pryrc
11
+ mypacks
12
+ .sass-cache
13
+ docs/*.html
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in packlist.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Jim Cushing
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # Packlist - Backpacking Pack Lists for Geeks
2
+
3
+ Experienced backpackers know that a lighter pack helps you move faster and more comfortably, so you can enjoy the outdoors more. They also know that the best way to lighten your pack is by weighing and tracking every item. Only then can you seriously (and sometimes obsessively) evaluate what you should bring, what you should leave behind, and what you can substitute for a lighter or multiple use item.
4
+
5
+ Packlist can help you inventory and track your backpacking items and help you achieve that lighter pack. There are plenty of ways to do this, such as spreadsheets and the excellent site, [LighterPack](https://lighterpack.com).
6
+
7
+ Packlist is a bit different than these other options: It uses simple, and easy to read, text files to represent your pack's contents. (These files are actually small Ruby programs, but you needn't know any Ruby to use them).
8
+
9
+ Using text files has some advantages. You can create a master list of all your gear, then create a copy of that file and tailor it to a specific trip. You won't bring all the same gear on a summer trip as a winter trip, nor is the gear for a weekend in the Rockies the same as a AT thru hike. Packlist makes it easy to create lists tailored to your particular trip.
10
+
11
+ Additional, this is Packlist: Backpacking Lists for Geeks. The means outdoor loving geeks can use their favorite tools, like source control and their preferred text editor, to manage their pack lists.
12
+
13
+ ![Sample Pack](docs/sample_pack.png "Sample report generated by Packlist")
14
+
15
+
16
+ ## Installation
17
+
18
+ Install Packlist with the following command:
19
+
20
+ gem install packlist
21
+
22
+ (Packlist requires Ruby to run. Mac OS X and most Linux distributions have Ruby pre-installed, and installers are available for Windows.)
23
+
24
+
25
+ ## Creating a Pack List
26
+
27
+ Using your preferred text editor, create a file named `my_pack.rb` with the following contents:
28
+
29
+ packlist do
30
+ name "Epic Backpacking Trip"
31
+ description "Seven nights in the Sierras"
32
+ end
33
+
34
+ `name` and `description` can be anything you'd like.
35
+
36
+ ### Add a category
37
+
38
+ After `description`, and before `end`, add your first category by inserting the following:
39
+
40
+ category "Shelter and sleeping" do
41
+ end
42
+
43
+ ### Add an item
44
+
45
+ Between `category…do` and `end`, insert the following to add an item:
46
+
47
+ item "Tent", "4-season, 3-person tent", 8.5.lb
48
+
49
+ This defined an item named "Tent", with description, "4-season, 3-person tent". It's weight is specified at 8.5 pounds. You may use other units of weight, by substituting "g", "kg", or "oz"—for grams, kilograms, or ounces, respective—for "lg". Examples:
50
+
51
+ * 1200.g = 1,200 grams
52
+ * 42.3.oz = 42.3 ounces
53
+ * 1.2.kg = 4.5 kilograms
54
+ * 2.65.lb = 2.65 pounds
55
+
56
+ Within a category, and with your pack, you may mix and match units of measure. Packlist will perform the appropriate conversions and calculations.
57
+
58
+ #### Specify Item Quantity
59
+
60
+ If you have multiple quantities of a given item (like tent stakes), specify the quantity after the unit weight:
61
+
62
+ item "Tent stakes", "Aluminum Y-stakes", 14.g, 8
63
+
64
+ Note that the weight is per individual item; the line above adds eight tent stakes, with a weight of 14 grams each.
65
+
66
+ #### Specify Worn Items
67
+
68
+ Items that are regularly warn while hiking (such as a shirt, pants, or shorts) can be added as follows:
69
+
70
+ worn "T-shirt", "Wool shirt", 150.g
71
+
72
+ Worn items do not count in your base weight, nor your maximum pack weight, but they do count towards your total weight (also known as "skin out weight").
73
+
74
+ Clothing that you will usually carry in your pack, such as a rain jacket, should be added with the `item` keyword:
75
+
76
+ item "Rain Jacket", "2.5 layer lightweight jacket", 200.g
77
+
78
+ #### Specify Consumable Items
79
+
80
+ Items which are consumed, such as food and fuel, are added with the `consumable` or `food` keywords:
81
+
82
+ consumable "Fuel", "All season fuel blend", 110.g
83
+ food "Breakfast", "Oatmeal", 150.g, 7
84
+
85
+ (`food` is just an alias for `consumable`. You could use `consumable` for your breakfast, and even `food` for your fuel…but we don't recommend eating your fuel).
86
+
87
+ ### Removing an Item from your list
88
+
89
+ Because your pack list is simply a text file, all you have to do to remove an item from your list is delete that line. Because it's also a Ruby program, you can also remove it by commenting out the line. Commented lines are ignored when Packlist runs and prepares your report.
90
+
91
+ Commenting out a line, rather than removing it, is helpful when your not sure if you'll bring an item or not, or when you're basing a list for a new trip off of a list from an old trip. Simply make a copy of the old list, and comment out items items that you won't need on this trip. And if you decide you do need that item, just un-comment the line.
92
+
93
+ Commented lines begin with a hash (#). Add a hash to the beginning of the line to comment the line out, and remove the hash to un-comment the line.
94
+
95
+ You may also leave comments to yourself in the pack list in the same way:
96
+
97
+ # Do I want to bring my heavy tent, or my lightweight tarp?
98
+ item "Tarp", "2-person tarp", 280.g
99
+ # item "Tent", "4-season, 3-person tent", 8.5.lb
100
+
101
+ For a complete example of a pack list, see [this sample file](docs/sample_pack.rb).
102
+
103
+ ## Usage
104
+
105
+ To generate an HTML report for your pack list, run the following command.
106
+
107
+ packlist my_pack.rb
108
+
109
+ This will output a file named `my_pack.html`. You may open this in any modern browser (Safari, Chrome, or Firefox is recommended).
110
+
111
+ ## Future Plans
112
+
113
+ * Add option to generate a PDF report.
114
+ * Add pie graph, showing relative weights for each category (similar to LighterPack)
115
+
116
+ ## Acknowledgements
117
+
118
+ * Thanks to a reader on Backpackinglight.com for the initial idea.
119
+ * Thanks to [Galen Maley](http://www.galenmaly.com) for creating [LighterPack](https://lighterpack.com), which is an excellent resource for backpackers.
120
+ * Thanks to the many creators of the open source libraries used by Packlist.
121
+
122
+ ## Contributing
123
+
124
+ New features and bug fixes are welcome. If you've got a bug report or feature request
125
+
126
+ 1. Fork it ( https://github.com/jimothyGator/packlist/fork )
127
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
128
+ 3. Write unit tests. Minitest Spec is preferred.
129
+ 4. Commit your changes (`git commit -am 'Add some feature'`)
130
+ 5. Push to the branch (`git push origin my-new-feature`)
131
+ 6. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+ require 'rake/testtask'
3
+
4
+ desc 'Run tests (default)'
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.test_files = FileList['test/*_test.rb']
7
+ t.ruby_opts = ['-Itest']
8
+ t.ruby_opts << '-rubygems' if defined? Gem
9
+ end
10
+
11
+ task :default => :test
12
+
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <symbol id="consumed" viewBox="0 0 128 222">
3
+ <path d="M25.053009,90.4603449 C25.053009,160.302439 10.394806,188.700867 18.817474,213.360437 C22.830413,225.109239 40.00122,223.724333 42.961944,213.360437 C49.785705,189.473978 37.020355,158.89535 37.020355,90.4603449 C37.020355,82.4954894 63.029236,83.8642296 63.029236,56.6383793 C63.029236,22.5631522 46.478485,0 30.704041,0 C15.982209,0 -5.68434189e-14,24.7351772 -5.68434189e-14,56.6383793 C-5.68434189e-14,82.2042966 25.053009,83.8955928 25.053009,90.4603449 L25.053009,90.4603449 Z" id="spoon" sketch:type="MSShapeGroup"></path>
4
+ <path d="M88.7367538,207.440963 C91.5542217,230.829957 115.016149,222.009951 117.90196,207.440963 C124.229161,175.498147 110.725062,182.029259 110.725062,119.914285 C110.725062,112.315793 127.993914,101.719946 127.993914,82.1393318 C127.993914,47.3266137 120.161297,1.42108547e-14 103.095177,1.42108547e-14 C86.7347449,1.42108547e-14 90.4806776,61.0077929 90.4806776,94.3733754 C90.4806776,108.704387 96.2690217,112.43459 96.2690217,119.149204 C96.2690217,175.792707 84.6022946,173.119069 88.7367538,207.440963 Z" id="knife" sketch:type="MSShapeGroup"></path>
5
+ </symbol>
@@ -0,0 +1,3 @@
1
+ <symbol id="worn" viewBox="0 0 116 101" >
2
+ <path d="M60.0008541,5.504847 C52.8634204,5.49189712 45.7695092,1.65694841 44.2444783,7.10542736e-15 C43.5985652,7.10542736e-15 0.001,30.9647619 0.001,30.9647619 L10.1540435,58.6838095 L30.0698696,42.2714286 L30.0698696,100.185714 L59.9164783,100.185714 L60.4215217,100.185714 L90.2691739,100.185714 L90.2691739,42.2714286 L110.183957,58.6838095 L120.338043,30.9647619 C120.338043,30.9647619 76.7394348,7.10542736e-15 76.0945652,7.10542736e-15 C74.5455092,1.68305159 67.2507293,5.51800059 60.0008541,5.504847 Z" id="Shape" sketch:type="MSShapeGroup"></path>
3
+ </symbol>
@@ -0,0 +1,201 @@
1
+ body {
2
+ font-family: system, -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Lucida Grande", sans-serif;
3
+ font-size: 10pt;
4
+ }
5
+
6
+ header,
7
+ section {
8
+ margin: 2em auto;
9
+ padding: 0 1em;
10
+ max-width: 1200px;
11
+ }
12
+
13
+ header {
14
+ margin-bottom: 1em;
15
+ h1, p {
16
+ margin: 0.2em 0;
17
+ }
18
+ }
19
+
20
+ @media (min-width: 960px) {
21
+ section {
22
+ display: flex;
23
+
24
+ div {
25
+ display: flex;
26
+ flex-direction: column;
27
+ }
28
+
29
+ .summary {
30
+ flex: 0 1 20em;
31
+ order: 2;
32
+ padding-left: 2em;
33
+ }
34
+
35
+ .categories {
36
+ flex: 1 0 600px;
37
+ order: 1;
38
+ }
39
+ }
40
+ }
41
+
42
+ table {
43
+ tr {
44
+ td, th {
45
+ padding: 0.25em;
46
+ }
47
+ }
48
+ }
49
+
50
+ .summary {
51
+ margin-bottom: 2em;
52
+
53
+ table {
54
+ border-collapse: collapse;
55
+
56
+ tr {
57
+ td + td,
58
+ th + th {
59
+ padding-left: 2em;
60
+ text-align: right;
61
+ }
62
+ }
63
+
64
+ thead tr {
65
+ border-bottom: solid 1px black;
66
+ }
67
+
68
+ tbody,
69
+ tfoot {
70
+ tr {
71
+ border-style: solid;
72
+ border-width: 1px 0;
73
+ }
74
+ }
75
+
76
+ tbody {
77
+ font-weight: 400;
78
+ tr {
79
+ border-color: #ddd;
80
+ border-style: dotted;
81
+ }
82
+ }
83
+
84
+
85
+
86
+ tfoot {
87
+ font-weight: 500;
88
+ tr:first-child {
89
+ border-top-color: black;
90
+ }
91
+ tr {
92
+ border-color: #999;
93
+ }
94
+ }
95
+ th {
96
+ text-align: left;
97
+ }
98
+ }
99
+ }
100
+
101
+ svg.icon {
102
+ width: 16px;
103
+ height: 16px;
104
+ vertical-align: middle;
105
+
106
+ &.consumable {
107
+ fill: #009;
108
+ }
109
+
110
+ &.worn {
111
+ fill: #065;
112
+ }
113
+ }
114
+
115
+
116
+ td.quantity,
117
+ td.item-weight,
118
+ td.weight {
119
+ text-align: right;
120
+ }
121
+
122
+ div.category {
123
+ $checkmark-column: 1;
124
+
125
+ h2 {
126
+ font-size: 1.1em;
127
+ border-bottom: solid 2px black;
128
+ margin: 0;
129
+ line-height: 1.3;
130
+ }
131
+
132
+ margin-bottom: 2em;
133
+
134
+ table {
135
+ margin-top: 0;
136
+ table-layout: fixed;
137
+ width: 100%;
138
+ border-collapse: collapse;
139
+ line-height: 1.6;
140
+
141
+ p {
142
+ margin: 0;
143
+ }
144
+
145
+ .item-name {
146
+ font-weight: 500;
147
+ }
148
+
149
+ tfoot {
150
+ font-weight: 600;
151
+
152
+ td.subtotal {
153
+ text-align: left;
154
+ font-size: 1.05em;
155
+ }
156
+
157
+ td {
158
+ text-align: right;
159
+ border-top: solid 2px #333;
160
+ }
161
+
162
+ tr {
163
+ border-bottom: solid 1px #333;
164
+ }
165
+
166
+ }
167
+
168
+ tbody {
169
+ tr {
170
+ border-bottom: solid 1px #ddd;
171
+ }
172
+
173
+ // Checkmark
174
+ td:nth-child(#{$checkmark-column}) {
175
+ width: 1em;
176
+ }
177
+
178
+ td.quantity {
179
+ width: 3em;
180
+ }
181
+
182
+ td.item-type {
183
+ width: 2em;
184
+ text-align: center;
185
+ }
186
+
187
+ td.item-name {
188
+ // width: 15em;
189
+ }
190
+
191
+ td.item-description {
192
+ width: auto;
193
+ font-weight: 400;
194
+ }
195
+
196
+ td.item-weight {
197
+ width: 5em;
198
+ }
199
+ }
200
+ }
201
+ }
@@ -0,0 +1,57 @@
1
+ /*! system-font.css v1.1.0 | CC0-1.0 License | github.com/jonathantneal/system-font-face */
2
+
3
+ @font-face {
4
+ font-family: system;
5
+ font-style: normal;
6
+ font-weight: 300;
7
+ src: local(".SFNSText-Light"), local(".HelveticaNeueDeskInterface-Light"), local(".LucidaGrandeUI"), local("Ubuntu Light"), local("Segoe UI Light"), local("Roboto-Light"), local("DroidSans"), local("Tahoma");
8
+ }
9
+
10
+ @font-face {
11
+ font-family: system;
12
+ font-style: italic;
13
+ font-weight: 300;
14
+ src: local(".SFNSText-LightItalic"), local(".HelveticaNeueDeskInterface-Italic"), local(".LucidaGrandeUI"), local("Ubuntu Light Italic"), local("Segoe UI Light Italic"), local("Roboto-LightItalic"), local("DroidSans"), local("Tahoma");
15
+ }
16
+
17
+ @font-face {
18
+ font-family: system;
19
+ font-style: normal;
20
+ font-weight: 400;
21
+ src: local(".SFNSText-Regular"), local(".HelveticaNeueDeskInterface-Regular"), local(".LucidaGrandeUI"), local("Ubuntu"), local("Segoe UI"), local("Roboto-Regular"), local("DroidSans"), local("Tahoma");
22
+ }
23
+
24
+ @font-face {
25
+ font-family: system;
26
+ font-style: italic;
27
+ font-weight: 400;
28
+ src: local(".SFNSText-Italic"), local(".HelveticaNeueDeskInterface-Italic"), local(".LucidaGrandeUI"), local("Ubuntu Italic"), local("Segoe UI Italic"), local("Roboto-Italic"), local("DroidSans"), local("Tahoma");
29
+ }
30
+
31
+ @font-face {
32
+ font-family: system;
33
+ font-style: normal;
34
+ font-weight: 500;
35
+ src: local(".SFNSText-Medium"), local(".HelveticaNeueDeskInterface-MediumP4"), local(".LucidaGrandeUI"), local("Ubuntu Medium"), local("Segoe UI Semibold"), local("Roboto-Medium"), local("DroidSans-Bold"), local("Tahoma Bold");
36
+ }
37
+
38
+ @font-face {
39
+ font-family: system;
40
+ font-style: italic;
41
+ font-weight: 500;
42
+ src: local(".SFNSText-MediumItalic"), local(".HelveticaNeueDeskInterface-MediumItalicP4"), local(".LucidaGrandeUI"), local("Ubuntu Medium Italic"), local("Segoe UI Semibold Italic"), local("Roboto-MediumItalic"), local("DroidSans-Bold"), local("Tahoma Bold");
43
+ }
44
+
45
+ @font-face {
46
+ font-family: system;
47
+ font-style: normal;
48
+ font-weight: 700;
49
+ src: local(".SFNSText-Bold"), local(".HelveticaNeueDeskInterface-Bold"), local(".LucidaGrandeUI"), local("Ubuntu Bold"), local("Roboto-Bold"), local("DroidSans-Bold"), local("Segoe UI Bold"), local("Tahoma Bold");
50
+ }
51
+
52
+ @font-face {
53
+ font-family: system;
54
+ font-style: italic;
55
+ font-weight: 700;
56
+ src: local(".SFNSText-BoldItalic"), local(".HelveticaNeueDeskInterface-BoldItalic"), local(".LucidaGrandeUI"), local("Ubuntu Bold Italic"), local("Roboto-BoldItalic"), local("DroidSans-Bold"), local("Segoe UI Bold Italic"), local("Tahoma Bold");
57
+ }