-
Notifications
You must be signed in to change notification settings - Fork 68
Combining Multiple Columns
Andy Meneely edited this page Mar 16, 2016
·
1 revision
Say you have multiple columns in your Excel sheet that need to be combined into one text field on your card. Consider using zip
in conjunction with map
.
data['BuyText'] = data['BuyAmount'].zip(data['BuyType']).map do |amt, type|
"You may purchase #{amt} #{type}" #e.g. You may purchase 1 Wood.
end
data['Cost'] = data['Action Cost'].zip(data['Card Cost']).map do |ac, cc|
':action:' * ac.to_i + ":card#{cc}:"
end
Second example adapted from this conversation
Install: Windows OSX Linux Cygwin
Getting Started
Important
Advanced Squibbing
- The Mighty text Method
- Layouts
- Manipulating PNGs
- Manipulating SVGs
- Vector back end
- Rendering both BW and Color
- Colors
- Configuration Options
Real Project Histories
Squiblets
- Category specific template text
- Combining Multiple Columns
- One Icon Per Location
- One Location, Multiple Icons
- Google Sheets
- Rake Rendering Modes
- Autoscale Fonts
- Marketing Materials
- Autobuild with Guardfiles
- Wireframing with an SVG Editor
- Front to Back Printing
- Versioning Practices
- Icon Library: FontAwesome
- Icon Library: GameIcons
- Combining Multiple Columns
- Combine Multiple CSV Files
- Switch card background or invert theme
Tools
Contributing