Changeset 15696 for lang/vim

Show
Ignore:
Timestamp:
07/12/08 14:42:04 (5 years ago)
Author:
ujihisa
Message:

enable to use ~/.mixi

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/vim/ruby/mixi.vim

    r15695 r15696  
    8989  body = body[0..-(images.length + 1)].join "\n" 
    9090 
    91   m = Mixi.new 'YOUR_EMAIL', 'YOUR_PASSWORD' 
     91  # ~/.mixi 
     92  # line1: input your email 
     93  # line2: input your password 
     94  # line3: input "premium" if you are premium 
     95  m = 
     96    if File.exist?(File.expand_path('~/.mixi')) 
     97      mixi_config = File.read(File.expand_path('~/.mixi')) 
     98      email, password, premium = mixi_config.split(/\r?\n/) 
     99      Mixi.new email, password, (premium == 'premium') 
     100    else 
     101      m = Mixi.new 'YOUR_EMAIL', 'YOUR_PASSWORD' 
     102    end 
    92103  # if you are mixi premium member: 
    93104  # m = Mixi.new 'YOUR_EMAIL', 'YOUR_PASSWORD', true