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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adcd1d0546c38639198ee18f3191db4477e04498
4
- data.tar.gz: 74df375390ea837dbf40f356df6436731fd340f9
3
+ metadata.gz: 9ec6ea56b3101d5d09949e11c5d0fca3e9b1a69c
4
+ data.tar.gz: 16b3912d8005ab381bb276a80f15fac5e3906376
5
5
  SHA512:
6
- metadata.gz: a8b1e9688e7e2b5fbf53868ad34b982041aef69644999a1d89f28fce5c0cc33cfca5a6601ec65fc5e11ba067faf22ef2502e0189350819dcac9b099e68b864b0
7
- data.tar.gz: 1fd327e3335937c46349afc69688d9151b2a99b4877382ac7c5bd31ccf2d4e823f624e699f15b433f3ad27eb457c95c429a1c951dca4b7f8482160f0584241b9
6
+ metadata.gz: a7a55f960c965debd6167fa7a55e6f536e86c125687be772eb2997b4f67641f6f92313c601877dbfac335abb8516aff59a4d7992f72558e2eb31d9ba0910fca7
7
+ data.tar.gz: e94d3d9f4c21e475b76d4ef40eb95e75965d6b801c17fcda207995bee887addfccb9ae484027a5b6be8469f9f58ec4a272d4720a816e03f670576b44a03a5349
@@ -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
@@ -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))|
@@ -1,5 +1,5 @@
1
1
  class DwcAgent
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
 
4
4
  def self.version
5
5
  VERSION
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.2
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