https://github.com/slub/entityfactspicturesmetadataharvester
a commandline command (Python3 program) that reads depiction information (images URLs) from given EntityFacts sheets (as line-delimited JSON records) and retrieves the (Wikimedia Commons file) metadata of these pictures (as line-delimited JSON records)
https://github.com/slub/entityfactspicturesmetadataharvester
cli command-line-tool dnb entityfacts entityfacts-sheets gnd line-delimited-json metadata python wikimedia-commons
Last synced: 8 months ago
JSON representation
a commandline command (Python3 program) that reads depiction information (images URLs) from given EntityFacts sheets (as line-delimited JSON records) and retrieves the (Wikimedia Commons file) metadata of these pictures (as line-delimited JSON records)
- Host: GitHub
- URL: https://github.com/slub/entityfactspicturesmetadataharvester
- Owner: slub
- License: apache-2.0
- Created: 2019-08-13T09:44:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-15T12:51:04.000Z (almost 7 years ago)
- Last Synced: 2025-01-25T07:09:04.071Z (over 1 year ago)
- Topics: cli, command-line-tool, dnb, entityfacts, entityfacts-sheets, gnd, line-delimited-json, metadata, python, wikimedia-commons
- Language: Python
- Size: 81.1 KB
- Stars: 2
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# entityfactspicturesmetadataharvester - EntityFacts pictures metadata harvester
entityfactspicturesmetadataharvester is a commandline command (Python3 program) that reads depiction information (images URLs) from given [EntityFacts](https://www.dnb.de/EN/Professionell/Metadatendienste/Datenbezug/Entity-Facts/entity-facts_node.html) sheets* (as line-delimited JSON records) and retrieves the ([Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) file) metadata of these pictures (as line-delimited JSON records).
*) EntityFacts are "fact sheets" on entities of the Integrated Authority File ([GND](https://www.dnb.de/EN/Professionell/Standardisierung/GND/gnd_node.html)), which is provided by German National Library ([DNB](https://www.dnb.de/EN/Home/home_node.html))
## Usage
It eats EntityFacts sheets as line-delimited JSON records from *stdin*.
It puts the (Wikimedia Commons file) metadata of each picture one by one as line-delimited JSON record to *stdout*.
```
entityfactspicturesmetadataharvester
optional arguments:
-h, --help show this help message and exit
```
* example:
```
example: entityfactspicturesmetadataharvester < [INPUT LINE-DELIMITED JSON FILE WITH ENTITYFACTS SHEETS] > [OUTPUT PICTURES METADATA LINE-DELIMITED JSON FILE]
```
### Note
The GND identifier from the EntityFacts sheet, where the picture (link) was found, is included into the metadata record (in the result). You can access/find it in the field 'gnd_id'.
## Run
* clone this git repo or just download the [entityfactspicturesmetadataharvester.py](entityfactspicturesmetadataharvester/entityfactspicturesmetadataharvester.py) file
* run ./entityfactspicturesmetadataharvester.py
* for a hackish way to use entityfactspicturesmetadataharvester system-wide, copy to /usr/local/bin
### Install system-wide via pip
```
sudo -H pip3 install --upgrade [ABSOLUTE PATH TO YOUR LOCAL GIT REPOSITORY OF ENTITYFACTSPICTURESMETADATAHARVESTER]
```
(which provides you ```entityfactspicturesmetadataharvester``` as a system-wide commandline command)
## See Also
* [entityfactssheetsharvester](https://github.com/slub/entityfactssheetsharvester) - a commandline command (Python3 program) that retrieves EntityFacts sheets from a given CSV with GND identifiers and returns them as line-delimited JSON records
* [entityfactspicturesharvester](https://github.com/slub/entityfactspicturesharvester) - a commandline command (Python3 program) that reads depiction information (images URLs) from given EntityFacts sheets (as line-delimited JSON records) and retrieves and stores the pictures and thumbnails contained in this information