Coder Social home page Coder Social logo

dash-rust's Introduction

CLI business card

Inspired by hearing @lynncyrin talk about npx business cards at !!Con West, this is a gemx business card. To see the output, run gemx indirect.

To create your own gemx business card, you can fork this repo, put your own info at the top of indirect.rb... and then even rename the files, if you want. 😂

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/indirect/indirect. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Indirect project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

dash-rust's People

Contributors

exscape avatar indirect avatar tomjakubowski avatar wycats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dash-rust's Issues

Crash when processing docs for Rust 0.10-pre HEAD

rustdoc has undergone many changes lately. Looks like one of them broke dash-rust.

mkdir -p Rust.docset/Contents/Resources
cp icon.png Rust.docset/
cp Info.plist Rust.docset/Contents/
Enter the path to the local rust docs
/Users/esummers/Documents/Rust/github/rust/doc/
cp -r /Users/esummers/Documents/Rust/github/rust/doc/ Rust.docset/Contents/Resources/Documents
Indexing arena...
Indexing collections...
Indexing extra...
Indexing flate...
Indexing fourcc...
Indexing getopts...
Indexing glob...
Indexing green...
Indexing native...
Indexing num...
Indexing rustdoc...
Indexing rustuv...
Indexing semver...
Indexing serialize...
Indexing std...
rake aborted!
undefined method `gsub!' for nil:NilClass
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:110:in `block in add'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:110:in `each'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:110:in `add'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:89:in `block (2 levels) in index_docs_search_indexes'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:66:in `each'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:66:in `block in index_docs_search_indexes'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:54:in `each'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:54:in `index_docs_search_indexes'
/Users/esummers/Documents/Rust/github/dash-rust/lib/docset_index.rb:25:in `save'
/Users/esummers/Documents/Rust/github/dash-rust/Rakefile:46:in `block in <top (required)>'
Tasks: TOP => default => docset => docset:index => Rust.docset/Contents/Resources/docSet.dsidx
(See full trace by running task with --trace)

Beta channel issues - broken links, but works in browser

#!/bin/bash
set -ex
export DOCS_PATH="rust-1.0.0-beta-x86_64-unknown-linux-gnu/rust-docs/share/doc/rust/html"
export DOCSET_ID="rust"
export DOCSET_NAME="Rust 1.0.0 Beta"
export DOCSET_GROUP="rust"
export DOCSET_GUIDES=1

rm -f rust-1.0.0-beta-x86_64-unknown-linux-gnu.tar.gz
rm -rf rust-1.0.0-beta-x86_64-unknown-linux-gnu

curl -O http://static.rust-lang.org/dist/rust-1.0.0-beta-x86_64-unknown-linux-gnu.tar.gz
tar -xzf rust-1.0.0-beta-x86_64-unknown-linux-gnu.tar.gz

echo "Building beta docset to \"$DOCSET_NAME\".docset"

bundle exec rake clean docset

set +ex

Output:

https://gist.github.com/nathanaeljones/30db0497dc22d4f2d2b5

This produces a docset, and the docset HTMl can be browsed by a browser - however, searching for an item or navigating in the TOC causes a file not found within the Dash window.

Prerequisites not listed

Unfortunately, running rake was most certainly not the only step required. In fact, for the time being, I gave up trying to get this to work (on OS X 10.9.2), as several of the steps caused issues; most notably, installing the dependencies for bundler (which appears to be a prerequisite for dash-rust) fails for me:

$ git clone https://github.com/indirect/dash-rust.git
$ rake
rake aborted!
cannot load such file -- bundler/setup
/Users/serenity/Programming/rust_src/dash-rust/Rakefile:2:in `<top (required)>'
(See full trace by running task with --trace)

$ sudo gem install bundler
Fetching: bundler-1.6.2.gem (100%)
Successfully installed bundler-1.6.2
Parsing documentation for bundler-1.6.2
Installing ri documentation for bundler-1.6.2
1 gem installed

$ rake
Could not find coderay-1.1.0 in any of the sources
Run bundle install to install missing gems.

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Installing coderay 1.1.0
Installing execjs 2.0.2
Installing method_source 0.8.2
Installing mini_portile 0.5.2

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...
checking for iconv_open() in -liconv... yes
checking for xmlParseDoc() in -lxml2... no

libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

I then tried to solve this using the answer at this StackOverflow link, but that doesn't work, either.

I fully realize that none of this is because of dash-rust, of course, but at the very least, the prerequisites should be listed.
Is bundler the only one (with its many dependencies of its own)?

Generalize for building any rustdoc-generated documentation

Occurred to me today it wouldn't be that hard, and would be very useful, to be able to generate docsets from rustdoc documentation for an arbitrary Rust crate with this tool. I think they could all go in the rust DocSetPlatformFamily and it would just work very smoothly.

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.