Sha256: 3eea894b5c4c85b016adaffb57b5e98a114381e8e6628b69444f724be7fa2832

Contents?: true

Size: 492 Bytes

Versions: 21

Compression:

Stored size: 492 Bytes

Contents

#!/usr/bin/env ruby
# -*- ruby -*-

require 'scrapbox'

PROJECT = "HelpLine"

project = Scrapbox::Project.new(PROJECT)
page = Scrapbox::Page.new(project,'Glossary')
data = {}
page.text.split(/\n/).each { |line|
  line.chomp!
  if line =~ /^(\S+):\s*(.*)$/
    if $1 != 'code' # code: は除く
      data[$1] = $2
    end
  end
}

defs = []
puts "var glossary = {"
data.each { |key,val|
  defs << "    '#{key}': '#{val}'"
}
puts defs.join(",\n")
puts "}"
puts "module.exports = glossary"




Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
helpline-0.2.2 getglossary.rb
helpline-0.2.1 getglossary.rb
helpline-0.1.18 getglossary.rb
helpline-0.1.17 getglossary.rb
helpline-0.1.16 getglossary.rb
helpline-0.1.15 getglossary.rb
helpline-0.1.14 getglossary.rb
helpline-0.1.13 getglossary.rb
helpline-0.1.12 getglossary.rb
helpline-0.1.11 getglossary.rb
helpline-0.1.10 getglossary.rb
helpline-0.1.9 getglossary.rb
helpline-0.1.8 getglossary.rb
helpline-0.1.7 getglossary.rb
helpline-0.1.6 getglossary.rb
helpline-0.1.5 getglossary.rb
helpline-0.1.4 getglossary.rb
helpline-0.1.3 getglossary.rb
helpline-0.1.2 getglossary.rb
helpline-0.1.1 getglossary.rb