diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-08-28 18:04:30 +0200 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-03 13:31:49 -0700 |
commit | c6c195f298e92b37a8a96a09037b926abbfc54af (patch) | |
tree | 52ebff75dc78477b96ac1383ff2c535eab8c557c /python/fatcat_tools | |
parent | cee8d9d27533ff01a7be175c44e227bfb7521f7e (diff) | |
download | fatcat-c6c195f298e92b37a8a96a09037b926abbfc54af.tar.gz fatcat-c6c195f298e92b37a8a96a09037b926abbfc54af.zip |
use EZB and szczepanski as OA signals (ES)
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r-- | python/fatcat_tools/transforms/elasticsearch.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py index 113de5bf..8501f515 100644 --- a/python/fatcat_tools/transforms/elasticsearch.py +++ b/python/fatcat_tools/transforms/elasticsearch.py @@ -132,6 +132,12 @@ def release_to_elasticsearch(entity, force_bool=True): if c_extra.get('road'): if c_extra['road'].get('as_of'): is_oa = True + if c_extra.get('ezb'): + if c_extra['ezb'].get('color') == 'green': + is_oa = True + if c_extra.get('szczepanski'): + if c_extra['szczepanski'].get('as_of'): + is_oa = True else: t['publisher'] = release.publisher @@ -278,6 +284,12 @@ def container_to_elasticsearch(entity, force_bool=True): if extra.get('road'): if extra['road'].get('as_of'): in_road = True + if c_extra.get('ezb'): + if c_extra['ezb'].get('color') == 'green': + is_oa = True + if c_extra.get('szczepanski'): + if c_extra['szczepanski'].get('as_of'): + is_oa = True if extra.get('default_license'): if extra['default_license'].startswith('CC-'): is_oa = True |