mymedia 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/mymedia.rb +25 -2
- data.tar.gz.sig +0 -0
- metadata +22 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a714cd992ef14c2e9ee41a3e29ce25bf90b2d8378636903108993dcb2dd7d21
|
4
|
+
data.tar.gz: f9f81cd5d692cb58cd0b7d82cb9d535f19cbfff5b8c33077d8bef48f50a570f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6acc8fcf2c6e792f361921e9769879d8ff871f429f36b76276c3a413d60f258b219e66ffa96754cb6d86d4e41268b58632596f274630fd985379887f0d6d72b
|
7
|
+
data.tar.gz: 7a6d6fb05c2600876bb44bf3bde49104f7bb48b573f19e69ea4d2a30d2e5e7245f9995d65a41af613290f688b1855fbb42cd7307c5dada51f0df96b49ad3f959
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/mymedia.rb
CHANGED
@@ -11,6 +11,7 @@ require 'dataisland'
|
|
11
11
|
require 'increment'
|
12
12
|
require 'simple-config'
|
13
13
|
require 'rxfileio'
|
14
|
+
require 'wordsdotdat'
|
14
15
|
|
15
16
|
|
16
17
|
module MyMedia
|
@@ -95,14 +96,36 @@ module MyMedia
|
|
95
96
|
module IndexReader
|
96
97
|
include RXFRead
|
97
98
|
|
98
|
-
def browse()
|
99
|
+
def browse(startswith=nil)
|
99
100
|
|
100
101
|
json_filepath = "%s/%s/dynarex.json" % [@home, @public_type]
|
101
102
|
|
102
103
|
if FileX.exists? json_filepath then
|
103
104
|
|
104
105
|
dx = DxLite.new(json_filepath)
|
105
|
-
|
106
|
+
|
107
|
+
if startswith then
|
108
|
+
|
109
|
+
@stopwords = WordsDotDat.stopwords
|
110
|
+
q = startswith
|
111
|
+
|
112
|
+
r = dx.all.select do |x|
|
113
|
+
|
114
|
+
found = x.title.scan(/\b\w+/).select do |raw_word|
|
115
|
+
|
116
|
+
word = raw_word.downcase
|
117
|
+
word[0..(q.length-1)] == q and not @stopwords.include? word
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
found.any?
|
122
|
+
end
|
123
|
+
|
124
|
+
else
|
125
|
+
|
126
|
+
return dx.all
|
127
|
+
|
128
|
+
end
|
106
129
|
|
107
130
|
end
|
108
131
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mymedia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
bL55NDdi8BFHkNVohRBak7aqxsw41LJKy3UTP+4TzU5vyluDJMiscK6JJFaM4JiS
|
36
36
|
xtlAM0O5ZFe9QflatP+P8JnB
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-
|
38
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dir-to-xml
|
@@ -117,6 +117,26 @@ dependencies:
|
|
117
117
|
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: 0.7.2
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: wordsdotdat
|
122
|
+
requirement: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - "~>"
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0.2'
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: 0.2.0
|
130
|
+
type: :runtime
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - "~>"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0.2'
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 0.2.0
|
120
140
|
description:
|
121
141
|
email: digital.robertson@gmail.com
|
122
142
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|