bitclust-core 0.9.3 → 0.9.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44f546bdb118c173c451de79b39c7e4b93cb6d2d
|
4
|
+
data.tar.gz: d3fecf803bed34c35f2c5d6805e197bbd02d03c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4368f9fb10199560cfbf9c5d9d0086c9778cd3efb97e69ff0fc24446b8c730f8f69fff67aa6316ae8efb20720661b0460cae4d46d90c3ba01c6d639110159486
|
7
|
+
data.tar.gz: d694d12b33853507c6386a5c6aa911d3c9279be75d7342dc95340309e856230fcf61d8a6d022b0eb8a558d67dbfdaaac2233eb3a7aaad93c16df8a88c88e7b69
|
data/lib/bitclust/compat.rb
CHANGED
@@ -37,6 +37,7 @@ EOS
|
|
37
37
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
38
38
|
<HTML>
|
39
39
|
<HEAD>
|
40
|
+
<meta http-equiv="Content-Type" content="text/html; charset=Windows-31J">
|
40
41
|
</HEAD>
|
41
42
|
<BODY>
|
42
43
|
<UL><% [:library].each do |k| %>
|
@@ -49,6 +50,7 @@ EOS
|
|
49
50
|
HHK_SKEL = <<EOS
|
50
51
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
51
52
|
<HTML>
|
53
|
+
<meta http-equiv="Content-Type" content="text/html; charset=Windows-31J">
|
52
54
|
<HEAD>
|
53
55
|
</HEAD>
|
54
56
|
<BODY>
|
@@ -210,9 +212,9 @@ EOS
|
|
210
212
|
pb.finish
|
211
213
|
end
|
212
214
|
@html_files.sort!
|
213
|
-
create_file(@outputdir + 'refm.hhp', HHP_SKEL
|
214
|
-
create_file(@outputdir + 'refm.hhc', HHC_SKEL
|
215
|
-
create_file(@outputdir + 'refm.hhk', HHK_SKEL
|
215
|
+
create_file(@outputdir + 'refm.hhp', HHP_SKEL)
|
216
|
+
create_file(@outputdir + 'refm.hhc', HHC_SKEL)
|
217
|
+
create_file(@outputdir + 'refm.hhk', HHK_SKEL)
|
216
218
|
create_file(@outputdir + 'library/index.html', manager.library_index_screen(db.libraries.sort, {:database => db}).body)
|
217
219
|
create_file(@outputdir + 'class/index.html', manager.class_index_screen(db.classes.sort, {:database => db}).body)
|
218
220
|
FileUtils.cp(@manager_config[:themedir] + @manager_config[:css_url],
|
@@ -225,6 +227,7 @@ EOS
|
|
225
227
|
@manager_config = {
|
226
228
|
:baseurl => 'http://example.com/',
|
227
229
|
:suffix => '.html',
|
230
|
+
:catalogdir => srcdir_root + 'data'+ 'bitclust' + 'catalog',
|
228
231
|
:templatedir => srcdir_root + 'data'+ 'bitclust' + 'template',
|
229
232
|
:themedir => srcdir_root + 'theme' + 'default',
|
230
233
|
:css_url => 'style.css',
|
@@ -234,6 +237,13 @@ EOS
|
|
234
237
|
@manager_config[:urlmapper] = URLMapperEx.new(@manager_config)
|
235
238
|
end
|
236
239
|
|
240
|
+
FIX_UNDEF = { "\u00a5" => '\\', # encode MS unicode to Windows-31J as much as possible
|
241
|
+
"\u00b7" => "\uff65",
|
242
|
+
"\u0308" => "\u2025",
|
243
|
+
"\u2014" => "\u2015",
|
244
|
+
"\u2212" => "\uff0d",
|
245
|
+
"\u301c" => "\uff5e" }
|
246
|
+
|
237
247
|
def create_html_file(entry, manager, outputdir, db)
|
238
248
|
html = manager.entry_screen(entry, {:database => db}).body
|
239
249
|
e = entry.is_a?(Array) ? entry.sort.first : entry
|
@@ -247,18 +257,27 @@ EOS
|
|
247
257
|
raise
|
248
258
|
end
|
249
259
|
FileUtils.mkdir_p(path.dirname) unless path.dirname.directory?
|
250
|
-
|
251
|
-
|
260
|
+
|
261
|
+
begin
|
262
|
+
new_html = html.gsub(/charset=utf-8/i, 'charset=Windows-31J').
|
263
|
+
encode('windows-31j', { :fallback => FIX_UNDEF })
|
264
|
+
mode = 'w:windows-31j'
|
265
|
+
rescue
|
266
|
+
new_html = html # write file as it is, utf-8
|
267
|
+
mode = 'w:utf-8'
|
268
|
+
end
|
269
|
+
path.open(mode) do |f|
|
270
|
+
f.write(new_html)
|
252
271
|
end
|
253
272
|
path.relative_path_from(outputdir).to_s
|
254
273
|
end
|
255
274
|
|
256
|
-
def create_file(path, skel
|
275
|
+
def create_file(path, skel)
|
257
276
|
$stderr.print("creating #{path} ...")
|
258
|
-
str = ERB.new(skel).result(binding)
|
259
|
-
|
260
|
-
|
261
|
-
path.open('w') do |f|
|
277
|
+
str = ERB.new(skel).result(binding).
|
278
|
+
gsub(/charset=utf-8/i, 'charset=Windows-31J').
|
279
|
+
encode('windows-31j', { :fallback => FIX_UNDEF } )
|
280
|
+
path.open('w:windows-31j') do |f|
|
262
281
|
f.write(str)
|
263
282
|
end
|
264
283
|
$stderr.puts(" done.")
|
@@ -19,7 +19,7 @@ module BitClust
|
|
19
19
|
@prepare = nil
|
20
20
|
@cleanup = nil
|
21
21
|
@purge = nil
|
22
|
-
@versions = ["2.1.0", "2.2.0", "2.3.0"]
|
22
|
+
@versions = ["2.1.0", "2.2.0", "2.3.0", "2.4.0"]
|
23
23
|
@update = true
|
24
24
|
@parser.banner = "Usage: #{File.basename($0, '.*')} setup [options]"
|
25
25
|
@parser.on('--prepare', 'Prepare config file and checkout repository. Do not create database.') {
|
data/lib/bitclust/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitclust-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/rurema
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -192,6 +192,7 @@ files:
|
|
192
192
|
- lib/bitclust/subcommands/preproc_command.rb
|
193
193
|
- lib/bitclust/subcommands/property_command.rb
|
194
194
|
- lib/bitclust/subcommands/query_command.rb
|
195
|
+
- lib/bitclust/subcommands/review_command.rb
|
195
196
|
- lib/bitclust/subcommands/server_command.rb
|
196
197
|
- lib/bitclust/subcommands/setup_command.rb
|
197
198
|
- lib/bitclust/subcommands/statichtml_command.rb
|
@@ -239,23 +240,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
240
|
version: '0'
|
240
241
|
requirements: []
|
241
242
|
rubyforge_project: ''
|
242
|
-
rubygems_version: 2.6.
|
243
|
+
rubygems_version: 2.6.8
|
243
244
|
signing_key:
|
244
245
|
specification_version: 4
|
245
246
|
summary: BitClust is a rurema document processor.
|
246
247
|
test_files:
|
247
|
-
- test/
|
248
|
-
- test/run_test.rb
|
249
|
-
- test/test_entry.rb
|
250
|
-
- test/test_methoddatabase.rb
|
251
|
-
- test/test_functiondatabase.rb
|
248
|
+
- test/test_simplesearcher.rb
|
252
249
|
- test/test_refsdatabase.rb
|
250
|
+
- test/test_runner.rb
|
251
|
+
- test/test_methoddatabase.rb
|
252
|
+
- test/test_nameutils.rb
|
253
|
+
- test/run_test.rb
|
254
|
+
- test/test_rrdparser.rb
|
253
255
|
- test/test_bitclust.rb
|
254
|
-
- test/test_functionreferenceparser.rb
|
255
256
|
- test/test_methodsignature.rb
|
256
|
-
- test/
|
257
|
-
- test/
|
258
|
-
- test/test_nameutils.rb
|
257
|
+
- test/test_entry.rb
|
258
|
+
- test/test_functionreferenceparser.rb
|
259
259
|
- test/test_rdcompiler.rb
|
260
|
-
- test/
|
260
|
+
- test/test_preprocessor.rb
|
261
|
+
- test/test_functiondatabase.rb
|
261
262
|
- test/test_libraryentry.rb
|