From 1fb95486371cfd1fe7c2696a6149c0cf3a9c86b6 Mon Sep 17 00:00:00 2001 From: Karneades Date: Wed, 22 May 2019 10:00:15 +0200 Subject: [PATCH 1/2] Improve rakefile example to match docs Improve example to match the example in the docs [1] and fix the test task name. [1] https://squib.readthedocs.io/en/latest/build_groups.html --- samples/build_groups/Rakefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/build_groups/Rakefile b/samples/build_groups/Rakefile index a3dfad6..886fbf0 100644 --- a/samples/build_groups/Rakefile +++ b/samples/build_groups/Rakefile @@ -2,13 +2,13 @@ require 'squib' desc 'Build black-and-white by default' -task default: [:bw] +task default: [:pnp] desc 'Build both bw and color' -task both: [:bw, :color] +task both: [:pnp, :color] desc 'Build black-and-white only' -task :bw do +task :pnp do Squib.enable_build_globally :print_n_play load 'build_groups.rb' end @@ -20,7 +20,7 @@ task :color do end desc 'Build a test card' -task :color do +task :test do Squib.enable_build_globally :test load 'build_groups.rb' end From cfbcdfeeec22ae94c4dd18bfa13c6b27fc350e58 Mon Sep 17 00:00:00 2001 From: Karneades Date: Mon, 13 May 2019 21:08:52 +0200 Subject: [PATCH 2/2] Add csv example to docs for multiple source files --- docs/dsl/csv.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/dsl/csv.rst b/docs/dsl/csv.rst index 8f5ab07..fc9f055 100644 --- a/docs/dsl/csv.rst +++ b/docs/dsl/csv.rst @@ -12,6 +12,14 @@ The ``csv`` method is a member of ``Squib::Deck``, but it is also available outs Squib::Deck.new(cards: data['name'].size) do end +If you have multiple source files which you would like to concatenate use the following:: + + cards1 = Squib.csv file: 'cards1.tsv', col_sep: "\t" + cards2 = Squib.csv file: 'cards2.tsv', col_sep: "\t" + + all_cards = cards1 + all_cards['column1'] += cards2['column1'] + all_cards['column2'] += cards2['column2'] Options -------