helpline 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b2bc48034db45fc57d3f69b5d992dc7ab045e7acf82d48fe0f225398ee6fdb9
4
- data.tar.gz: f2f1cfcfb59fd2c7cbafd8ac650cf569caac793d3ebf3821b8032a9529370acf
3
+ metadata.gz: 4da846a2097e73873989f053ae7acba666b64e9fb350ac543897ee2e10889311
4
+ data.tar.gz: 4237c2757bdec52c46225849dd08169b5aed63a4031c5ece0e5ee4175548f8d7
5
5
  SHA512:
6
- metadata.gz: 3c646c3edc7b3c5ca9120db0802e446ffdae29e76e475d228feb23fcc5a43568a7f237be646f2f8e1ff1399d6b43dbe69e0d186324d4c3ad6456528cfda4a19a
7
- data.tar.gz: 791d893b90bc215c7ee063db030d17f7b0549af829683d59d59a7af54e3a4bc4650462a1854f261681e39211d17695af2b3f940039ce19682f035a8dfb13ef5f
6
+ metadata.gz: 02b39b745ecd0c4088981a533283e2d4d5547b31ecd8d73e74146765d9cd7441460e2690c8d3e8c85ffe7425db30ce4535d7317e44c9283baf3182b39e947f01
7
+ data.tar.gz: 3c0c888681502eb0ce5e548a02fb53c95fba00cba92dce8d62420fe17e1bce618f13e59101068714ab7b9370352e1286941bc65e288d1e94c941ed5e4bcac823
data/Makefile CHANGED
@@ -1,54 +1,15 @@
1
- .PHONY: data.js glossary.js test
2
-
3
- run: browserify
4
- npm start .
5
-
6
- browserify:
7
- browserify helpline.js -o helpline_browserify.js
8
-
9
- build-mac: install browserify
10
- npm run build
11
- cp -r build/mac/HelpLine.app /Applications
12
- upload:
13
- scp build/HelpLine-0.0.1.dmg pitecan.com:/www/www.pitecan.com/tmp/HelpLine.dmg
14
-
15
- build-chromebook: browserify install
16
- npm run build
17
-
18
- #dmg: build-mac
19
- # -/bin/rm -f HelpLine.dmg
20
- # hdiutil create -srcfolder build/mac/HelpLine.app -volname HelpLine HelpLine.dmg
21
-
22
- #install: npm browserify cursorpos electron
23
- install:
24
- npm install
25
-
26
- electron:
27
- npm install electron
28
-
29
1
  #
30
- # Scrapboxからデータ更新
31
- #
32
- update: data.js glossary.js
33
- data.js:
34
- ruby getdata.rb > data.js
35
- glossary.js:
36
- ruby getglossary.rb > glossary.js
37
-
38
- clean:
39
- -/bin/rm -r -f node_modules
40
- -/bin/rm -r -f build
41
- -/bin/rm -f HelpLine.dmg
42
-
43
- all: update build-mac
44
-
45
-
46
- #
47
- # gem
2
+ # Gem版
48
3
  #
49
4
  release:
50
5
  rake release
51
6
 
7
+ update:
8
+ helpline --update
9
+
10
+ update-local:
11
+ helpline --update --debug --source ~/ScrapboxData/HelpLine.json,~/ScrapboxData/masui-helpline.json
12
+
52
13
  #
53
14
  # テスト
54
15
  #
@@ -0,0 +1,43 @@
1
+ .PHONY: data.js glossary.js test
2
+
3
+ run: browserify
4
+ npm start .
5
+
6
+ browserify:
7
+ browserify helpline.js -o helpline_browserify.js
8
+
9
+ build-mac: install browserify
10
+ npm run build
11
+ cp -r build/mac/HelpLine.app /Applications
12
+ upload:
13
+ scp build/HelpLine-0.0.1.dmg pitecan.com:/www/www.pitecan.com/tmp/HelpLine.dmg
14
+
15
+ build-chromebook: browserify install
16
+ npm run build
17
+
18
+ #dmg: build-mac
19
+ # -/bin/rm -f HelpLine.dmg
20
+ # hdiutil create -srcfolder build/mac/HelpLine.app -volname HelpLine HelpLine.dmg
21
+
22
+ #install: npm browserify cursorpos electron
23
+ install:
24
+ npm install
25
+
26
+ electron:
27
+ npm install electron
28
+
29
+ #
30
+ # Scrapboxからデータ更新
31
+ #
32
+ update: data.js glossary.js
33
+ data.js:
34
+ ruby getdata.rb > data.js
35
+ glossary.js:
36
+ ruby getglossary.rb > glossary.js
37
+
38
+ clean:
39
+ -/bin/rm -r -f node_modules
40
+ -/bin/rm -r -f build
41
+ -/bin/rm -f HelpLine.dmg
42
+
43
+ all: update build-mac
@@ -57,21 +57,21 @@ class HelpLine
57
57
  #
58
58
  puts "-----------------関数/定数を取得"
59
59
  src = nil
60
- indent = ''
61
60
  code = []
62
61
  pagedata.each { |title,lines|
63
62
  puts "...#{title}"
64
63
  lines.each { |line|
65
- if src && line =~ /^#{indent}\s+/ then
64
+ if src && line =~ /^\s+/ then
66
65
  code << line
67
66
  elsif line =~ /^code:(.*\.rb)$/ then
68
- src = $2
69
- indent = $1
67
+ if code.length > 0
68
+ dumpdata['codes'] << code.join("\n")
69
+ end
70
+ src = $1
70
71
  code = []
71
72
  elsif src then
72
73
  dumpdata['codes'] << code.join("\n")
73
74
  src = nil
74
- indent = ''
75
75
  code = []
76
76
  else
77
77
  end
@@ -89,18 +89,18 @@ class HelpLine
89
89
  pagedata.each { |line|
90
90
  if !codeindent
91
91
  if line =~ /^code:/
92
- codeindent = $1.length
92
+ codeindent = 0
93
93
  next
94
94
  end
95
95
  else
96
96
  line =~ /^(\s*)/
97
- if line.length < codeindent
97
+ if $1.length < codeindent + 1
98
98
  codeindent = nil
99
99
  else
100
100
  next
101
101
  end
102
102
  end
103
- if line =~ /^\s*[\$\%\?]/
103
+ if line =~ /^[\$\%\?]/
104
104
  if line =~ /^\%/ && !processing_defs
105
105
  puts "'$'で始まる用例定義なしでコマンドを定義しようとしています"
106
106
  exit
@@ -161,9 +161,9 @@ class HelpLine
161
161
  File.open(logfile,"w"){ |f| # ログを残す場合
162
162
  entries = []
163
163
  data['defs'].each { |line|
164
- if line =~ /^\s*[\$\?]\s*(.*)$/ # $....
164
+ if line =~ /^[\$\?]\s*(.*)$/ # $....
165
165
  entries << $1
166
- elsif line =~ /^\s*\%\s*(.*)$/ # %....
166
+ elsif line =~ /^\%\s*(.*)$/ # %....
167
167
  cmd = $1
168
168
  entries.each { |l|
169
169
  desc = eval('"' + l + '"')
@@ -1,3 +1,3 @@
1
1
  module Helpline
2
- VERSION = "0.1.17"
2
+ VERSION = "0.1.18"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helpline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshiyuki Masui
@@ -94,6 +94,7 @@ files:
94
94
  - HelpLine.json
95
95
  - LICENSE.txt
96
96
  - Makefile
97
+ - Makefile.electron
97
98
  - README.md
98
99
  - Rakefile
99
100
  - _config.yml