Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derhuerst/commons-photo-url
Download Wikimedia Commons photos.
https://github.com/derhuerst/commons-photo-url
commons creative-commons wikimedia wikipedia
Last synced: 25 days ago
JSON representation
Download Wikimedia Commons photos.
- Host: GitHub
- URL: https://github.com/derhuerst/commons-photo-url
- Owner: derhuerst
- License: isc
- Created: 2016-08-09T02:40:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T15:53:23.000Z (almost 5 years ago)
- Last Synced: 2024-12-31T11:39:43.858Z (about 1 month ago)
- Topics: commons, creative-commons, wikimedia, wikipedia
- Language: JavaScript
- Homepage: https://github.com/derhuerst/commons-photo-url
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# commons-photo-url 📷
**Generate the [Wikimedia Commons](https://commons.wikimedia.org/wiki/Main_Page) URL of a photo.**
[![npm version](https://img.shields.io/npm/v/commons-photo-url.svg)](https://www.npmjs.com/package/commons-photo-url)
[![build status](https://img.shields.io/travis/derhuerst/commons-photo-url.svg)](https://travis-ci.org/derhuerst/commons-photo-url)
[![dependency status](https://img.shields.io/david/derhuerst/commons-photo-url.svg)](https://david-dm.org/derhuerst/commons-photo-url)
[![dev dependency status](https://img.shields.io/david/dev/derhuerst/commons-photo-url.svg)](https://david-dm.org/derhuerst/commons-photo-url#info=devDependencies)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/commons-photo-url.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)
[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)## Installing
```
npm install commons-photo-url
```## Usage
```js
url(photo, [size])
``````js
const url = require('commons-photo-url')console.log(url('Hazelnuts.jpg', url.sizes.medium))
// -> https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Hazelnuts.jpg/800px-Hazelnuts.jpg
```*Note:* `url.sizes` is compatible with [`flickr-photo-url`](https://github.com/derhuerst/flickr-photo-url).
## Contributing
If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/commons-photo-url/issues).