Code Monkey home page Code Monkey logo

equella_cli's People

Contributors

phette23 avatar

Watchers

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

equella_cli's Issues

launch doesn't seem to copy to clipboard consistantly

It seems like when eq is installed globally then the clipboard portion of eq launch doesn't work at all, while if I go inside the project directory and npm link it into place then it does work. Not sure what the the problem is, everything else works so the .equellarc file is being read correctly.

work with pipes, check stdin

use a typical UNIX syntax with a special hyphen - argument to indicate we need to check stdin such that things like jq .uuid taxonomy.json | eq tax - work as expected

this might be tricky in terms of figuring out when stdin is a file being piped to eq or an argument and then what type of argument (e.g. we accept full URLs, shortcuts, shortcuts plus UUIDs, etc. there are many forms of arguments)

requests & punycode are deprecated

Starting with node 21, punycode is deprecated and you receive a lot of warnings when running eq like this:

(node:67092) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

requests is the culprit, which is also deprecated. I need to switch to node-fetch.

could we use yargs for API endpoints?

The current infrastructure for API endpoints is messy. yargs has a nice, clean syntax for creating subcommands with aliases which would let us remove lots of horrible code.

My one question is how it would function alongside rc, whose syntax for arguments and the way it handles a default configuration file I really like and the project depends upon heavily. I'm not sure how easy those features would be to recreate under yargs.

endpoints documentation

The endpoints documentation is going to be really long, making the readme unmanageable as features are added. Should it be moved to:

  • GitHub wiki?
  • a separate markdown doc? (slight preference, don't like tying vital dox into GH platform)

documentation

there's like basically no documentation on the command line right now, not from a --help flag nor for any of the API routes

cache collections, groups JSON files

It might be too complicated but for data that doesn't change very often, like collections and groups (but obviously not items or taxonomies), it would be nice to cache their JSON data on disk so as to avoid HTTP requests. Could cache in ~/.equellacli or a EQ_CACHE env var, have a flag to override the cache, etc.

shortcut to open launcher app

Since eq admin is no longer relevant, it makes sense to A) remove it from the main help documentation (but leave in the specific eq help admin for people who use it) and B) add a new shortcut command to run the launcher app, similar to my vadmin shortcut script that runs the launcher script in the background and pipes all its output to /dev/null.

add endpoint for new search v2 API

One of the more recent releases introduced a second search API https://vault.cca.edu/apidocs.do#operations-tag-Search_V2 to support the new UI. It might be faster than the original but it looks promising in other ways too:

  • has an identical set of parameters as the old search API, so we should get very far just copying the original code but replacing /search with /search2
  • has a new mimeTypes filter
  • has a new musts filter (examples: realthumb:true, videothumb:true, it says these are "search index key/value pairs" but I don't know what the list of those are, from the examples it seems like it is used to construct gallery type search results which require these sorts of preview derivatives)
  • has a new /search2/export endpoint which might be the backend implementation of the new search UI's CSV export; if so, this gives us a way to utilize this new feature without needing to switch to the new UI

add commands for logging in to EQUELLA as user

This opens up a whole slew of possibilities if it can be reduced to opening a particular URL, and I seem to recall there are query string parameters you can pass to the login page that are filled into the login form automatically. It'd be cool to set this up and allow users to define a login account in their .equellarc file.

After that's in place, could see a whole new command like eq access liu being useful which just opens directly to all the different settings pages (Logged In Users, Diagnostics, Theme Settings, etc.).

add length param to tax endpoint

I often want to retrieve all taxonomies and it can be done with eq tax --path '?length=500' but that's tedious, we should just expose the length parameter on the CLI.

add `access` route with series of sub-routes

format: eq access liu opens the "logged in users" settings page, etc. Here's a list of valuable routes:

  • liu -> /access/liu.do
  • settings -> /access/settings.do
  • diag, diagnostics -> /access/diagnostics.do
  • theme -> /access/themesettings.do

support `HEAD` and `OPTIONS` methods

They're simply converted to GET requests which return no information right now (or possibly throw a JSON parsing error on the empty response body?). Edit lib/req.js to have more conditions to support these and return HTTP header information.

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.