This application is a FastAPI-based web service that allows users to upload CSV or TSV files containing file names or URLs, fetch metadata for these files from Wikimedia Commons, and download a processed TSV file with the selected metadata fields.
- Upload CSV or TSV files
- Select specific metadata fields to include in the output
- Process files and fetch metadata from Wikimedia Commons
- Download processed metadata as a TSV file
- Dockerized for easy deployment
- Docker
-
Clone this repository:
git clone https://github.com/Mr-Sunglasses/CommonsMetaFetch.git cd CommonsMetaFetch -
Build and run the Docker container:
docker build -t metafetch . docker run -p 8000:8000 metafetch -
Open your web browser and navigate to
http://localhost:8000
- On the web interface, click "Choose File" to select your CSV or TSV file.
- Select the metadata fields you want to include in the output.
- Click "Process File" to upload and process your file.
- Once processing is complete, the processed TSV file will be automatically downloaded.
- Python 3.9+
- FastAPI
- Uvicorn
- Requests
- pytest (for running tests)
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required packages:
pip install -r requirements.txt -
Run the application:
uvicorn main:app --reload
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.