Giter Site home page Giter Site logo

ifamojuro / help50 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cs50/help50-deprecated

0.0 1.0 0.0 4.38 MB

This is help50, a command-line tool that helps students understand error messages.

Home Page: https://cs50.harvard.edu/

Makefile 1.75% Shell 2.42% Python 88.08% Mako 0.70% HTML 7.05%

help50's Introduction

Contributing

To contribute a sample error message that help50 does yet support, open an issue and provide, ideally, both the error message and the command (and code, if any) that triggered it, both formatted in Markdown like code.

Better yet, to contribute to a helper for foo, implement helpers/foo.py per the below, where lines will be an array of strings (i.e., lines of stderr and/or stdout potentially from foo) for which user needs help, n must be a number of lines that this helper has matched on, and response must be an array of strings that help user understand the first n lines of lines. Helper must return None if it does not recognize lines[0]. Only if helper recognizes lines[0] may it look at lines[1:].

import re
def help(lines):
    ...
    # if helper recognizes lines[0]
        ...
        return (n, response)

Here are open issues if you'd like to solve one or more!

Development

  1. Install Docker Engine
    • If running Ubuntu, also install the latest version of Docker Compose
  2. Execute docker-compose build in a terminal
  3. Execute docker-compose up in a terminal

The provided docker-compose.yml will "mount" the repository within the container (at /srv/www) so that you can make changes to files locally that will be reflected inside the container.

For a shell within the container, execute

docker exec -it help50_web bash -l

after the container has been started (with docker-compose up).

Usage

Web

Visit http://localhost:8080/ in a browser

Command Line

Assuming a container is running and listening at http://localhost:8080/ and you're inside of the container (via docker exec -it help50_web bash -l):

  • help50 ./foo
  • help50 make foo
  • help50 clang -o foo foo.c
  • ./foo |& help50
  • make foo |& help50
  • clang -o foo foo.c |& help50

TODO

  • Get ANSI codes to work in server-side .ans templates.
  • Decide whether server should return before for .ans (and .txt) templates.
  • Replace backticks with ANSI boldfacing, a la https://github.com/cs50/help50/blob/php/malan/test.sh?
  • When helpers fail to match first few lines of script (e.g., examples/c/0.c), don't just show the matched lines as before, show preceding lines too?
  • Create client and server subdirectories? But Elastic Beanstalk might only look in root of repo.
  • Add support for usernames and hearts via a MySQL database.
  • Create tests (that get executed before deployment).

help50's People

Contributors

dmalan avatar brianyu28 avatar annieechen avatar glennholloway avatar

Watchers

 avatar

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.