Skip to content

Ruby script for downloading wallpapers from The Metropolitan Museum of Art's Open Access Initiative

License

Notifications You must be signed in to change notification settings

rfauver/met_wallpapers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

met_wallpapers

irises

Ruby script to download wallpapers from the collection of the Metropolitan Mueum of Art. By default downloads a 1920x1080 image with a black background behind the original image and a white caption of the title, artist, and year of the work.

Prerequisites

Usage

Run bundle install (once) to download dependencies.

Run with ruby met_wallpapers.rb

Wallpapers will be downloaded into a ./wallpapers folder, and the script will run until the limit paramter is reached or all matching images are downloaded.

Downloading specific work

In order to download a specific work, you can use the --id option. You can search through the catalog on the Met Musem website. The id can be found in the URL of the individual work after /search/. For example, in order to download https://www.metmuseum.org/art/collection/search/459116, run ruby met_wallpapers.rb --id 459116.

Options

Option Default Description
--id Download a specific work
--width 1920 Wallpaper output width, in pixels
--height 1080 Wallpaper output height, in pixels
-l, --limit Limit number of wallpapers downloaded
-d, --department Filter to museum department in this list
--landscape false Restrict to landscape orientation images only
--portrait false Restrict to portrait orientation images only
--background-color 'black' Wallpaper background color string, e.g. '#0c1087', 'pink'
--text-color 'white' Caption text color string, e.g. '#0c1087', 'pink'
-h, --help Show help menu

Examples

ruby met_wallpapers.rb

plate

ruby met_wallpapers.rb --width 1080 --height 1920

saint_anthony_the_abbot_in_the_wilderness

ruby met_wallpapers.rb --background-color '#2F4F4F' --text-color 'DarkSlateGrey'

pen_box_(qalamdan)_depicting_shah_isma'il_in_a_battle_against_the_uzbeks

ruby met_wallpapers.rb --width 3840 --height 2160 -d 'european paintings'

the_siesta

ruby met_wallpapers.rb -d 'photographs'

temple_of_edfu

License

MIT

Metropolitan Museum of Art Open Access API licensed with CC0. Images downloaded by this script are limited to those marked by the API as in the Public Domain.

Met Open Access Policy

About

Ruby script for downloading wallpapers from The Metropolitan Museum of Art's Open Access Initiative

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages