Code Monkey home page Code Monkey logo

cornell's Introduction

Cornell CLI dependencies Status npm version npm downloads

gif ๐Ÿ™Œ

So it's like Cornell info on your Terminal.

Install

NOTE: cornell is only compatible with the latest versions of node.js. Make sure you have node 6 installed.

If you have node.js:

npm install -g cornell

If you dont have node.js:

curl https://raw.githubusercontent.com/mrkev/cornell/master/lib/install.sh | bash

If the you don't have node and the above failed or the idea of piping curl to bash freaks you out:

  1. Install node.js or io.js (I recommend using nvm).
  2. Run npm install -g cornell.

If you're old-school, really bored, or masochist,

git clone http://github.com/mrkev/cornell
cd cornell
npm link

Getting updates will tend to suck though.

If you think npm is just a fad kids play with these days, and would rather go comando

git clone http://github.com/mrkev/cornell
cd cornell/bin

... and idk. Add this to your $PATH I guess but tbh I hope you didn't even make it this far plz just use npm ty.

Usage

  • cornell --help - Always a good idea
  • cornell eat --menu - Lists open halls. Select one for menus.
  • cornell eat --time okies - Lists a few days of Okenshields open hours.
  • cornell class mexico - Search roster for classes containing "mexico".
  • cornell class -s CS compilers - Search CS classes containing compilers.

A little extra for CS classes

Why bookmark? Don't bookmark. You'll ruin your clean toolbar a e s t h e t i c and using your mouse (!! yike). Those pesky cs websites with syllabi and pset writeups are more easily opened with cslink <query>

  • cslink graphics - Opens the site for Graphics
  • cslink operat - Opens the site for OS. Search is somewhat fuzzy.
  • cslink hi - Opens 1110. Idk why apparently that's what matches ยฏ\_(ใƒ„)_/ยฏ

Changelog

1.4.0

  • Adds cslink

1.0.0

  • Switched to cornell's official dinning JSON!
  • Never miss an update. New update notification.

cornell's People

Contributors

dependabot[bot] avatar mrkev avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

bryce-evans

cornell's Issues

Roster search doesn't appear to work

Looks like Cornell changed the API?

$ ./node_modules/.bin/cornell class cs6110
Searching 163 subjects 

Roster not available. ๐Ÿ˜ž
Try running npm update -g cornell.
If that doesn't fix it, https://github.com/mrkev/cornell/issues
500 - "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"UTF-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge,chrome=1\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=5\">\n    <title>Class Roster - 500 - Class Array does not exist</title>\n    <meta property=\"og:image\" content=\"/images/project/cuseal_full_red240.png?3.1.3.2016111108\">\n    <meta name=\"twitter:image\" content=\"/images/project/cuseal_full_red240.png?3.1.3.2016111108\">\n    <meta name=\"twitter:card\" content=\"summary\">\n    <meta name=\"application-name\" content=\"Class Roster\">\n    <meta name=\"author\" content=\"Cornell University, Office of the University Registrar\">\n    <meta name=\"copyright\" content=\"Cornell University\">\n    <link rel=\"icon\" type=\"image/x-icon\" href=\"/images/favicon.ico?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" media=\"all\" href=\"/bundles/cusascommon/third-party/bootstrap-3.3.6-dist/css/bootstrap.min.css?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" href=\"//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css\">\n    <link rel=\"stylesheet\" media=\"all\" href=\"/third-party/undohtml.css?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" media=\"all\" href=\"/third-party/select2-3.5.4/select2.css?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" media=\"all\" href=\"/dist/css/main.css?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" media=\"all\" href=\"/dist/css/roster.css?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" media=\"print\" href=\"/dist/css/print.css?3.1.3.2016111108\">\n    <link rel=\"stylesheet\" media=\"screen\" href=\"/assetic/base-roster.css?3.1.3.2016111108\" />\n    <script src=\"/assetic/base-roster.js?3.1.3.2016111108\"></script>\n    <script src=\"//use.typekit.net/fdu1kkn.js\"></script>\n    <script>\n    try{Typekit.load();}catch(e){}\n    var rosterLanding = false;\n    var rosterUserLoggedIn = false;\n    var rosterFavorites = [];\n    var rosterTokens = {'announcement': 'a',\n                        'favorites': 'f'\n    };\n    var rosterSkipAnnouncements = false;\n          var rosterActive = {slug: 'SP17', descr: 'Spring 2017', sharing: true };\n\n    var rosterUrls = {'appBase': '/',\n                      'browse': '/browse/roster/SP17',\n                      'signIn': '/favorites/show/SP17',\n                      'signOut': '/browse/user-sign-out',\n                      'instructorSearch': '/search/instructor/SP17/instructor',\n                      'userData': '/browse/roster/SP17/user-data?currentPath='\n    };\n    </script>\n    <script>\n    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n    ga('create', 'UA-54522258-1', 'auto');\n    ga('require', 'linkid', 'linkid.js');\n    ga('require', 'displayfeatures');\n    ga('set', 'anonymizeIp', true);\n    ga('set', 'dimension1', rosterActive.descr);\n    </script>\n</head>\n<body class=\"roster flexible\">\n<div id=\"skipnav\" role=\"menu\" aria-label=\"Shortcuts\">\n    <a href=\"#aria-main\">Skip to main content</a>\n</div>\n<div id=\"search-box\"><div id=\"search-box-wrap\"><div id=\"search-box-content\">\n\t<div id=\"cu-search\" class=\"options\" role=\"search\">\n\t\t<form action=\"https://www.cornell.edu/search/\">\n\t\t\t<div id=\"search-form\">\n\t\t\t\t<label for=\"search-form-query\">Search Cornell</label>\n\t\t\t\t<input type=\"text\" id=\"search-form-query\" name=\"q\" value=\"\" size=\"30\">\n\t\t\t\t<input type=\"submit\" id=\"search-form-submit\" class=\"dropshadow\" name=\"btnG\" value=\"go\">\n\t\t\t</div>\n\t\t</form>\n\t</div>\n</div></div></div>\n<div id=\"cu-identity\" role=\"banner\"><div id=\"cu-identity-content\">\n    \t<div>\n    \t\t<div id=\"extras-button\"><p><a href=\"#widgets\">Extras</a></p></div>\n    \t\t<div id=\"search-button\"><p><a href=\"#search-form\">Search Cornell</a></p></div><hr>\n    \t\t<h1 id=\"cu-seal\"><a href=\"http://www.cornell.edu/\"><img src=\"/images/project/cuseal_full_white240.png?3.1.3.2016111108\" alt=\"Cornell University\" width=\"120\" height=\"120\"></a></h1>\n\n            <div id=\"navigation\">\n                <div id=\"titles\">\n                                        <h2><a href=\"/browse/roster/SP17\">Class Roster</a></h2>\n                    \n                    <span id=\"authn-toggler\"></span>\n                </div>\n    \t\t\t<h3><em>Section Menu</em></h3>\n    \t\t\t<ul id=\"aria-main-nav\" class=\"menu\" role=\"menu\" aria-label=\"(Main Navigation)\">\n    \t\t\t    \t\t\t\t<li class=\"browse first\"><a href=\"/browse/roster/SP17\"><span>Browse</span></a></li>\n    \t\t\t\t<li class=\"favorites\"><a href=\"/favorites/show/SP17\"><span>Favorites</span></a></li>\n    \t\t\t\t<li class=\"scheduler\"><a href=\"/scheduler/roster/SP17\"><span>Scheduler</span></a></li>\n    \t\t\t\t<li class=\"faq\"><a href=\"/content/SP17/faq\"><span>FAQ</span></a></li>\n\t\t\t\t    \t\t\t\t<li class=\"mobile-toggle\"><a href=\"#aria-main-nav\"><span>Toggle Navigation</span></a></li>\n    \t\t\t</ul>\n    \t\t</div>\n    \t</div>\n</div></div>\n<div id=\"wrap\" role=\"main\" class=\"home\">\n    <div id=\"content-wrap\">\n    \t<div id=\"content\">\n    \t\t<div class=\"container\" id=\"main\">\n\n    \t\t\t<div id=\"secondary-nav\">\n\t\t\t\t    \t\t\t</div>\n\n    \t\t\t<div id=\"main-body\">\n<!--[if lte IE 9]>\n<div class=\"alert alert-danger\" role=\"alert\">For the best Class Roster experience, please use a modern browser, such as Chrome, Safari, Firefox, Edge, or IE11+.</div>\n<![endif]-->\n      \t\t\t   <div id=\"roster-alerts\"></div>\n                   <div id=\"roster-announcements\"></div>\n                   <div id=\"search-refresh\" aria-live=\"polite\">\n                    \n            <h1 id=\"aria-main\">500/Internal Server Error</h1>\n        <h2>Class Array does not exist</h2>\n    \n\n                   </div>\n    \t\t\t</div> \n\t\t\t\t\t\t\t\t\t\t\t\t\n    \t\t</div>        \t</div> \t</div></div>\n<div id=\"footer\" role=\"contentinfo\" aria-label=\"Footer\">\n\t<div id=\"footer-content\">\n\t\t<h2>About the Class Roster</h2>\n\n\t\t<div id=\"roster-footer-dynamic\"></div>\n\n\t\t<p>The schedule of classes is maintained by the <a class=\"footer-link\" href=\"https://registrar.cornell.edu/\">Office of the University Registrar</a>.\n\t\tCurrent and future academic terms are updated <a class=\"footer-link\" href=\"/browse/last-updated\">daily</a>.\n\t\tAdditional detail on Cornell University's diverse academic programs and resources can be found in the <a class=\"footer-link\" href=\"http://courses.cornell.edu/\">Courses of Study</a>.\n            Visit The Cornell Store for <a class=\"footer-link\" href=\"http://store.cornell.edu/c-488-textbooks.aspx\" target=\"_blank\">textbook information</a>.</p>\n\n    <p>Please contact <a class=\"footer-link\" href=\"mailto:[email protected]\">[email protected]</a> with questions or feedback.</p>\n\n\t\t<p><a class=\"footer-link\" href=\"http://www.cornell.edu\">Cornell University</a> &copy;2017</p>\n\t</div>\n</div>\n<script src=\"//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-540f5b9a5201441d\"></script>\n<script>\n$(document).ready(function() {\n    rosterInit();\n});\n</script>\n<script type=\"text/javascript\">\nga('send', 'exception', {\n        'exFatal': true,\n        'exDescription': '500 Class Array does not exist'\n  });\n</script>\n</body>\n</html>\n"
[lidavidm@sonata ~]$ 

SyntaxError on `cornell netid`

I get the following error when trying to use the netid functionality

/usr/lib/node_modules/cornell/node_modules/plant.js/Plant.js:2
let rp         = require('./request_promise')
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/lib/node_modules/cornell/bin/cornell-netid:4:16)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

Any ideas?

Class Search Speed

As cool as the searching with arrow keys is, it gets tedious when the subject you want is in the middle of the alphabet. Anyway to have both arrow key and typed lookup?

subject toLowerCase pls

cornell class -s math --> :(
cornell class -s MATH --> :)

Can haz cornell class -s math --> :) pls?

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.