GithubHelp home page GithubHelp logo

help-me-decide's Introduction

Why?

Sometimes I can't decide how to spend a holiday or a night.

How to Use

  1. Create a plain text file with your options, one per line.
  2. Run ./help-me-decide <PATH_TO_FILE> [NUM_RESULTS] at root. If NUM_RESULTS is not specified, 3 is the default value.
  3. Cosmic magic shall give what thou seek.

Example

$ printf "McDonald's\nKFC\nBurger King\nWendy's\nShake Shack\n" >| what-to-eat.txt
$ ./help-me-decide what-to-eat.txt 3
๐Ÿฅ‡ Shake Shack
๐Ÿฅˆ Wendy's
๐Ÿฅ‰ Burger King

help-me-decide's People

Contributors

shpun817 avatar

Stargazers

 avatar

Watchers

 avatar

help-me-decide's Issues

Cross compile the executable to Windows

Currently, the executable is compiled on WSL and doesn't run on Windows. Ideally, there should be different executables released for different platforms. Also, the executable should be tested on MacOS.

Separate main.rs into several modules

Currently, all the code has been written in one big main.rs file. Ideally, the different steps should be done in different modules to achieve better isolation and maintainability.

Ignore empty lines in input file

Currently, empty lines in the input file are regarded as options. Ideally, empty lines in the file should be ignore, so that the user may put their options in groups.

A command line argument can be added to explicitly disable this behavior, although it is unlikely anyone would want that.

Support comments in the input file

It would be nice if the tool can ignore certain lines in the input file, so that the user can add comments to describe the options.

Both single-lined (# ...) and multi-lined comments (/* ... */) should be supported.

Add tests

Depends on Issue #2

Currently, there are no tests due to the simple nature of the program. However, (unit and system) tests are required to assure quality in the long term.

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.