Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mr-sunglasses/commonsmetafetch
https://github.com/mr-sunglasses/commonsmetafetch
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mr-sunglasses/commonsmetafetch
- Owner: Mr-Sunglasses
- License: cc0-1.0
- Created: 2024-09-30T21:09:48.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-10-15T21:43:22.000Z (3 months ago)
- Last Synced: 2025-01-17T19:24:12.960Z (7 days ago)
- Language: Python
- Homepage: https://demo.cc.reimg.cfd/
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CommonsMetaFetch
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.
## Features
- 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## Prerequisites
- Docker
## Quick Start
1. Clone this repository:
```
git clone https://github.com/Mr-Sunglasses/CommonsMetaFetch.git
cd CommonsMetaFetch
```2. Build and run the Docker container:
```
docker build -t metafetch .
docker run -p 8000:8000 metafetch
```3. Open your web browser and navigate to `http://localhost:8000`
## Usage
1. On the web interface, click "Choose File" to select your CSV or TSV file.
2. Select the metadata fields you want to include in the output.
3. Click "Process File" to upload and process your file.
4. Once processing is complete, the processed TSV file will be automatically downloaded.## Development
### Requirements
- Python 3.9+
- FastAPI
- Uvicorn
- Requests
- pytest (for running tests)### Setup
1. Create a virtual environment:
```
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```2. Install the required packages:
```
pip install -r requirements.txt
```3. Run the application:
```
uvicorn main:app --reload
```## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License.