githubreadme-to-html 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ = GitHub Readme To Html
2
+
3
+ Convert your GitHub readme compatible markup into html files
4
+
5
+ == Installation
6
+ You can use latest gem:
7
+ gem install githubreadme-to-html
8
+
9
+ == Usage
10
+ Use this tool so you can see a preview of your README on how it will look like on GitHub.
11
+
12
+ gth <filename.ext>
13
+
14
+ Example
15
+ gth README.rdoc
16
+
17
+ will generate and open a README.html into your default browser.
18
+
19
+ == Additional note
20
+
21
+ This tool uses GitHub Markup - https://github.com/github/markup
22
+ so should support all markup files listed on their GitHub page.
23
+
24
+ == Copyright
25
+
26
+ Copyright (c) 2012 David Ang. See LICENSE.txt for
27
+ further details.
28
+
data/Rakefile ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'GithubreadmeToHtml'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+
24
+
25
+
26
+ Bundler::GemHelper.install_tasks
27
+
data/bin/gth ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'github/markup'
5
+
6
+ header = %Q(<html>
7
+ <head>
8
+ <link href="https://a248.e.akamai.net/assets.github.com/assets/github-590d2087d12401449d3a0ca7c6b70910d780f566.css" media="screen" rel="stylesheet" type="text/css" />
9
+ <link href="https://a248.e.akamai.net/assets.github.com/assets/github2-f8d55a79f49a0a7191cc31d9e092b0f52840c471.css" media="screen" rel="stylesheet" type="text/css" />
10
+ </head>
11
+
12
+ <body>
13
+ <div class="container context-loader-container">
14
+ <div class="frame frame-center">
15
+ <div id="readme" class="clearfix announce instapaper_body md">
16
+ <span class="name"><span class="mini-icon mini-icon-readme"></span>README.md</span>
17
+ <article class="markdown-body entry-content" itemprop="mainContentOfPage">
18
+ )
19
+
20
+ footer = %Q(
21
+ </article>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </body>
26
+ </html>)
27
+
28
+ if ARGV.length == 0
29
+ puts "Please pass in the readme filename."
30
+ else
31
+ file = File.open(ARGV[0], 'rb')
32
+ body = file.read
33
+
34
+ html = GitHub::Markup.render('README.rdoc', body)
35
+
36
+ File.open('README.htm', 'w') {|f| f.write(header + html + footer) }
37
+
38
+ exec('open README.htm')
39
+ end
@@ -0,0 +1,3 @@
1
+ module GithubreadmeToHtml
2
+ VERSION = "1.0.1"
3
+ end
@@ -0,0 +1,2 @@
1
+ module GithubreadmeToHtml
2
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :githubreadme-to-html do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: githubreadme-to-html
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - David Ang
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-22 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: github-markup
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Use this tool so you can see a preview of your README on how it will
31
+ look like on GitHub.
32
+ email:
33
+ - davidang@pldtdsl.net
34
+ executables:
35
+ - gth
36
+ extensions: []
37
+ extra_rdoc_files: []
38
+ files:
39
+ - lib/githubreadme-to-html/version.rb
40
+ - lib/githubreadme-to-html.rb
41
+ - lib/tasks/githubreadme-to-html_tasks.rake
42
+ - MIT-LICENSE
43
+ - Rakefile
44
+ - README.rdoc
45
+ - bin/gth
46
+ homepage: https://github.com/mickeyren/githubreadme-to-html
47
+ licenses: []
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ requirements: []
65
+ rubyforge_project:
66
+ rubygems_version: 1.8.24
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: Convert your GitHub readme compatible markup into html files.
70
+ test_files: []