markwiki 0.0.1a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +54 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/exe/markwiki +50 -0
- data/lib/markwiki.rb +8 -0
- data/lib/markwiki/init.rb +91 -0
- data/lib/markwiki/version.rb +5 -0
- data/markwiki.gemspec +37 -0
- data/static/.markwiki.cfg +15 -0
- metadata +138 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2999bcbd6e948645cc7eaf852fe0c9fa13966c4b
|
4
|
+
data.tar.gz: 73bfede8e7a323771fb28769ffb1365d5f59ec3e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 71d4d72fc5f34c54ac8cc2140b5763d9a8847d5d7b416552aca9b49d7174b3049c6dea6ef34ef7bf5e296c708558baa3f0a24dbdf467332303a3ba1bc399a89d
|
7
|
+
data.tar.gz: 059085372570a2c448d5c19476a4fa7e28f94bb951215c108537a32ad1af272102f80f729c11774f2ed62806d94ba045acf3cb1bd46afa4f1562bb89bd0e1f33
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Bryce Davis
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Markwiki
|
2
|
+
|
3
|
+
Markwiki is a Ruby gem designed to ease the development and maintenance of locally designed static sites using Markdown. Too often, at least for me, static site generators aren't intuitive to use, aren't focused for simple static sites (not blogs), or most often don't support GitHub flavoured Markdown (GFM).
|
4
|
+
|
5
|
+
Markwiki is different in that it is a tool written by me, for me. However, it may be useful for you if you want a simple static site with GFM. In fact, the ideal workflow with Markwiki is:
|
6
|
+
|
7
|
+
Create a site with markwiki --init <NAME>
|
8
|
+
Write website stuff (Markdown, CSS (SASS?), and JS)
|
9
|
+
Compile and upload to your server with markwiki --launch
|
10
|
+
|
11
|
+
Simple, eh?
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
**NOTE:** Markwiki is still is pre-alpha. Don't have high expectations, or really any expectations at all.
|
16
|
+
|
17
|
+
Add this line to your application's Gemfile:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
gem 'markwiki'
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
$ bundle
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
$ gem install markwiki
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
```bash
|
34
|
+
# SIMPLE USAGE
|
35
|
+
Usage: markwiki [options]
|
36
|
+
-i <NAME>, --init <NAME> Create a new Markwiki site
|
37
|
+
-v, --version Show the Markwiki version number
|
38
|
+
-h, --help Display this help menu
|
39
|
+
```
|
40
|
+
|
41
|
+
## Development
|
42
|
+
|
43
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
44
|
+
|
45
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
46
|
+
|
47
|
+
## Contributing
|
48
|
+
|
49
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mahimahi42/markwiki. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
54
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "markwiki"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/markwiki
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# @author Bryce Davis <me@bryceadavis.com>
|
3
|
+
# For command line option parsing
|
4
|
+
require 'optparse'
|
5
|
+
# Our gem's code
|
6
|
+
require 'markwiki'
|
7
|
+
|
8
|
+
module Markwiki
|
9
|
+
# A wrapper class for Markwiki's command line interface
|
10
|
+
class CLI
|
11
|
+
def self.start_cli
|
12
|
+
# A hash of parameters passed on to the CLI
|
13
|
+
options = {
|
14
|
+
:name => nil
|
15
|
+
}
|
16
|
+
|
17
|
+
# Define our available options
|
18
|
+
opts_parser = OptionParser.new do |opts|
|
19
|
+
opts.banner = "Usage: markwiki [options]"
|
20
|
+
|
21
|
+
# Initialize a new Markwiki site
|
22
|
+
opts.on("-i <NAME>", "--init <NAME>", "Create a new Markwiki site") do |name|
|
23
|
+
options[:name] = name
|
24
|
+
end
|
25
|
+
|
26
|
+
# Display the current version number
|
27
|
+
opts.on("-v", "--version", "Show the Markwiki version number") do
|
28
|
+
puts "Markwiki v#{Markwiki::VERSION}"
|
29
|
+
exit
|
30
|
+
end
|
31
|
+
|
32
|
+
# Display the help menu
|
33
|
+
opts.on("-h", "--help", "Display this help menu") do
|
34
|
+
puts opts
|
35
|
+
exit
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Parse the command line options
|
40
|
+
begin
|
41
|
+
opts_parser.parse!
|
42
|
+
rescue OptionParser::MissingArgument => e
|
43
|
+
puts "ERROR: Missing site name"
|
44
|
+
exit
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
Markwiki::CLI.start_cli
|
data/lib/markwiki.rb
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# @author Bryce Davis <me@bryceadavis.com>
|
2
|
+
require 'json' # For JSON parsing
|
3
|
+
|
4
|
+
module Markwiki
|
5
|
+
# The default Markwiki skeleton, to be converted to JSON.
|
6
|
+
# Custom skeletons/configurations can be defined as Ruby Hashes
|
7
|
+
# or JSON
|
8
|
+
CONFIG = {
|
9
|
+
"files" => ["index.html", ".markwiki.cfg"],
|
10
|
+
"css" => {
|
11
|
+
"dir_name" => "css",
|
12
|
+
"files" => ["styles.css"]
|
13
|
+
},
|
14
|
+
"js" => {
|
15
|
+
"dir_name" => "js",
|
16
|
+
"files" => ["scripts.js"]
|
17
|
+
},
|
18
|
+
"img" => {
|
19
|
+
"dir_name" => "img",
|
20
|
+
"files" => []
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
# Wrapper class for Markwiki initialization
|
25
|
+
class Init
|
26
|
+
# @todo Finish site initialization
|
27
|
+
def self.init_site(site_name)
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
# Generate a JSON String representation of a Markwiki
|
32
|
+
# site.
|
33
|
+
#
|
34
|
+
# @return [String] the Markwiki configuration as a JSON String
|
35
|
+
def self.generate_json_config
|
36
|
+
Markwiki::CONFIG.to_json
|
37
|
+
end
|
38
|
+
|
39
|
+
# Generate a prettified JSON String representation of a
|
40
|
+
# Markwiki site.
|
41
|
+
#
|
42
|
+
# @return [String] the Markwiki configuration as a JSON String
|
43
|
+
def self.generate_pretty_json_config
|
44
|
+
JSON.pretty_generate Markwiki::CONFIG
|
45
|
+
end
|
46
|
+
|
47
|
+
# Get a Hash representation of a default Markwiki
|
48
|
+
# configuration
|
49
|
+
#
|
50
|
+
# @return [Hash] the default Markwiki configuration
|
51
|
+
def self.default_config
|
52
|
+
self.generate_config
|
53
|
+
end
|
54
|
+
|
55
|
+
# Get a Hash representation of an arbitrary Markwiki
|
56
|
+
# configuration
|
57
|
+
#
|
58
|
+
# @param files [Array<String>] an Array of top-level filenames
|
59
|
+
# @param css [String] the name of the CSS folder
|
60
|
+
# @param css_files [Array<String>] an Array of CSS files
|
61
|
+
# @param js [String] the name of the JavaScript folder
|
62
|
+
# @param js_files [Array<String>] an Array of JavaScript files
|
63
|
+
# @param img [String] the name of the images folder
|
64
|
+
# @param img_files [Array<String>] an Array of image files
|
65
|
+
# @return [Hash] a new Markwiki configuration Hash
|
66
|
+
def self.generate_config(
|
67
|
+
files: ["index.html"],
|
68
|
+
css: "css",
|
69
|
+
css_files: ["styles.css"],
|
70
|
+
js: "js",
|
71
|
+
js_files: ["scripts.js"],
|
72
|
+
img: "img",
|
73
|
+
img_files: [])
|
74
|
+
{
|
75
|
+
"files".to_s => files + [".markwiki.cfg"],
|
76
|
+
"css".to_s => {
|
77
|
+
"dir_name" => css,
|
78
|
+
"files" => css_files
|
79
|
+
},
|
80
|
+
"js".to_s => {
|
81
|
+
"dir_name" => js,
|
82
|
+
"files" => js_files
|
83
|
+
},
|
84
|
+
"img".to_s => {
|
85
|
+
"dir_name" => img,
|
86
|
+
"files" => img_files
|
87
|
+
}
|
88
|
+
}
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
data/markwiki.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'markwiki/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "markwiki"
|
8
|
+
spec.version = Markwiki::VERSION
|
9
|
+
spec.authors = ["Bryce Davis"]
|
10
|
+
spec.email = ["me@bryceadavis.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Ruby utility for managing wiki-like sites with Markdown.}
|
13
|
+
spec.description = <<-EOF
|
14
|
+
Markwiki is a Ruby gem designed to ease the development and maintenance of
|
15
|
+
locally designed static sites using Markdown. Too often, at least for me,
|
16
|
+
static site generators aren't intuitive to use, aren't focused for simple
|
17
|
+
static sites (not blogs), or most often don't support GitHub
|
18
|
+
flavoured Markdown (GFM).
|
19
|
+
|
20
|
+
Markwiki is different in that it is a tool written by me, for me. However,
|
21
|
+
it may be useful for you if you want a simple static site with GFM.
|
22
|
+
EOF
|
23
|
+
spec.homepage = "https://github.com/mahimahi42/markwiki"
|
24
|
+
spec.license = "MIT"
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
27
|
+
spec.bindir = "exe"
|
28
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
32
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
+
spec.add_development_dependency "rspec", '~> 0'
|
34
|
+
spec.add_development_dependency "yard", '~> 0'
|
35
|
+
|
36
|
+
spec.add_runtime_dependency "json", '~> 0'
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: markwiki
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1a
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bryce Davis
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.10'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: json
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: " Markwiki is a Ruby gem designed to ease the development and maintenance
|
84
|
+
of \n locally designed static sites using Markdown. Too often, at least for me,
|
85
|
+
\n static site generators aren't intuitive to use, aren't focused for simple
|
86
|
+
\n static sites (not blogs), or most often don't support GitHub \n flavoured
|
87
|
+
Markdown (GFM).\n \n Markwiki is different in that it is a tool written by
|
88
|
+
me, for me. However, \n it may be useful for you if you want a simple static
|
89
|
+
site with GFM.\n"
|
90
|
+
email:
|
91
|
+
- me@bryceadavis.com
|
92
|
+
executables:
|
93
|
+
- markwiki
|
94
|
+
extensions: []
|
95
|
+
extra_rdoc_files: []
|
96
|
+
files:
|
97
|
+
- ".gitignore"
|
98
|
+
- ".rspec"
|
99
|
+
- ".travis.yml"
|
100
|
+
- CODE_OF_CONDUCT.md
|
101
|
+
- Gemfile
|
102
|
+
- LICENSE.txt
|
103
|
+
- README.md
|
104
|
+
- Rakefile
|
105
|
+
- bin/console
|
106
|
+
- bin/setup
|
107
|
+
- exe/markwiki
|
108
|
+
- lib/markwiki.rb
|
109
|
+
- lib/markwiki/init.rb
|
110
|
+
- lib/markwiki/version.rb
|
111
|
+
- markwiki.gemspec
|
112
|
+
- static/.markwiki.cfg
|
113
|
+
homepage: https://github.com/mahimahi42/markwiki
|
114
|
+
licenses:
|
115
|
+
- MIT
|
116
|
+
metadata: {}
|
117
|
+
post_install_message:
|
118
|
+
rdoc_options: []
|
119
|
+
require_paths:
|
120
|
+
- lib
|
121
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: 1.3.1
|
131
|
+
requirements: []
|
132
|
+
rubyforge_project:
|
133
|
+
rubygems_version: 2.4.6
|
134
|
+
signing_key:
|
135
|
+
specification_version: 4
|
136
|
+
summary: Ruby utility for managing wiki-like sites with Markdown.
|
137
|
+
test_files: []
|
138
|
+
has_rdoc:
|