dwc_agent 0.0.2 → 0.0.3
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/bin/dwcagent +14 -0
- data/lib/dwc_agent.rb +1 -1
- data/lib/dwc_agent/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ec6ea56b3101d5d09949e11c5d0fca3e9b1a69c
|
4
|
+
data.tar.gz: 16b3912d8005ab381bb276a80f15fac5e3906376
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7a55f960c965debd6167fa7a55e6f536e86c125687be772eb2997b4f67641f6f92313c601877dbfac335abb8516aff59a4d7992f72558e2eb31d9ba0910fca7
|
7
|
+
data.tar.gz: e94d3d9f4c21e475b76d4ef40eb95e75965d6b801c17fcda207995bee887addfccb9ae484027a5b6be8469f9f58ec4a272d4720a816e03f670576b44a03a5349
|
data/bin/dwcagent
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require 'dwc_agent'
|
5
|
+
require 'json'
|
6
|
+
|
7
|
+
names = []
|
8
|
+
DwcAgent.parse(ARGV[0]).each do |r|
|
9
|
+
name = DwcAgent.clean(r)
|
10
|
+
if !name[:family].nil? && name[:family].length >= 3
|
11
|
+
names << name
|
12
|
+
end
|
13
|
+
end
|
14
|
+
puts names.uniq.to_json
|
data/lib/dwc_agent.rb
CHANGED
@@ -14,7 +14,7 @@ class DwcAgent
|
|
14
14
|
\b[,;]?\s*(?i:unkn?own)\b|
|
15
15
|
\b[,;]?\s*(?i:n/a)\b|
|
16
16
|
\b[,;]?\s*(?i:ann?onymous)\b|
|
17
|
-
\b[,;]?\s*(?i:undetermined|indeterminable|dummy)\b|
|
17
|
+
\b[,;]?\s*(?i:undetermined|indeterminable|dummy|interim)\b|
|
18
18
|
\b[,;]?\s*(?i:importer)\b|
|
19
19
|
\b[,;]?\s*(?i:frère|frere|père|pere|soeur|sister|bro)\.?(\b|\z)|
|
20
20
|
(?i:no\s+(data|disponible))|
|
data/lib/dwc_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dwc_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David P. Shorthouse
|
@@ -83,10 +83,12 @@ dependencies:
|
|
83
83
|
description: Parses the typically messy content in Darwin Core terms that contain
|
84
84
|
people names
|
85
85
|
email: davidpshorthouse@gmail.coms
|
86
|
-
executables:
|
86
|
+
executables:
|
87
|
+
- dwcagent
|
87
88
|
extensions: []
|
88
89
|
extra_rdoc_files: []
|
89
90
|
files:
|
91
|
+
- bin/dwcagent
|
90
92
|
- lib/dwc_agent.rb
|
91
93
|
- lib/dwc_agent/version.rb
|
92
94
|
homepage: https://github.com/dshorthouse/dwc_agent
|