diff --git a/UnicodePlot.html b/UnicodePlot.html index 2aac0db..7e4eea8 100644 --- a/UnicodePlot.html +++ b/UnicodePlot.html @@ -241,7 +241,7 @@ diff --git a/YouPlot.html b/YouPlot.html index e3e6512..e5a8beb 100644 --- a/YouPlot.html +++ b/YouPlot.html @@ -296,7 +296,7 @@ diff --git a/YouPlot/Backends.html b/YouPlot/Backends.html index c9ae393..b79155f 100644 --- a/YouPlot/Backends.html +++ b/YouPlot/Backends.html @@ -118,7 +118,7 @@ diff --git a/YouPlot/Backends/Processing.html b/YouPlot/Backends/Processing.html index 3fde3f6..ed0ef0d 100644 --- a/YouPlot/Backends/Processing.html +++ b/YouPlot/Backends/Processing.html @@ -208,7 +208,7 @@ diff --git a/YouPlot/Backends/UnicodePlot.html b/YouPlot/Backends/UnicodePlot.html index 17af7e4..d1fa403 100644 --- a/YouPlot/Backends/UnicodePlot.html +++ b/YouPlot/Backends/UnicodePlot.html @@ -1070,7 +1070,7 @@ diff --git a/YouPlot/Backends/UnicodePlot/Error.html b/YouPlot/Backends/UnicodePlot/Error.html index 19db539..a7cccc0 100644 --- a/YouPlot/Backends/UnicodePlot/Error.html +++ b/YouPlot/Backends/UnicodePlot/Error.html @@ -114,7 +114,7 @@ diff --git a/YouPlot/Command.html b/YouPlot/Command.html index c3807b7..1d062b8 100644 --- a/YouPlot/Command.html +++ b/YouPlot/Command.html @@ -803,7 +803,7 @@ diff --git a/YouPlot/DSV.html b/YouPlot/DSV.html index 75ecb43..cc005a0 100644 --- a/YouPlot/DSV.html +++ b/YouPlot/DSV.html @@ -460,7 +460,7 @@ diff --git a/YouPlot/Data.html b/YouPlot/Data.html index 28b8632..4cc77a5 100644 --- a/YouPlot/Data.html +++ b/YouPlot/Data.html @@ -300,7 +300,7 @@ diff --git a/YouPlot/Options.html b/YouPlot/Options.html index 6445608..c0380b2 100644 --- a/YouPlot/Options.html +++ b/YouPlot/Options.html @@ -1103,7 +1103,7 @@ diff --git a/YouPlot/Parameters.html b/YouPlot/Parameters.html index 6ccc5ff..9755adb 100644 --- a/YouPlot/Parameters.html +++ b/YouPlot/Parameters.html @@ -1881,7 +1881,7 @@ diff --git a/YouPlot/Parser.html b/YouPlot/Parser.html index 3358e86..2898041 100644 --- a/YouPlot/Parser.html +++ b/YouPlot/Parser.html @@ -346,6 +346,28 @@
  • + #apply_config_file ⇒ Object + + + + + + + + + + + + + +
    + +
  • + + +
  • + + #config_file_candidate_paths ⇒ Object @@ -794,10 +816,7 @@ 31 32 33 -34 -35 -36 -37 +34
    # File 'lib/youplot/parser.rb', line 15
    @@ -820,10 +839,7 @@
     
       @params = Parameters.new
     
    -  if find_config_file
    -    read_config_file
    -    configure
    -  end
    +  apply_config_file
     end
    @@ -1144,7 +1160,43 @@
    -

    +

    + + #apply_config_fileObject + + + + + +

    + + + + +
    +
    +
    +
    +36
    +37
    +38
    +39
    +40
    +41
    +
    +
    # File 'lib/youplot/parser.rb', line 36
    +
    +def apply_config_file
    +  return unless find_config_file
    +
    +  read_config_file
    +  configure
    +end
    +
    +
    + +
    +

    #config_file_candidate_pathsObject @@ -1158,19 +1210,19 @@
     
     
    -39
    -40
    -41
    -42
     43
     44
     45
     46
     47
    -48
    +48 +49 +50 +51 +52 -
    # File 'lib/youplot/parser.rb', line 39
    +      
    # File 'lib/youplot/parser.rb', line 43
     
     def config_file_candidate_paths
       # keep the order of the paths
    @@ -1202,10 +1254,6 @@
           
     
     
    -67
    -68
    -69
    -70
     71
     72
     73
    @@ -1216,10 +1264,14 @@
     78
     79
     80
    -81
    +81 +82 +83 +84 +85
    -
    # File 'lib/youplot/parser.rb', line 67
    +      
    # File 'lib/youplot/parser.rb', line 71
     
     def configure
       option_members = @options.members
    @@ -1256,10 +1308,6 @@
           
     
     
    -83
    -84
    -85
    -86
     87
     88
     89
    @@ -1335,10 +1383,14 @@
     159
     160
     161
    -162
    +162 +163 +164 +165 +166
    -
    # File 'lib/youplot/parser.rb', line 83
    +      
    # File 'lib/youplot/parser.rb', line 87
     
     def create_base_parser
       OptionParser.new do |parser|
    @@ -1440,10 +1492,6 @@
           
     
     
    -164
    -165
    -166
    -167
     168
     169
     170
    @@ -1473,10 +1521,14 @@
     194
     195
     196
    -197
    +197 +198 +199 +200 +201
    -
    # File 'lib/youplot/parser.rb', line 164
    +      
    # File 'lib/youplot/parser.rb', line 168
     
     def create_main_parser
       @main_parser = create_base_parser
    @@ -1532,10 +1584,6 @@
           
     
     
    -259
    -260
    -261
    -262
     263
     264
     265
    @@ -1621,10 +1669,13 @@
     345
     346
     347
    -348
    +348 +349 +350 +351
    -
    # File 'lib/youplot/parser.rb', line 259
    +      
    # File 'lib/youplot/parser.rb', line 263
     
     def create_sub_parser
       @sub_parser = create_base_parser
    @@ -1708,12 +1759,11 @@
     
       else
         error_message = "uplot: unrecognized command '#{command}'"
    -    if YouPlot.run_as_executable?
    -      warn error_message
    -      exit 1
    -    else
    -      raise Error, error_message
    -    end
    +    raise Error, error_message unless YouPlot.run_as_executable?
    +
    +    warn error_message
    +    exit 1
    +
       end
     end
    @@ -1736,20 +1786,20 @@
     
     
    -50
    -51
    -52
    -53
     54
     55
     56
     57
     58
     59
    -60
    +60 +61 +62 +63 +64
    -
    # File 'lib/youplot/parser.rb', line 50
    +      
    # File 'lib/youplot/parser.rb', line 54
     
     def find_config_file
       config_file_candidate_paths.each do |file|
    @@ -1782,9 +1832,6 @@
           
     
     
    -350
    -351
    -352
     353
     354
     355
    @@ -1798,10 +1845,13 @@
     363
     364
     365
    -366
    +366 +367 +368 +369
    -
    # File 'lib/youplot/parser.rb', line 350
    +      
    # File 'lib/youplot/parser.rb', line 353
     
     def parse_options(argv = ARGV)
       begin
    @@ -1840,13 +1890,13 @@
           
     
     
    -62
    -63
    -64
    -65
    +66 +67 +68 +69
    -
    # File 'lib/youplot/parser.rb', line 62
    +      
    # File 'lib/youplot/parser.rb', line 66
     
     def read_config_file
       require 'yaml'
    @@ -1872,14 +1922,14 @@
           
     
     
    -199
    -200
    -201
    -202
    -203
    +203 +204 +205 +206 +207
    -
    # File 'lib/youplot/parser.rb', line 199
    +      
    # File 'lib/youplot/parser.rb', line 203
     
     def show_main_help(out = $stdout)
       out.puts main_parser.banner
    @@ -1906,15 +1956,15 @@
           
     
     
    -218
    -219
    -220
    -221
     222
    -223
    +223 +224 +225 +226 +227
    -
    # File 'lib/youplot/parser.rb', line 218
    +      
    # File 'lib/youplot/parser.rb', line 222
     
     def sub_parser_add_canvas
       canvas_types = UnicodePlot::Canvas::CANVAS_CLASS_MAP.keys.join(', ')
    @@ -1942,16 +1992,16 @@
           
     
     
    -243
    -244
    -245
    -246
     247
     248
    -249
    +249 +250 +251 +252 +253
    -
    # File 'lib/youplot/parser.rb', line 243
    +      
    # File 'lib/youplot/parser.rb', line 247
     
     def sub_parser_add_fmt_xyxy
       sub_parser.on_head('--fmt STR', String,
    @@ -1980,16 +2030,16 @@
           
     
     
    -251
    -252
    -253
    -254
     255
     256
    -257
    +257 +258 +259 +260 +261
    -
    # File 'lib/youplot/parser.rb', line 251
    +      
    # File 'lib/youplot/parser.rb', line 255
     
     def sub_parser_add_fmt_yx
       sub_parser.on_head('--fmt STR', String,
    @@ -2018,14 +2068,14 @@
           
     
     
    -237
    -238
    -239
    -240
    -241
    +241 +242 +243 +244 +245
    -
    # File 'lib/youplot/parser.rb', line 237
    +      
    # File 'lib/youplot/parser.rb', line 241
     
     def sub_parser_add_grid
       sub_parser.on_head('--[no-]grid', TrueClass, 'draws grid-lines at the origin') do |v|
    @@ -2052,14 +2102,14 @@
           
     
     
    -205
    -206
    -207
    -208
    -209
    +209 +210 +211 +212 +213
    -
    # File 'lib/youplot/parser.rb', line 205
    +      
    # File 'lib/youplot/parser.rb', line 209
     
     def sub_parser_add_symbol
       sub_parser.on_head('--symbol STR', String, 'character to be used to plot the bars') do |v|
    @@ -2086,14 +2136,14 @@
           
     
     
    -225
    -226
    -227
    -228
    -229
    +229 +230 +231 +232 +233
    -
    # File 'lib/youplot/parser.rb', line 225
    +      
    # File 'lib/youplot/parser.rb', line 229
     
     def sub_parser_add_xlim
       sub_parser.on_head('--xlim FLOAT,FLOAT', Array, 'plotting range for the x coordinate') do |v|
    @@ -2120,15 +2170,15 @@
           
     
     
    -211
    -212
    -213
    -214
     215
    -216
    +216 +217 +218 +219 +220
    -
    # File 'lib/youplot/parser.rb', line 211
    +      
    # File 'lib/youplot/parser.rb', line 215
     
     def sub_parser_add_xscale
       xscale_options = UnicodePlot::ValueTransformer::PREDEFINED_TRANSFORM_FUNCTIONS.keys.join(', ')
    @@ -2156,14 +2206,14 @@
           
     
     
    -231
    -232
    -233
    -234
    -235
    +235 +236 +237 +238 +239
    -
    # File 'lib/youplot/parser.rb', line 231
    +      
    # File 'lib/youplot/parser.rb', line 235
     
     def sub_parser_add_ylim
       sub_parser.on_head('--ylim FLOAT,FLOAT', Array, 'plotting range for the y coordinate') do |v|
    @@ -2180,7 +2230,7 @@
     

    diff --git a/YouPlot/Parser/Error.html b/YouPlot/Parser/Error.html index b6a2f88..534b917 100644 --- a/YouPlot/Parser/Error.html +++ b/YouPlot/Parser/Error.html @@ -114,7 +114,7 @@ diff --git a/_index.html b/_index.html index f3674ce..f3bd917 100644 --- a/_index.html +++ b/_index.html @@ -238,7 +238,7 @@ diff --git a/file.README.html b/file.README.html index 0f20590..180639b 100644 --- a/file.README.html +++ b/file.README.html @@ -397,7 +397,7 @@ If so, please feel free to contact us. diff --git a/index.html b/index.html index c71d220..1a62064 100644 --- a/index.html +++ b/index.html @@ -397,7 +397,7 @@ If so, please feel free to contact us. diff --git a/method_list.html b/method_list.html index 02949fe..4c1b721 100644 --- a/method_list.html +++ b/method_list.html @@ -45,6 +45,14 @@
  • +
    + #apply_config_file + YouPlot::Parser +
    +
  • + + +
  • barplot YouPlot::Backends::UnicodePlot @@ -52,7 +60,7 @@
  • -
  • +
  • #border YouPlot::Parameters @@ -60,7 +68,7 @@
  • -
  • +
  • boxplot YouPlot::Backends::UnicodePlot @@ -68,7 +76,7 @@
  • -
  • +
  • #canvas YouPlot::Parameters @@ -76,7 +84,7 @@
  • -
  • +
  • check_series_size YouPlot::Backends::UnicodePlot @@ -84,7 +92,7 @@
  • -
  • +
  • #closed YouPlot::Parameters @@ -92,7 +100,7 @@
  • -
  • +
  • #color YouPlot::Parameters @@ -100,7 +108,7 @@
  • -
  • +
  • #color_names YouPlot::Options @@ -108,7 +116,7 @@
  • -
  • +
  • colors YouPlot::Backends::UnicodePlot @@ -116,7 +124,7 @@
  • -
  • +
  • #command YouPlot::Parser @@ -124,7 +132,7 @@
  • -
  • +
  • #command YouPlot::Command @@ -132,7 +140,7 @@
  • -
  • +
  • #config YouPlot::Parser @@ -140,7 +148,7 @@
  • -
  • +
  • #config_file YouPlot::Parser @@ -148,7 +156,7 @@
  • -
  • +
  • #config_file_candidate_paths YouPlot::Parser @@ -156,7 +164,7 @@
  • -
  • +
  • #configure YouPlot::Parser @@ -164,7 +172,7 @@
  • -
  • +
  • count_values YouPlot::Backends::Processing @@ -172,7 +180,7 @@
  • -
  • +
  • #create_base_parser YouPlot::Parser @@ -180,7 +188,7 @@
  • -
  • +
  • #create_main_parser YouPlot::Parser @@ -188,7 +196,7 @@
  • -
  • +
  • #create_sub_parser YouPlot::Parser @@ -196,7 +204,7 @@
  • -
  • +
  • #data YouPlot::Command @@ -204,7 +212,7 @@
  • -
  • +
  • #debug YouPlot::Options @@ -212,7 +220,7 @@
  • -
  • +
  • #delimiter YouPlot::Options @@ -220,7 +228,7 @@
  • -
  • +
  • density YouPlot::Backends::UnicodePlot @@ -228,7 +236,7 @@
  • -
  • +
  • #encoding YouPlot::Options @@ -236,7 +244,7 @@
  • -
  • +
  • #find_config_file YouPlot::Parser @@ -244,7 +252,7 @@
  • -
  • +
  • #fmt YouPlot::Options @@ -252,7 +260,7 @@
  • -
  • +
  • get_headers YouPlot::DSV @@ -260,7 +268,7 @@
  • -
  • +
  • get_method2 YouPlot::Backends::UnicodePlot @@ -268,7 +276,7 @@
  • -
  • +
  • get_series YouPlot::DSV @@ -276,7 +284,7 @@
  • -
  • +
  • #grid YouPlot::Parameters @@ -284,7 +292,7 @@
  • -
  • +
  • #headers YouPlot::Data @@ -292,7 +300,7 @@
  • -
  • +
  • #headers YouPlot::Options @@ -300,7 +308,7 @@
  • -
  • +
  • #height YouPlot::Parameters @@ -308,7 +316,7 @@
  • -
  • +
  • histogram YouPlot::Backends::UnicodePlot @@ -316,7 +324,7 @@
  • -
  • +
  • #initialize YouPlot::Parser @@ -324,7 +332,7 @@
  • -
  • +
  • #initialize YouPlot::Command @@ -332,7 +340,7 @@
  • -
  • +
  • #labels YouPlot::Parameters @@ -340,7 +348,7 @@
  • -
  • +
  • line YouPlot::Backends::UnicodePlot @@ -348,7 +356,7 @@
  • -
  • +
  • lineplot UnicodePlot @@ -356,7 +364,7 @@
  • -
  • +
  • lineplot_original UnicodePlot @@ -364,7 +372,7 @@
  • -
  • +
  • lines YouPlot::Backends::UnicodePlot @@ -372,7 +380,7 @@
  • -
  • +
  • #main_parser YouPlot::Parser @@ -380,7 +388,7 @@
  • -
  • +
  • #margin YouPlot::Parameters @@ -388,7 +396,7 @@
  • -
  • +
  • #name YouPlot::Parameters @@ -396,7 +404,7 @@
  • -
  • +
  • #nbins YouPlot::Parameters @@ -404,7 +412,7 @@
  • -
  • +
  • #options YouPlot::Parser @@ -412,7 +420,7 @@
  • -
  • +
  • #options YouPlot::Command @@ -420,7 +428,7 @@
  • -
  • +
  • #output YouPlot::Options @@ -428,7 +436,7 @@
  • -
  • +
  • #padding YouPlot::Parameters @@ -436,7 +444,7 @@
  • -
  • +
  • #params YouPlot::Parser @@ -444,7 +452,7 @@
  • -
  • +
  • #params YouPlot::Command @@ -452,7 +460,7 @@
  • -
  • +
  • parse YouPlot::DSV @@ -460,7 +468,7 @@
  • -
  • +
  • #parse_options YouPlot::Parser @@ -468,7 +476,7 @@
  • -
  • +
  • #parser YouPlot::Command @@ -476,7 +484,7 @@
  • -
  • +
  • #pass YouPlot::Options @@ -484,7 +492,7 @@
  • -
  • +
  • plot_fmt YouPlot::Backends::UnicodePlot @@ -492,7 +500,7 @@
  • -
  • +
  • plot_xyxy YouPlot::Backends::UnicodePlot @@ -500,7 +508,7 @@
  • -
  • +
  • plot_xyy YouPlot::Backends::UnicodePlot @@ -508,7 +516,7 @@
  • -
  • +
  • #progressive YouPlot::Options @@ -516,7 +524,7 @@
  • -
  • +
  • #read_config_file YouPlot::Parser @@ -524,7 +532,7 @@
  • -
  • +
  • #reverse YouPlot::Options @@ -532,7 +540,7 @@
  • -
  • +
  • #run YouPlot::Command @@ -540,7 +548,7 @@
  • -
  • +
  • run_as_executable YouPlot @@ -548,7 +556,7 @@
  • -
  • +
  • #run_as_executable YouPlot::Command @@ -556,7 +564,7 @@
  • -
  • +
  • run_as_executable? YouPlot @@ -564,7 +572,7 @@
  • -
  • +
  • scatter YouPlot::Backends::UnicodePlot @@ -572,7 +580,7 @@
  • -
  • +
  • #series YouPlot::Data @@ -580,7 +588,7 @@
  • -
  • +
  • #show_main_help YouPlot::Parser @@ -588,7 +596,7 @@
  • -
  • +
  • #sub_parser YouPlot::Parser @@ -596,7 +604,7 @@
  • -
  • +
  • #sub_parser_add_canvas YouPlot::Parser @@ -604,7 +612,7 @@
  • -
  • +
  • #sub_parser_add_fmt_xyxy YouPlot::Parser @@ -612,7 +620,7 @@
  • -
  • +
  • #sub_parser_add_fmt_yx YouPlot::Parser @@ -620,7 +628,7 @@
  • -
  • +
  • #sub_parser_add_grid YouPlot::Parser @@ -628,7 +636,7 @@
  • -
  • +
  • #sub_parser_add_symbol YouPlot::Parser @@ -636,7 +644,7 @@
  • -
  • +
  • #sub_parser_add_xlim YouPlot::Parser @@ -644,7 +652,7 @@
  • -
  • +
  • #sub_parser_add_xscale YouPlot::Parser @@ -652,7 +660,7 @@
  • -
  • +
  • #sub_parser_add_ylim YouPlot::Parser @@ -660,7 +668,7 @@
  • -
  • +
  • #symbol YouPlot::Parameters @@ -668,7 +676,7 @@
  • -
  • +
  • #title YouPlot::Parameters @@ -676,7 +684,7 @@
  • -
  • +
  • #to_hc YouPlot::Parameters @@ -684,7 +692,7 @@
  • -
  • +
  • #transpose YouPlot::Options @@ -692,7 +700,7 @@
  • -
  • +
  • transpose2 YouPlot::DSV @@ -700,7 +708,7 @@
  • -
  • +
  • #width YouPlot::Parameters @@ -708,7 +716,7 @@
  • -
  • +
  • #xlabel YouPlot::Parameters @@ -716,7 +724,7 @@
  • -
  • +
  • #xlim YouPlot::Parameters @@ -724,7 +732,7 @@
  • -
  • +
  • #xscale YouPlot::Parameters @@ -732,7 +740,7 @@
  • -
  • +
  • #ylabel YouPlot::Parameters @@ -740,7 +748,7 @@
  • -
  • +
  • #ylim YouPlot::Parameters diff --git a/top-level-namespace.html b/top-level-namespace.html index 609bb4b..619318d 100644 --- a/top-level-namespace.html +++ b/top-level-namespace.html @@ -100,7 +100,7 @@