Skip to content

Instantly share code, notes, and snippets.

Created April 26, 2016 15:42
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
a Bash script to generate docset for Zeal from a group of gems
# rubygem is required
# yard is required: gem install yard
# doc_to_dash is required: gem install doc_to_dash
TMP_DIR=$(mktemp -d)
for GEM_NAME in $(gem search --local $GEM_NAME_PREFIX | sed -e "/^$/d" -e "s/ \(.*\)$//"); do
GEM_DIR=$(find $GEM_HOME -type d -name "$GEM_NAME-[0-9]*" | grep $GEM_NAME_PREFIX | sort -r | head -1)
mkdir -p $TMP_DIR/$GEM_NAME
yardoc --title $GEM_NAME --readme --protected --private --embed-mixins --output-dir $TMP_DIR/$GEM_NAME $GEM_DIR
cat <<EOF > $DOCSET_DIR/$GEM_NAME.docset/meta.json
"name": "$GEM_NAME",
"title": "$GEM_NAME"
rm -Rv $TMP_DIR
Copy link

can you provide some details on how to use this shell script and how to add in zeal aftewards?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment