lessons_indexer 0.0.2.1 → 0.0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +28 -21
- data/lessons_indexer.gemspec +1 -1
- data/lib/lessons_indexer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 700b6b45e2dcbff289222f9c44f1eaea2fcb9997
|
4
|
+
data.tar.gz: 156538d022744cc4520352f90ca375e76266a288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6dec8a959a6ab12f203001e164ffd0cf3836bc090c64853078fa18c9417dab332d6c2fbb4629111128ad01fb794b4cfe0dfb1a62f1fb7df1e8b4b157ee9cd20
|
7
|
+
data.tar.gz: 02fae34b5d7415b1b8d4a476e873b49e5132cf4224af35966fb0e34304e919a938ff0b8ff08cf2c3eea904bee706388bda5ecba26b7cde854c7feedcf0c80e3e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -4,47 +4,53 @@
|
|
4
4
|
[![Dependency Status](https://gemnasium.com/bodrovis/LessonsIndexer.svg)](https://gemnasium.com/bodrovis/LessonsIndexer)
|
5
5
|
# Lessons Indexer for Learnable
|
6
6
|
|
7
|
-
Builds an index in Markdown format for the lesson files in the provided directory
|
7
|
+
Builds an index in Markdown format for the lesson files in the provided directory, adds heading images to the files,
|
8
|
+
pushes changes to GitHub. Can work with multiple branches.
|
8
9
|
|
9
|
-
|
10
|
-
* `-s` (`--skip_index`) - skip index generation. Defaults to `false`.
|
11
|
-
* `-o` (`--output`) - output file to save index to. Defaults to `README.md`. The file will be creating in the working
|
12
|
-
directory if it does not exist. If it does exist, all its contents **will be erased**. Has no effect if `-s` is set.
|
13
|
-
* `-g` (`--git`) - if present, pushes changes to the remote branch (with the name equal to the local branch).
|
14
|
-
* `-m` (`--message`) - which commit message should be specified. Default to "Added index". Has no effect if the `-g` flag
|
15
|
-
is not set.
|
16
|
-
* `-a` (`--all`) - if present, will work with **all** branches of the specified directory (except for `master`).
|
17
|
-
* `-i` (`--headings`) - if present, heading images will be added to the beginning of each lesson file. If the file already
|
18
|
-
has a heading in the beginning, it will be skipped.
|
19
|
-
* `-d` (`--headings_dir`) - relative path to the directory with heading images.
|
20
|
-
Defaults to `headers`, has no effect if the `-i` flag is not set.
|
10
|
+
## Installation and Usage
|
21
11
|
|
22
|
-
|
12
|
+
Requires [Ruby](https://www.ruby-lang.org) 2.0+ and [RubyGems](https://rubygems.org/). `Ruby\bin` should be added
|
13
|
+
to the PATH.
|
23
14
|
|
24
|
-
|
15
|
+
Install the gem:
|
25
16
|
|
26
17
|
```
|
27
|
-
|
18
|
+
gem install lessons_indexer
|
28
19
|
```
|
29
20
|
|
30
|
-
|
21
|
+
Run:
|
31
22
|
|
32
23
|
```
|
33
|
-
|
24
|
+
lessons_indexer <options>
|
34
25
|
```
|
35
26
|
|
36
|
-
|
27
|
+
or
|
37
28
|
|
38
29
|
```
|
39
|
-
|
30
|
+
bundle exec lessons_indexer <options>
|
40
31
|
```
|
41
32
|
|
42
|
-
If
|
33
|
+
If an option contains spaces, it has to be surrounded with quotes:
|
43
34
|
|
44
35
|
```
|
45
36
|
bin/lessons_indexer -p "C:\User\my test dir\"
|
46
37
|
```
|
47
38
|
|
39
|
+
## Options
|
40
|
+
|
41
|
+
* `-p` (`--path`) - path to the working directory. Defaults to `.`.
|
42
|
+
* `-s` (`--skip_index`) - skip index generation. Defaults to `false`.
|
43
|
+
* `-o` (`--output`) - output file to save index to. Defaults to `README.md`. The file will be creating in the working
|
44
|
+
directory if it does not exist. If it does exist, all its contents **will be erased**. Has no effect if `-s` is set.
|
45
|
+
* `-g` (`--git`) - if present, pushes changes to the remote branch (with the name equal to the local branch).
|
46
|
+
* `-m` (`--message`) - which commit message should be specified. Default to "Added index". Has no effect if the `-g` flag
|
47
|
+
is not set.
|
48
|
+
* `-a` (`--all`) - if present, will work with **all** branches of the specified directory (except for `master`).
|
49
|
+
* `-i` (`--headings`) - if present, heading images will be added to the beginning of each lesson file. If the file already
|
50
|
+
has a heading in the beginning, it will be skipped.
|
51
|
+
* `-d` (`--headings_dir`) - relative path to the directory with heading images.
|
52
|
+
Defaults to `headers`, has no effect if the `-i` flag is not set.
|
53
|
+
|
48
54
|
## Some Assumptions
|
49
55
|
|
50
56
|
Here are some guidelines to follow when using the program:
|
@@ -64,6 +70,7 @@ this step will be just skipped and the corresponding warning message will be dis
|
|
64
70
|
## Testing
|
65
71
|
|
66
72
|
```
|
73
|
+
bundle install
|
67
74
|
rspec .
|
68
75
|
```
|
69
76
|
|
data/lessons_indexer.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.license = "MIT"
|
12
12
|
|
13
13
|
spec.files = `git ls-files -z`.split("\x0")
|
14
|
-
spec.executables = ["lessons_indexer"]
|
14
|
+
spec.executables = ["lessons_indexer"]
|
15
15
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
16
|
spec.require_paths = ["lib"]
|
17
17
|
|