RSS michelepasin.org / code, music, words

Words / blog / 24 December 2016

How to copy snippets from Github Gists to Dash


If you’re a Dash for MacOS user, here’s a little script to copy existing code snippets saved as Github Gists into the Dash snippets database.

Dash for MacOS is an application that allows to keep a local library of a multitude of programming frameworks and libraries, so that you can search this library quickly using an offline intuitive interface.

Dash

Dash has a feature for creating and managing code snippets - there are many other alternatives out there for this - but probably the fact you can store snippets alongside other documentation could be a winner in this case.

Anyhow, since I’ve been collecting lots of snippets as Github Gists, I thought I’d be nice to load them up into Dash so to test it out a bit more!

Note:

- the solution below does not extract tags information at the moment

- always a good idea to make a backup copy of the Dash database before messing with it. Then just update the value of the DASH_DATABASE parameter in the script and start the extraction.

- inspired by another gist: https://raw.github.com/gist/5466075/gist-backup.py

So here we go:

Michele Pasin. How to copy snippets from Github Gists to Dash. Blog post on www.michelepasin.org. Published on Dec. 24, 2016.

2026

2023

2021

2020

2019

2017

2016

2015

2013

2012

2011

2010

2008

2006