Giter Site home page Giter Site logo

uri2smug's Introduction

CLI tool to upload photos to SmugMug using uploadfromuri.

This instructs SmugMug to download the photo content directly from (for example) AWS S3 rather than having you upload using your local Internet connection.

Preflight

This project requires Perl.

Debian

sudo apt-get install -y perl liblwp-authen-oauth-perl

Usage

Pipe in a line seperated list of URLs that you wish to import into an album like so:

cat list-of-urls | ./uri2smug.pl album-name

N.B. you have to first create the album (called 'Gallery') via the web frontend under 'Organize'

For example you can do:

aws s3 ls --recursive "s3://mybucket/20170416 - Example's/" \
	| sed -n -e '/.\(jpe\?g\|JPE\?G\)$/ s/ \+/^/g p' \
	| cut -d^ -f4- \
	| sed -e 's/\^/ /g' \
	| sed "s~.*~s3://mybucket/&~" \
	| tr '\n' '\0' \
	| xargs -0 -n1 aws s3 presign --expires-in 300 \
	| ./uri2smug.pl "20170416 - Example's"

N.B. you should set expires-in to several hours if you have a large number of photos to import as the URL may expire before uri2smug actually gets to processing it!

First Time

Get yourself a SmugMug API Key

  1. set the application name to 'uri2smug'
  2. set the type to 'Toy'
  3. set platform to whatever your OS is
  4. set use to 'Non-Commercial'
  5. set a description of your choosing
  6. agree to both the API terms and conditions and the API 2.0 beta terms.
  7. click on 'APPLY'

You will instantly be provided with your keys so you need to now configure uri2smug, which you can do by just running it:

alex@quatermain:/usr/src/uri2smug$ ./uri2smug.pl
first time configuration
enter username: [email protected]
enter API key: 1234567890abcdefghijklmnopqrstuv
enter API secret: 1234567890abcdefghijklmnopqrstuv1234567890abcdefghijklmnopqrstuv
open the following in your web browser and enter in the pin:
https://secure.smugmug.com/services/oauth/1.0a/authorize?.....
enter pin: 123456

You should be now set to go.

uri2smug's People

Contributors

jimdigriz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.