HNGi7 Task 2 (By: Team-Fierce)
- Fork this repository
- Clone the forked repo to your computer
- Add your script to the scripts folder (Please follow the naming convention earlier stated - {username-HNG-ID.ext” ---- ( where “.ext” is your file extension .js/.py/.php ) So for example, mine will be tomiwaajayi-HNG-00020.js / tomiwaajayi-HNG-00020.php / tomiwaajayi-HNG-00020.py, all depending on my script extension}
- After you have added your script file to the scripts folder, run the following in gitbash or teminal
- git checkout -b HNG-ID (e.g
git checkout -b HNG-00020
) git add .
- git commit -m "username-HNG-ID script" (e.g
git commit -m "tomiwaajayi-HNG-00020 script"
) - git push origin HNG-ID (e.g
git push origin HNG-00020)
- git checkout -b HNG-ID (e.g
- Create a pull request straight to this repository
NB: In your forked repo, don't merge your newly created branch into develop i.e you will be creating a PR with your new branch (which contains your script) ahead of your develop branch
- Python (3.x)
- Javascript (Node)
- PHP
Implementation for unsupported and supported languages was catered for and can be accessed with
- valid
- invalid
Indexing the valid key gives an array of all supported langugaes that has gone through processing and Indexing the invalid part of the json gives an array of all unsupported languages
sample json output
{
"valid": [{
"output": "Hello World, this is Don Joe with HNGi7 ID HNG-xxxx using JavaScript for stage 2 task",
"name": "Don Joe",
"id": "HNG-xxxx",
"email": "don.joe@example.com",
"language": "Javascript",
"status": "pass",
},
{
"output": "Hello World, thisis Mary Joe with HNGi7 ID HNG-yyyy using PHP for stage 2 task",
"name": "Mary Joe",
"id": "HNG-yyyy",
"email": "mary.joe@example.com",
"language": "PHP",
"status": "fail",
},
.
.
.],
"invalid": [{
"output": "Files with .cpp extension are not supported!",
"name": "null",
"file": "intern.cpp"
"id": "null",
"email": "null",
"language": "null",
"status": "fail",
}]
}