Git Product home page Git Product logo

fuller's Introduction

canvas-cli

yet another Canvas LMS cli tool in rust btw

v1.0 Roadmap

Root Level

  • List Courses
  • List Todo
  • List Inbox
  • Show Profile

Courses Commands

  • List Todo
  • Ignore Todo
  • List Discussions
  • List Grades (Only graded submissions?)
  • List Assignments
  • List Modules

View Interfaces

  • View a Course
  • View a Todo Item (Assignment)
  • View a Profile
  • View a Conversation (Inbox)
  • View a Discussion
  • View a Submission
  • View an Assignment

Other

  • Ignore a Todo Item
  • Ignore a Course

Issues

  • Resolve Pagination

fuller's People

Contributors

grantlemons avatar

Stargazers

Tao Tien avatar Bhraedain Teitgen avatar

Watchers

Brent Lemons avatar  avatar

Forkers

nate-moo

fuller's Issues

Explore pagination

Canvas returns lists paginated to 10 items by default. This can be modified
through a query parameter, but it may make sense to just query multiple pages.
We need to strike a balance between making tons of requests and having huge
response bodies.

I propose that we paginate to 50 items during actual use, but limit this to the
original 10 during tests.

Config options to ignore results

Many students have classes that are out-of-date but still appears since the professor has not ended the class.
A config file option to exclude certain results could resolve this issue.

Adding this feature would involve creating a new subcommand for most things to ignore stuff. Much like the todo ignore, but working locally instead of through canvas.

This would require modifying the canvas_cli_config crate to allow writing to config.

Display formatted Profile when selected

Running canvas_cli profile should provide the user with a formatted version of the basic profile information.

Unsure if this should be implemented using inquire::Editor, or custom formatted and then cleared (crossterm alt screen?).
Contact me about this if you take this issue on.

This is probably the first issue that determines a big chunk of the look of the final tool. (If other issue establishes this first, link it below)

Eliminate Borrow or use impl Borrow

<T: std::borrow::Borrow<canvas_cli_config::Config>> is all over the place, but it is only in there because of lifetime issues in async iterators in tests.

Either eliminate the tests, find a way around borrow, or make it cleaner by extracting out the path using use and using impl Borrow<Config> instead of this monstrosity.

Refactor Error Handling

  • Revisit return types of request functions
    • Confirm server sends negative status code on error
  • Revisit return types of handlers
  • Distinguish between handlers and handler-helpers (select course/todo/assignment)

Start using branches

I've been committing to main this whole time, but if I want to be able to
collaborate, I will need to start using feature branches.
I already "had" to force push to main today, so it's about time.

I will finish the courses list test, then start using branches.

Feature Request: Config items should be optional

Kind of like what the title says: we should be able to omit config options if we want to keep the defaults.

If I do so now I get:

Error: Config(Parse(Error { inner: Error { inner: TomlError { message: "missing field `formatting`", raw: Some("[network]\nurl = \"elearning.mines.edu\"\npagination = 50\n"), keys: [], span: Some(0..0) } } }))

Create Inbox Selector

Create a selector using inquire similar to those for courses and todo.
Depends on #14.

All the work should be in fuller exclusively.

Overview of Steps:

  • Add a new selector to fuller/src/selector.rs (inbox_selector)
    • See other selectors in same file, and emulate that, just with different types
  • In fuller/src/main.rs, alter the inbox command behavior to call the selector

Create types and tests to support inbox

Relevent Docs

General Steps:

  • Create a new module in canvas_api/src/types/
    • Be sure to add the module to canvas_api/src/lib.rs
  • Create types from docs
  • Implement crate::types::ResponseType, PartialEq, & Display (see others for examples)
  • Create a new module in `canvas_api/src/requests/
    • Be sure to add the module to canvas_api/src/requests/mod.rs (at the bottom)
  • Either create a test or get someone to create the test
  • Keep testing until you figure out the actual nullability of all the fields
    • Their docs aren't always accurate here
    • Error messages will tell you what the general issue is (expected type vs. actual type)
  • Create Pull Request

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.