cheatset 1.3.8 → 1.4.2
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.
- checksums.yaml +5 -5
- data/README.md +13 -4
- data/bin/cheatset +0 -0
- data/lib/cheatset/creator.rb +5 -3
- data/lib/cheatset/dsl/entry.rb +1 -1
- data/lib/cheatset/templates/style.css +2 -2
- data/lib/cheatset/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 81813b0cb0456d0585f35a8c2d122cc990a6549e3ceaa1ce017ef308d61d4899
|
4
|
+
data.tar.gz: 65ca0783c3cb8187e3d04000ef52a61827dd8468000ec77d0b758d769dc782ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce2f280c10e5f1ab13db3230dddc0b23d1867f3bd0f729b5b88ad2ecaecc23dc312f9c97d61e4a3c4171d12c78905fb1def8dfc17e50a7ea2adf3751074c079b
|
7
|
+
data.tar.gz: 23aa5393bfa5d5823c4c1679af21da7fe2f6950f65f6fa5d870eb520c1ce1ca3003b237c41c94a3eb88ec50e729d614fdeeba38c2db3c7838064908865cd43b8
|
data/README.md
CHANGED
@@ -8,15 +8,15 @@ language (Ruby DSL).
|
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
|
-
$ sudo gem install cheatset
|
11
|
+
$ sudo gem install cheatset
|
12
12
|
|
13
13
|
Note: this requires the Xcode Command Line Tools to be installed. Install them using this:
|
14
14
|
|
15
15
|
$ xcode-select --install
|
16
|
-
|
16
|
+
|
17
17
|
## Contributions
|
18
18
|
|
19
|
-
If you make
|
19
|
+
If you make a useful cheat sheet, please [contribute it](https://github.com/Kapeli/cheatsheets#readme) to Dash.
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
@@ -28,7 +28,7 @@ cheatsheet do
|
|
28
28
|
docset_file_name 'Sample' # Used for the filename of the docset
|
29
29
|
keyword 'sample' # Used as the initial search keyword (listed in Preferences > Docsets)
|
30
30
|
# resources 'resources_dir' # An optional resources folder which can contain images or anything else
|
31
|
-
|
31
|
+
|
32
32
|
introduction 'My *awesome* cheat sheet' # Optional, can contain Markdown or HTML
|
33
33
|
|
34
34
|
# A cheat sheet must consist of categories
|
@@ -78,6 +78,15 @@ Syntax highlighting is supported (see Ruby code in the sample). For a list of su
|
|
78
78
|
For more complete examples look at some of
|
79
79
|
[the actual cheat sheets](https://github.com/Kapeli/cheatsheets/tree/master/cheatsheets).
|
80
80
|
|
81
|
+
If you do not use Ruby or lack a working Ruby toolchain and still want to generate cheatsheets.
|
82
|
+
|
83
|
+
You can use the `cheatset` Docker image.
|
84
|
+
|
85
|
+
$ docker pull jonasbn/cheatset:lastest
|
86
|
+
$ docker run --rm -it --volume $PWD:/tmp --name cheatset jonasbn/cheatset:latest generate samble.rb
|
87
|
+
|
88
|
+
For more details on the Docker image please visit the repositories on [DockerHub](https://hub.docker.com/repository/docker/jonasbn/cheatset) or [GitHub](https://github.com/jonasbn/docker-cheatset)
|
89
|
+
|
81
90
|
## Advanced Usage
|
82
91
|
|
83
92
|
Apart from the attributes listed in the sample cheat sheet above, you can also use these:
|
data/bin/cheatset
CHANGED
File without changes
|
data/lib/cheatset/creator.rb
CHANGED
@@ -99,20 +99,22 @@ class Cheatset::Creator
|
|
99
99
|
href = (entry.name || entry.index_name) ? "index.html\#//dash_ref_#{category_strip}/Entry/#{URI.escape((entry.index_name) ? entry.index_name.strip : entry.tags_stripped_name.strip).gsub(/\//, '%252F')}/0" : (first_command) ? "index.html\#//dash_ref_#{category_strip}/Command/#{URI.escape(first_command).gsub(/\//, '%252F')}/0" : ""
|
100
100
|
if entry.command
|
101
101
|
entry.command.each do |command|
|
102
|
-
if(!command.strip.empty?)
|
102
|
+
if(!command.strip.empty? && !entry.not_in_main_index)
|
103
103
|
db.execute(sql, command.strip, 'Command', href)
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
107
107
|
if entry.td_command
|
108
108
|
entry.td_command.each do |command|
|
109
|
-
if(!command.strip.empty?)
|
109
|
+
if(!command.strip.empty? && !entry.not_in_main_index)
|
110
110
|
db.execute(sql, command.strip, 'Command', href)
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
114
114
|
if entry.name || entry.index_name
|
115
|
-
|
115
|
+
if(!entry.not_in_main_index)
|
116
|
+
db.execute(sql, (entry.index_name) ? entry.index_name.strip : entry.tags_stripped_name.strip, 'Entry', href)
|
117
|
+
end
|
116
118
|
end
|
117
119
|
if entry.extra_index_name
|
118
120
|
entry.extra_index_name.each do |extra_index_name|
|
data/lib/cheatset/dsl/entry.rb
CHANGED
@@ -44,14 +44,14 @@ h1, h2, h3, p, blockquote {
|
|
44
44
|
src: local("Open Sans Extrabold Italic"), local("OpenSans-ExtraboldItalic"), url(cheatset_resources/Open_Sans_Extrabold_Italic.woff) format("woff"); }
|
45
45
|
body {
|
46
46
|
font-family: 'Open Sans', sans-serif;
|
47
|
-
font-size:
|
47
|
+
font-size: 16px;
|
48
48
|
color: #000;
|
49
49
|
background-color: #fff;
|
50
50
|
margin: 0; }
|
51
51
|
|
52
52
|
code, pre {
|
53
53
|
font-family: Menlo, Consolas, "Liberation Mono", Courier, monospace;
|
54
|
-
font-size:
|
54
|
+
font-size: 15px; }
|
55
55
|
|
56
56
|
code {
|
57
57
|
margin: 0;
|
data/lib/cheatset/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cheatset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Popescu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -204,8 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: '0'
|
206
206
|
requirements: []
|
207
|
-
|
208
|
-
rubygems_version: 2.2.5
|
207
|
+
rubygems_version: 3.0.1
|
209
208
|
signing_key:
|
210
209
|
specification_version: 4
|
211
210
|
summary: Generate cheat sheets for Dash
|