hiki2yard 0.1.0 → 0.1.1

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: e843fab99886dd5358967973bf3c2da4a1e0aad0
4
- data.tar.gz: 1f287c2fec651dfc94253f19a1f6f9674b2f25e2
3
+ metadata.gz: 3213039e80799fcb8245845bf54d01ec4f55f6ac
4
+ data.tar.gz: 71e9b033a35755487e35fe3a078307c5d7eb487b
5
5
  SHA512:
6
- metadata.gz: 1776fb74e4e97a1ebb1696cea6dfa84a7c06982dc65ba8c5757af4486685c0be30d7d8bfa82e1660e4cf3be7287640f38d6cd39a342cc32a8edf931a5315d9fe
7
- data.tar.gz: 34185b677f59eb634e44d225cf808f13ac3bd97b8b7a5e36519768cdce9b9287c0bdfdb8232bc4abecf92619f2f2480d547e27e3aea6b9a85a110df4a71d9668
6
+ metadata.gz: 1799d0d2bdacfe66202cd1ec51b9bc86ef3a567d932ef382201e34adc8e2d830d6ffc485c2dfc7b9ddc115eea44ed6a619a30e91c2b6399e1546bb28c926b4d8
7
+ data.tar.gz: 5c0af4fd576567e0973dd8b51d298a658cf15f0c7a746a9381b9dcb771590cd2c720e817dee36e821ff1952a4f037181acc36361946db8b7cc912c88e307cbb8
data/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # Hiki2yard
2
2
 
3
- bundle gemで作られるdirectoryに,hikiからyard, wiki文書を作る環境を自動構築する.
3
+ On gem development directory, support making docs from hiki to yard, wiki.
4
4
 
5
- ## 動機
5
+ ## motivation
6
6
 
7
7
  | link | wiki | doc|
8
8
  |:----|:----|:----|
9
- | 動機 |[why?](Why_hiki2yard)|[why?](file.Why_hiki2yard.html)|
9
+ | motivation |[why?](Why_hiki2yard)|[why?](file.Why_hiki2yard.html)|
10
10
 
11
11
 
12
- ## インストール
12
+ ## Installation
13
13
 
14
- 以下のコマンドでgemとしてinstall:
14
+ Install it yourself as:
15
15
 
16
16
  ```
17
17
  $ gem install hiki2yard
@@ -19,38 +19,19 @@ $ gem install hiki2yard
19
19
 
20
20
  ## Usage
21
21
 
22
- gemdirectory
22
+ At gem directory,
23
23
 
24
24
  ```
25
25
  $ hiki2yard --init
26
26
  ```
27
27
 
28
- と打ち込めば,自動的に環境を整備.
29
-
30
- ### 動作内容
31
-
32
- 1. Rakefileをcopy
33
- 1. .yardoptsファイルを作成
34
- 1. hikisディレクトリーを作成
35
- 1. wikiディレクトリーを作成
36
- 1. Githubでwikiを作成してからgit clone ***.wiki.gitのほうが確実.
37
-
38
- ## その後
39
-
40
- 1. hikisに適当にファイルを作成,編集
41
- 1. rake yardでdocumentsが自動生成される.
42
-
43
- ## やり残し
44
-
45
- 1. mathjax用のひな形との切り替え.
46
- 1. gemspecは手動で残した.
47
- 1. リンク作成をwikiとdocで自動生成したいな...
48
- 1. hiki2latexによるtex文書の自動生成.
28
+ then all the necessary procedures done automatically, hopefully...
49
29
 
50
30
  ## Contributing
51
31
 
52
32
  Bug reports and pull requests are welcome on GitHub at https://github.com/daddygongon/hiki2yard. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
53
33
 
34
+
54
35
  ## License
55
36
 
56
37
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'yard'
3
3
  require "rake/testtask"
4
-
4
+ require 'fileutils'
5
5
  p base_path = File.expand_path('..', __FILE__)
6
6
  p basename = File.basename(base_path)
7
7
 
@@ -21,14 +21,18 @@ task :hiki2md do
21
21
  system command
22
22
  when 'gif','png','pdf'
23
23
  p command="cp hikis/#{file} #{basename}.wiki/#{file}"
24
- system command
24
+ # system command
25
+ FileUtils.cp("hikis/#{file}","#{basename}.wiki/#{file}",:verbose=>true)
26
+ FileUtils.cp("hikis/#{file}","doc/#{file}",:verbose=>true)
25
27
  end
26
28
  }
27
- system "cp #{basename}.wiki/README_ja.md README.md"
28
- system "cp #{basename}.wiki/README_ja.md #{basename}.wiki/Home.md"
29
- system "cp docs/*.gif #{basename}.wiki"
30
- system "cp docs/*.gif doc"
31
- system "cp docs/*.png #{basename}.wiki"
32
- system "cp docs/*.png doc"
29
+ readme_en="#{basename}.wiki/README_en.md"
30
+ readme_ja="#{basename}.wiki/README_ja.md"
31
+ if File.exists?(readme_en)
32
+ FileUtils.cp(readme_en,"./README.md",:verbose=>true)
33
+ elsif File.exists?(readme_ja)
34
+ FileUtils.cp(readme_ja,"./README.md",:verbose=>true)
35
+ FileUtils.cp(readme_ja,"#{basename}.wiki/Home.md",:verbose=>true)
36
+ end
33
37
  end
34
38
 
@@ -27,6 +27,13 @@ $ hiki2yard --init
27
27
 
28
28
  と打ち込めば,自動的に環境を整備.
29
29
 
30
+ ```
31
+ Usage: hiki2yard [options]
32
+ -v show program Version.
33
+ -f, --force force copy new Rakefile.
34
+ -i, --init initialize target directory.
35
+ ```
36
+
30
37
  ### 動作内容
31
38
 
32
39
  1. Rakefileをcopy
@@ -35,6 +42,34 @@ $ hiki2yard --init
35
42
  1. wikiディレクトリーを作成
36
43
  1. Githubでwikiを作成してからgit clone ***.wiki.gitのほうが確実.
37
44
 
45
+ ### directory構成
46
+ だいぶ省略しているし,また,.yardoptsなどの隠れファイルもあるが,
47
+ 関連するdirectoryは以下のとおり.
48
+ ```
49
+ .
50
+ ├── CODE_OF_CONDUCT.md
51
+ ├── Gemfile
52
+ ├── Gemfile.lock
53
+ ├── LICENSE.txt
54
+ ├── README.md
55
+ ├── Rakefile
56
+ ├── doc
57
+ │   ├── _index.html
58
+ ├── hiki2yard.wiki
59
+ │   ├── Home.md
60
+ │   ├── README_en.md
61
+ │   ├── README_ja.md
62
+ │   └── Why_hiki2yard.md
63
+ ├── hikis
64
+ │   ├── README_en.hiki
65
+ │   ├── README_ja.hiki
66
+ │   ├── README_ja.hiki~
67
+ │   └── Why_hiki2yard.hiki
68
+ └── latexes
69
+
70
+ 13 directories, 46 files
71
+ ```
72
+
38
73
  ## その後
39
74
 
40
75
  1. hikisに適当にファイルを作成,編集
@@ -27,6 +27,13 @@ $ hiki2yard --init
27
27
 
28
28
  と打ち込めば,自動的に環境を整備.
29
29
 
30
+ ```
31
+ Usage: hiki2yard [options]
32
+ -v show program Version.
33
+ -f, --force force copy new Rakefile.
34
+ -i, --init initialize target directory.
35
+ ```
36
+
30
37
  ### 動作内容
31
38
 
32
39
  1. Rakefileをcopy
@@ -35,6 +42,34 @@ $ hiki2yard --init
35
42
  1. wikiディレクトリーを作成
36
43
  1. Githubでwikiを作成してからgit clone ***.wiki.gitのほうが確実.
37
44
 
45
+ ### directory構成
46
+ だいぶ省略しているし,また,.yardoptsなどの隠れファイルもあるが,
47
+ 関連するdirectoryは以下のとおり.
48
+ ```
49
+ .
50
+ ├── CODE_OF_CONDUCT.md
51
+ ├── Gemfile
52
+ ├── Gemfile.lock
53
+ ├── LICENSE.txt
54
+ ├── README.md
55
+ ├── Rakefile
56
+ ├── doc
57
+ │   ├── _index.html
58
+ ├── hiki2yard.wiki
59
+ │   ├── Home.md
60
+ │   ├── README_en.md
61
+ │   ├── README_ja.md
62
+ │   └── Why_hiki2yard.md
63
+ ├── hikis
64
+ │   ├── README_en.hiki
65
+ │   ├── README_ja.hiki
66
+ │   ├── README_ja.hiki~
67
+ │   └── Why_hiki2yard.hiki
68
+ └── latexes
69
+
70
+ 13 directories, 46 files
71
+ ```
72
+
38
73
  ## その後
39
74
 
40
75
  1. hikisに適当にファイルを作成,編集
data/hikis/README_ja.hiki CHANGED
@@ -20,6 +20,13 @@ gemのdirectoryで
20
20
 
21
21
  と打ち込めば,自動的に環境を整備.
22
22
 
23
+ <<<
24
+ Usage: hiki2yard [options]
25
+ -v show program Version.
26
+ -f, --force force copy new Rakefile.
27
+ -i, --init initialize target directory.
28
+ >>>
29
+
23
30
  !!! 動作内容
24
31
 
25
32
  # Rakefileをcopy
@@ -28,6 +35,34 @@ gemのdirectoryで
28
35
  # wikiディレクトリーを作成
29
36
  ## Githubでwikiを作成してからgit clone ***.wiki.gitのほうが確実.
30
37
 
38
+ !!!directory構成
39
+ だいぶ省略しているし,また,.yardoptsなどの隠れファイルもあるが,
40
+ 関連するdirectoryは以下のとおり.
41
+ <<<
42
+ .
43
+ ├── CODE_OF_CONDUCT.md
44
+ ├── Gemfile
45
+ ├── Gemfile.lock
46
+ ├── LICENSE.txt
47
+ ├── README.md
48
+ ├── Rakefile
49
+ ├── doc
50
+ │   ├── _index.html
51
+ ├── hiki2yard.wiki
52
+ │   ├── Home.md
53
+ │   ├── README_en.md
54
+ │   ├── README_ja.md
55
+ │   └── Why_hiki2yard.md
56
+ ├── hikis
57
+ │   ├── README_en.hiki
58
+ │   ├── README_ja.hiki
59
+ │   ├── README_ja.hiki~
60
+ │   └── Why_hiki2yard.hiki
61
+ └── latexes
62
+
63
+ 13 directories, 46 files
64
+ >>>
65
+
31
66
  !! その後
32
67
 
33
68
  # hikisに適当にファイルを作成,編集
@@ -1,7 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
  require 'yard'
3
3
  require "rake/testtask"
4
-
4
+ require 'fileutils'
5
5
  p base_path = File.expand_path('..', __FILE__)
6
6
  p basename = File.basename(base_path)
7
7
 
@@ -21,14 +21,18 @@ task :hiki2md do
21
21
  system command
22
22
  when 'gif','png','pdf'
23
23
  p command="cp hikis/#{file} #{basename}.wiki/#{file}"
24
- system command
24
+ # system command
25
+ FileUtils.cp("hikis/#{file}","#{basename}.wiki/#{file}",:verbose=>true)
26
+ FileUtils.cp("hikis/#{file}","doc/#{file}",:verbose=>true)
25
27
  end
26
28
  }
27
- system "cp #{basename}.wiki/README_ja.md README.md"
28
- system "cp #{basename}.wiki/README_ja.md #{basename}.wiki/Home.md"
29
- system "cp docs/*.gif #{basename}.wiki"
30
- system "cp docs/*.gif doc"
31
- system "cp docs/*.png #{basename}.wiki"
32
- system "cp docs/*.png doc"
29
+ readme_en="#{basename}.wiki/README_en.md"
30
+ readme_ja="#{basename}.wiki/README_ja.md"
31
+ if File.exists?(readme_en)
32
+ FileUtils.cp(readme_en,"./README.md",:verbose=>true)
33
+ elsif File.exists?(readme_ja)
34
+ FileUtils.cp(readme_ja,"./README.md",:verbose=>true)
35
+ FileUtils.cp(readme_ja,"#{basename}.wiki/Home.md",:verbose=>true)
36
+ end
33
37
  end
34
38
 
@@ -1,3 +1,3 @@
1
1
  module Hiki2yard
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/hiki2yard.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  require 'optparse'
3
3
  require "hiki2yard/version"
4
+ require 'hikiutils'
4
5
 
5
6
  module Hiki2yard
6
7
  class Command
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiki2yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shigeto R. Nishitani
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler