nmattia / nmattia/niv

Autodetect file type

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Haskell
Stars
1.9k
Forks
75
Avg merge
7m
Merged PRs (30d)
5

Description

A call like niv add https://foo.bar should infer the type file. In particular, a call like this:

$ niv add https://ftp.mozilla.org/pub/firefox/releases/78.0.2/mac-EME-free/en-GB/Firefox%2078.0.2.dmg

should

  • figure out that it's a URL and not a github repo
  • grab the first alphanum chars after the last char and lowercase

i.e. add the source firefox with type file

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the niv add command and trace how its argument is classified as a GitHub repository or another source. Verify the URL example in the issue, then implement the requested behavior so it is recognized as a file and produces the source name firefox with type file.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.