Giter Site home page Giter Site logo

google-to-bitly-shortlinks's Introduction

Google to Bitly shortlinks

A series of scripts to convert google short links to bitly short links

Fetch the links

Query Periscope using the sql snippet in survey_settings_query.sql and save it to a csv file named raw_survey_settings.csv. Periscope has an option to export to CSV, so use that.

Isolate the links

Run the isolate_google_links.sh in a bash terminal. This will generate a file titled google_urls.txt which is a list of isolated Google shortlinks

Expand the links

Run the expand_google_short_links.sh in a bash terminal. This will give you a file titled expanded_urls.txt which is a list of the Google shortlinks followed by their final link destinations.

Convert the links

The provided convert_long_url_to_short.sh bash script takes two arguments. The first is an access token provided by bitly.com which you supply to create your shortlink. The second argument is the link you wish to generate a bitly shortlink for. The generated link is saved to a file titled generated_bitly_links.txt and includes both the original and the shortlink. If you lose this file, just login to your bitly account and you can view it from there.

The rest

There's a little bit more manipulation done to change the links in the survey settings, but I haven't included it here because I did it all inline and thus don't have it saved. The gist is that I made a hash map between the google links and the bitly links and if I ever encountered a google link I looked it up to find the bitly link to replace it with.

google-to-bitly-shortlinks's People

Contributors

aschuster3 avatar

Watchers

David Sommers avatar Damien Evans avatar Chris Hoffman avatar Phong Si avatar Henry Happ avatar James Cloos avatar Bo Pritchard avatar Ulhas Chamkeri avatar Scott M. Walters avatar Heath Daum avatar Tom Polak avatar Luke Tower avatar Shon Krull avatar Adam Kost avatar  avatar Arnold Liao avatar Kyle Maggard avatar Chris Carlson avatar Gene Roberts avatar David Karl avatar Robbie Steinbock avatar Luke Bodeen avatar Akbar Noorani avatar Drake DuBois avatar John Featherston avatar John MF Thomalla avatar Scott Simonson avatar John Bird avatar Brandon Ortuno avatar Adrian Carriger avatar Tyler Paul avatar Tyler Crane avatar Anitha Sivakumar avatar Chad R. Denaux avatar  avatar Sunil Sharma avatar Spencer Hochmann avatar Joe Sanchez avatar Brad Middleton avatar Douglas Shirilla avatar Louis Savalla avatar Brandon Zweifel avatar PrePri 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.