Code Monkey home page Code Monkey logo

nintendo-switch-screenshots's Introduction

Nintendo Switch Screenshot Downloader

I like being able to share screenshots from my Nintendo Switch to Twitter, but I'd also like to download a copy. This groovy script reads your timeline and downloads the screenshots to your computer.

Alt text

Version 1 vs. Version 2

The original (V1) script is a pretty basic groovy script that just downloads images from Twitter. The new version (v2) is more powerful and much more complicated. It still downloads images from Twitter, but it also can crop the pictures (useful for getting rid of the hearts in Breath of the Wild), automatically upload to dropbox, and optionally delete the screenshots after processing.

Version 1: Git branch: master

Version 2: Git branch: v2

Downloading

Either clone this repository or download the latest release. All you really need is the screenshots.groovy file. The twitter4j.properties.example file is a template that you can use when setting up twitter auth.

Groovy

This runs with Groovy. If you need to install Groovy, click here.

Twitter Account Setup

You just pick which twitter account to lookup (in screenshots.groovy). The script will only look for tweets sent from the Nintendo Switch. It can be a private twitter account, as long as you have access to view the tweets.

Twitter Auth Setup

To use this, you will need to create a new Twitter application at https://apps.twitter.com/. This is what will be used to lookup the tweets. Once you setup the application you will need to create yourself an access token, which is all done in the Twitter application setup.

In my case, I have a separate Twitter account that I marked private. My main twitter account is following that second account, and my main twitter account is the one I used to create the Twitter application. It is even easier if you just use one account.

twitter4j.properties

Once you have the application keys and access tokens for your new app, create a twitter4j.properties file in the root directory (same as screenshots.groovy) in this format:

debug=true
oauth.consumerKey=*********************
oauth.consumerSecret=******************************************
oauth.accessToken=**************************************************
oauth.accessTokenSecret=******************************************

There is an example twitter4j.properties.example file you can use to start with.

More information can be found here: http://twitter4j.org/en/configuration.html#fileconfiguration

Running

First update the screenshots.groovy file. Towards the top there are a few configuration options most importantly what twitter username to look for.

Then just run:

groovy screenshots.groovy

It pulls the last 25 (can be changed in screenshots.groovy) tweets from your user, and downloads the image if the tweet came from the Switch (Twitter has a "source" of Nintendo Switch Share).

It will not download the same image twice because it names the files based on the date of the tweet.

Image information

In my tests, the downloaded images have a resolution of 1280x720 and are in .jpg format.

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.