distorted 0.5.3 → 0.6.0
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 +4 -4
- data/LICENSE +661 -0
- data/README.md +4 -139
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Less_Perfect_DOS_VGA.png +0 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/More_Perfect_DOS_VGA.png +0 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Perfect_DOS_VGA.png +0 -0
- data/font/1252/LICENSE/MoreLessPerfectDOSVGA437/less_more_perfect_dos_vga_437.html +52 -0
- data/font/1252/LICENSE/PerfectDOSVGA437/font-comment.php@file=perfect_dos_vga_437.html +5 -0
- data/font/1252/LessPerfectDOSVGA.ttf +0 -0
- data/font/1252/MorePerfectDOSVGA.ttf +0 -0
- data/font/1252/Perfect DOS VGA 437 Win.ttf +0 -0
- data/font/437/Perfect DOS VGA 437.ttf +0 -0
- data/font/437/dos437.txt +72 -0
- data/font/65001/Anonymous Pro B.ttf +0 -0
- data/font/65001/Anonymous Pro BI.ttf +0 -0
- data/font/65001/Anonymous Pro I.ttf +0 -0
- data/font/65001/Anonymous Pro.ttf +0 -0
- data/font/65001/LICENSE/AnonymousPro/FONTLOG.txt +45 -0
- data/font/65001/LICENSE/AnonymousPro/OFL-FAQ.txt +235 -0
- data/font/65001/LICENSE/AnonymousPro/OFL.txt +94 -0
- data/font/65001/LICENSE/AnonymousPro/README.txt +55 -0
- data/font/850/ProFont-Bold-01/LICENSE +22 -0
- data/font/850/ProFont-Bold-01/readme.txt +28 -0
- data/font/850/ProFontWindows-Bold.ttf +0 -0
- data/font/850/ProFontWindows.ttf +0 -0
- data/font/850/Profont/LICENSE +22 -0
- data/font/850/Profont/readme.txt +31 -0
- data/font/932/LICENSE/README-ttf.txt +213 -0
- data/font/932/mona.ttf +0 -0
- data/lib/distorted/checking_you_out.rb +116 -0
- data/lib/distorted/error_code.rb +51 -0
- data/lib/distorted/injection_of_love.rb +247 -0
- data/lib/distorted/modular_technology/pango.rb +90 -0
- data/lib/distorted/modular_technology/triple_counter.rb +45 -0
- data/lib/distorted/modular_technology/ttfunk.rb +48 -0
- data/lib/distorted/modular_technology/vips.rb +17 -0
- data/lib/distorted/modular_technology/vips_load.rb +77 -0
- data/lib/distorted/modular_technology/vips_save.rb +172 -0
- data/lib/distorted/molecule/C18H27NO3.rb +10 -0
- data/lib/distorted/molecule/font.rb +198 -0
- data/lib/distorted/molecule/image.rb +36 -0
- data/lib/distorted/molecule/pdf.rb +119 -0
- data/lib/distorted/molecule/svg.rb +60 -0
- data/lib/distorted/molecule/text.rb +225 -0
- data/lib/distorted/molecule/video.rb +195 -0
- data/lib/distorted/monkey_business/hash.rb +33 -0
- data/lib/distorted/monkey_business/mnemoniq.rb +8 -0
- data/lib/distorted/monkey_business/set.rb +15 -0
- data/lib/distorted/monkey_business/string.rb +6 -0
- data/lib/distorted/types/README +4 -0
- data/lib/distorted/types/application.yaml +8 -0
- data/lib/distorted/types/font.yaml +29 -0
- data/lib/distorted/version.rb +22 -0
- data/test/distorted_test.rb +11 -0
- data/test/test_helper.rb +4 -0
- metadata +102 -5
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
class Hash
|
4
|
+
|
5
|
+
# Complement Ruby::YAML behavior, where usage of Set syntax
|
6
|
+
# returns a Hash with all-nil values.
|
7
|
+
# Calling :to_set on a Hash with all-nil values should return
|
8
|
+
# a Set of the Hash's keys.
|
9
|
+
this_old_set = instance_method(:to_set)
|
10
|
+
define_method(:to_set) do
|
11
|
+
if self.values.all?{ |v| v.nil? }
|
12
|
+
self.keys.to_set
|
13
|
+
else
|
14
|
+
this_old_set.bind(self).()
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# https://github.com/dam13n/ruby-bury/blob/master/hash.rb
|
19
|
+
# This is not packaged as a Gem or I'd be using it instead of including my own.
|
20
|
+
def bury(*args)
|
21
|
+
if args.count < 2
|
22
|
+
raise ArgumentError.new('2 or more arguments required')
|
23
|
+
elsif args.count == 2
|
24
|
+
self[args[0]] = args[1]
|
25
|
+
else
|
26
|
+
arg = args.shift
|
27
|
+
self[arg] = {} unless self[arg]
|
28
|
+
self[arg].bury(*args) unless args.empty?
|
29
|
+
end
|
30
|
+
self
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'mime/types'
|
2
|
+
|
3
|
+
# MIME::Types#preferred_extension returns @extensions.first unless
|
4
|
+
# otherwise set. I don't like some of the defaults, so this file
|
5
|
+
# changes them.
|
6
|
+
# Normally I don't like to monkey patch just on import without calling
|
7
|
+
# some method, but this is one time I explicitly want to do that.
|
8
|
+
MIME::Types['image/jpeg'].last.preferred_extension = 'jpg'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'set'
|
2
|
+
|
3
|
+
# Override Set.to_hash to complement Ruby::YAML's Set implementation,
|
4
|
+
# where the YAML Set syntax returns a Hash with all-nil values,
|
5
|
+
# at least without some decorator sugar in the YAML itself:
|
6
|
+
# https://rhnh.net/2011/01/31/yaml-tutorial/
|
7
|
+
#
|
8
|
+
# Since Set is implemented using a Hash internally I think it makes
|
9
|
+
# more sense for Set.to_hash to return a Hash with all-nil values
|
10
|
+
# with keys matching the contents of the original Set.
|
11
|
+
class Set
|
12
|
+
def to_hash
|
13
|
+
Hash[self.map { |s| [s, nil] }]
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
# RFC8081 defines the top-level `font` media-type and includes
|
3
|
+
# definitions for font/ttf, font/otf, and font/collection,
|
4
|
+
# but neglects to include the OpenType Collection (.otc)
|
5
|
+
# file extension, meaning the IANA DB's font/collection
|
6
|
+
# only covers TTC and not OTC:
|
7
|
+
#
|
8
|
+
# https://tools.ietf.org/html/rfc8081#section-4.4.4
|
9
|
+
# "Type name: font
|
10
|
+
# Subtype name: collection
|
11
|
+
# Required parameters: None
|
12
|
+
# Optional parameters
|
13
|
+
# Name: outlines
|
14
|
+
# Values: a comma-separated subset of TTF, CFF, and SVG
|
15
|
+
#
|
16
|
+
# https://docs.microsoft.com/en-us/typography/opentype/spec/otff
|
17
|
+
# "OpenType fonts may have the extension .OTF, .TTF, .OTC or .TTC.
|
18
|
+
# The extensions .OTC and .TTC should only be used for font collection files."
|
19
|
+
- !ruby/object:MIME::Type
|
20
|
+
content-type: font/collection
|
21
|
+
encoding: base64
|
22
|
+
extensions:
|
23
|
+
- otc
|
24
|
+
xrefs:
|
25
|
+
template:
|
26
|
+
- font/collection
|
27
|
+
xref_urls:
|
28
|
+
- "https://docs.microsoft.com/en-us/typography/opentype/spec/otff#filenames"
|
29
|
+
registered: false
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# `.........-` `:/:::://.`
|
3
|
+
# `+/``+ssss:``-/:` `:o+y. `::::-----``
|
4
|
+
# -+- :hmNNmdhs- `o++` `-:--/ -/... ./shhyoy. +mmmmds+:--...`
|
5
|
+
# .//``odmNmmd+++` :+/h:-------------:+. ./...-..........---/--:.------// -.--------//o//o+/+- :hhdmmmmmh/`-/-`
|
6
|
+
# `:+- :ymNmmyy:...-:` /: ./////////////- ::/:/- `++++++++` -y /:.`.////+- /////- `/+++++++. :- .::+sydmNm+ `/+.
|
7
|
+
# -+:` /syyyo:--:+oso` /: ---:::::::syys. -yoy+s` :mmmmmmmd- .h` ``:osshhyyy` /oshhs` -:::::::. :: `-..-/dmo` `/yo:
|
8
|
+
# `/o:--------:+syyy++``+s+++++++++/``:h+os``oshdos``odhhhddyy-`.h.`.ssyhmmdmoh/``o+mmho``:++++++++++y+``----::``-oyss.
|
9
|
+
# +sssssssyyyyyhdmmsyo-+/----------.`.yooy-`-hodss/``---------.`.h-`.sohdhsymhsy.`:+yNmy/`.-----------:++ooooooo+sss+`
|
10
|
+
# `+dmmmdddddmmNNddhsyosooooooooooooooysoysssyymssssssssssssssssshyssyoh:` .mhsyssssodddyooooooooooooooysoyyyyyyyyy/
|
11
|
+
# /mNmdddhmdmmdy+-+mdhhhhhhhhhhhhhhhmhhyhhhmdmmdhhhhhhhhhhhhhhhdhhhsm+ ydddhhhhd-hdmdddddddddddddddyhdhdmmNms.
|
12
|
+
# .---.......` -yhNmmhddhhhdhmhmhddmNNmyyy+dmNdydhyyyhddhmmmmNmhh. -hyhNNNh: .mNmdmdddhhhdddmmyssssssso:
|
13
|
+
# `/oooooooooooooo:`-+o+/. `+oo+o++++ooo+oooooo- `-+oo/` :oooooooooooooo/
|
14
|
+
#
|
15
|
+
|
16
|
+
require_relative 'modular_technology/triple_counter'
|
17
|
+
|
18
|
+
module Cooltrainer
|
19
|
+
module DistorteD
|
20
|
+
VERSION = TripleCounter.new(0, 6, 0)
|
21
|
+
end
|
22
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distorted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- okeeblow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ruby-filemagic
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.7'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.7'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: ruby-vips
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +136,34 @@ dependencies:
|
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: 0.11.9
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: ttfunk
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.6'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.6'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: charlock_holmes
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0.7'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0.7'
|
125
167
|
description: Ruby implementation of core file-format operations used by DistorteD-Jekyll.
|
126
168
|
email:
|
127
169
|
- root@cooltrainer.org
|
@@ -129,7 +171,60 @@ executables: []
|
|
129
171
|
extensions: []
|
130
172
|
extra_rdoc_files: []
|
131
173
|
files:
|
174
|
+
- LICENSE
|
132
175
|
- README.md
|
176
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Less_Perfect_DOS_VGA.png
|
177
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/More_Perfect_DOS_VGA.png
|
178
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/img/Perfect_DOS_VGA.png
|
179
|
+
- font/1252/LICENSE/MoreLessPerfectDOSVGA437/less_more_perfect_dos_vga_437.html
|
180
|
+
- font/1252/LICENSE/PerfectDOSVGA437/font-comment.php@file=perfect_dos_vga_437.html
|
181
|
+
- font/1252/LessPerfectDOSVGA.ttf
|
182
|
+
- font/1252/MorePerfectDOSVGA.ttf
|
183
|
+
- font/1252/Perfect DOS VGA 437 Win.ttf
|
184
|
+
- font/437/Perfect DOS VGA 437.ttf
|
185
|
+
- font/437/dos437.txt
|
186
|
+
- font/65001/Anonymous Pro B.ttf
|
187
|
+
- font/65001/Anonymous Pro BI.ttf
|
188
|
+
- font/65001/Anonymous Pro I.ttf
|
189
|
+
- font/65001/Anonymous Pro.ttf
|
190
|
+
- font/65001/LICENSE/AnonymousPro/FONTLOG.txt
|
191
|
+
- font/65001/LICENSE/AnonymousPro/OFL-FAQ.txt
|
192
|
+
- font/65001/LICENSE/AnonymousPro/OFL.txt
|
193
|
+
- font/65001/LICENSE/AnonymousPro/README.txt
|
194
|
+
- font/850/ProFont-Bold-01/LICENSE
|
195
|
+
- font/850/ProFont-Bold-01/readme.txt
|
196
|
+
- font/850/ProFontWindows-Bold.ttf
|
197
|
+
- font/850/ProFontWindows.ttf
|
198
|
+
- font/850/Profont/LICENSE
|
199
|
+
- font/850/Profont/readme.txt
|
200
|
+
- font/932/LICENSE/README-ttf.txt
|
201
|
+
- font/932/mona.ttf
|
202
|
+
- lib/distorted/checking_you_out.rb
|
203
|
+
- lib/distorted/error_code.rb
|
204
|
+
- lib/distorted/injection_of_love.rb
|
205
|
+
- lib/distorted/modular_technology/pango.rb
|
206
|
+
- lib/distorted/modular_technology/triple_counter.rb
|
207
|
+
- lib/distorted/modular_technology/ttfunk.rb
|
208
|
+
- lib/distorted/modular_technology/vips.rb
|
209
|
+
- lib/distorted/modular_technology/vips_load.rb
|
210
|
+
- lib/distorted/modular_technology/vips_save.rb
|
211
|
+
- lib/distorted/molecule/C18H27NO3.rb
|
212
|
+
- lib/distorted/molecule/font.rb
|
213
|
+
- lib/distorted/molecule/image.rb
|
214
|
+
- lib/distorted/molecule/pdf.rb
|
215
|
+
- lib/distorted/molecule/svg.rb
|
216
|
+
- lib/distorted/molecule/text.rb
|
217
|
+
- lib/distorted/molecule/video.rb
|
218
|
+
- lib/distorted/monkey_business/hash.rb
|
219
|
+
- lib/distorted/monkey_business/mnemoniq.rb
|
220
|
+
- lib/distorted/monkey_business/set.rb
|
221
|
+
- lib/distorted/monkey_business/string.rb
|
222
|
+
- lib/distorted/types/README
|
223
|
+
- lib/distorted/types/application.yaml
|
224
|
+
- lib/distorted/types/font.yaml
|
225
|
+
- lib/distorted/version.rb
|
226
|
+
- test/distorted_test.rb
|
227
|
+
- test/test_helper.rb
|
133
228
|
homepage: https://cooltrainer.org
|
134
229
|
licenses:
|
135
230
|
- AGPL-3.0
|
@@ -152,5 +247,7 @@ requirements: []
|
|
152
247
|
rubygems_version: 3.1.4
|
153
248
|
signing_key:
|
154
249
|
specification_version: 4
|
155
|
-
summary:
|
156
|
-
test_files:
|
250
|
+
summary: Multimedia toolkit core.
|
251
|
+
test_files:
|
252
|
+
- test/test_helper.rb
|
253
|
+
- test/distorted_test.rb
|