GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - meatcoder/random-flickr: A simple sinatra web app that returns random flickr pics with a certain tag and from a particular user.

BranchesTags
Open more actions menu

Latest commit

 

History

61 Commits
61 Commits

Folders and files

NameName
Last commit message
Last commit date
.bundle
.bundle
 
 
.github/workflows
.github/workflows
 
 
.gitignore
.gitignore
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE.md
LICENSE.md
 
 
Procfile
Procfile
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
config.ru
config.ru
 
 
flake.lock
flake.lock
 
 
flake.nix
flake.nix
 
 
mise.toml
mise.toml
 
 
test.rb
test.rb
 
 
web.rb
web.rb
 
 

Repository files navigation

random-flickr GitHub Actions

A simple sinatra web app that returns random flickr pics with a certain tag and from a particular user. I wrote it for my own amusement, as I wanted a url that when repeatedly refreshed will show different random pictures of my cat. Just something to cheer me up when I'm feeling down. You can see it deployed and in action here:

http://maome.herokuapp.com/randompic

It also has a url that returns a random image url instead of an html page:

http://maome.herokuapp.com/random

This is mainly for consumption by other web apps, services or a mobile or desktop app. I currently use it to implement a hubot script that returns random picture of my cat in response to a phrase. That script was inspired by the default pug me hubot script.

It is also possible to add optional parameters to the above urls to specify a specific flickr user or tag. They take the form:

http://maome.herokuapp.com/randompic/$FLICKR_USER_ID/$TAG

Just replace $FLICKR_USER_ID and $TAG with their actual values.

Install

The repository is easily deployed to any server that will run sinatra. The dependencies are listed in the Gemfile and thus can be automatically installed if you use bundler. Just do a:

$ bundle install

You will also need to set some configuration variables for the flickr api. In bash, you can do that like so:

$ export FLICKR_API_KEY=flick_api_key_here
$ export FLICKR_SHARED_SECRET=flick_shared_secret_here
$ export FLICKR_USER_ID=flickr_user_id
$ export FLICKR_TAG=flickr_tag

Just replace the values on the right hand side with the actual values. Then to launch the app, simply do this:

$ bundle exec ruby web.rb -p 8080

The above will allow you to access the app on port 8080.

About

A simple sinatra web app that returns random flickr pics with a certain tag and from a particular user.

Resources

Readme
BSD-2-Clause license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.