https://github.com/steppsr/exif2metadata-proofofconcept
exif2metadata-proofofconcept will extract EXIF information from a photograph and build a metadata file for an NFT.
https://github.com/steppsr/exif2metadata-proofofconcept
bash chia chia-blockchain exif metadata nft photography
Last synced: 18 days ago
JSON representation
exif2metadata-proofofconcept will extract EXIF information from a photograph and build a metadata file for an NFT.
- Host: GitHub
- URL: https://github.com/steppsr/exif2metadata-proofofconcept
- Owner: steppsr
- License: apache-2.0
- Created: 2022-07-25T04:25:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-25T15:43:10.000Z (almost 4 years ago)
- Last Synced: 2025-11-12T05:39:38.470Z (7 months ago)
- Topics: bash, chia, chia-blockchain, exif, metadata, nft, photography
- Language: Shell
- Homepage:
- Size: 3.31 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# exif2metadata-proofofconcept
> This script is a proof of concept. The goal is to build a script to be able to build a metadata file
> by extracting EXIF data from a photograph. Also, includes a preparation script to build some collection
> metadata that can be reused for other files.
### Goals
* script to create collection metadata
* script to extract EXIF data from a photograph
* integrate the collection data with the EXIF data to build a final metadata file.
### Prerequisites
The install will check for a couple of additional tools in order to handle JSON objects and extract the EXIF data.
If those are not already installed, the installer will load those as well. You may need to enter your password for
those installations.
**jq** - a lightweight and flexible command-line JSON processor.
**exiftool** - a powerful tool used to extract metadata of a file.
### Installing
You can install the application by running the following install command. This will basically create all the needed subfolders for you.
```
bash install.sh
```
### Preparing to run
You will need to put your photograph into the `ready` subfolder.
### Running the script(s)
**prep.sh**
If you will be creating a metadata file for a new collection, you'll need to run the `prep.sh` script first which will build the
collection data that will be used in the main `exif2metadata.sh` script.
```
bash prep.sh
```
Follow/answer the on screen prompts and the file will be built. If you need, you can always rerun this script to build the file again.
The collection file will be a JSON file and saved into the `collections` subfolder. The file will be your `collection_name.json`.
For example, if I create a collection called "StevesPhotos" then the filename will be `StevesPhotos.json`.
**exif2metadata.sh**
The `exif2metadata.sh` script will extract the EXIF data from the photo and then use that with the collection data to build the final
metadata file. The metadata file will be in the `metadata` subfolder once the script completes.
You will need pass in a few parameters when running this script.
1. the filename of the photograph
2. the name for the metadata file (without an extension... for example: `StevesPhoto_001` )
3. the name of the collection (without an extension... for example: `StevesPhotos` )
The you can run the script like below:
```
bash exif2metadata.sh TravelingMan.jpg TravelingMan_001.jpg TravelingManCollection
```