-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,987 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,42 @@ | ||
<img align="right" src="https://user-images.githubusercontent.com/51878265/186825286-499db16b-5b95-488d-b6d5-09d44521b890.png" height="70px"> <h2>LinkFree CLI </h2> | ||
<img align="right" src="https://user-images.githubusercontent.com/51878265/186825286-499db16b-5b95-488d-b6d5-09d44521b890.png" height="35px"> <h2>LinkFree CLI </h2> | ||
|
||
**LinkFree CLI** is a command line tool that helps you to create your **[LinkFree](https://github.com/EddieHubCommunity/LinkFree)** profile through CLI. | ||
<div align="center"> | ||
|
||
|
||
**LinkFree CLI** is a command line tool that helps us to create and update your **[LinkFree](https://github.com/EddieHubCommunity/LinkFree)** profile through CLI. We can also give testimonials and events through it. | ||
|
||
<br> | ||
<div align="center"> | ||
|
||
[![NPM Package](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/publish.yml/badge.svg)](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/publish.yml) | ||
[![Releases](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/releases.yml/badge.svg)](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/releases.yml) | ||
[![.github/workflows/greetings.yml](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/greetings.yml/badge.svg)](https://github.com/Pradumnasaraf/LinkFree-CLI/actions/workflows/greetings.yml) | ||
[![Npm package total downloads](https://badgen.net/npm/dt/linkfree-cli)](https://npmjs.com/package/linkfree-cli) | ||
|
||
</div> | ||
|
||
## Demo | ||
![LinkFree CLI demo GIF](https://user-images.githubusercontent.com/51878265/220831787-93c6b920-2961-4729-8a2c-0ac576658d83.gif) | ||
|
||
![LinkFree CLI](https://user-images.githubusercontent.com/51878265/200193639-0e2d6d23-5f85-48e8-9563-8879b4efb18a.gif) | ||
### ⭐️ Features | ||
|
||
## Using the CLI (Commands) | ||
- Creating a LinkFree profile. | ||
- Updating a LinkFree profile. | ||
- Giving a testimonial to a LinkFree profile. | ||
- Adding events (conferences, meetups, etc). | ||
|
||
> **Note** First fork the [LinkFree](https://github.com/EddieHubCommunity/LinkFree) repo before using it. | ||
|
||
- **To install it globally.** | ||
### 👨💻 Using the CLI tool | ||
|
||
```bash | ||
npm install -g linkfree-cli | ||
Make sure you have cloned the [LinkFree](https://github.com/EddieHubCommunity/LinkFree) repo and in the root directory of the repo and installed the dependencies. | ||
|
||
linkfree-Cli | ||
``` | ||
|
||
It will then prompt you to questions. | ||
|
||
- **To execute the package directly, without installing it.** | ||
- To trigger the CLI, run the following command in the bash terminal. | ||
|
||
```bash | ||
npx linkfree-cli | ||
``` | ||
|
||
It will then prompt you to questions. | ||
### 📝 License | ||
|
||
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) for details. | ||
|
||
## Contributions | ||
### 🛡 Security | ||
|
||
Feel free to contribute to the repo. Just make sure you Open an [Issue](https://github.com/Pradumnasaraf/LinkFree-CLI/issues) first before raising the Pull Request | ||
If you discover a security vulnerability within this project, please check the [SECURITY](SECURITY.md) for more information. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
const enquirer = require("enquirer"); | ||
const fs = require("fs"); | ||
const chalk = require("chalk"); | ||
const createEventFile = require("./helper/createEventFile"); | ||
|
||
const addEvent = async () => { | ||
let answers = await enquirer.prompt([ | ||
{ | ||
type: "input", | ||
name: "githubUsername", | ||
message: "What is your GitHub username? (case sensitive)", | ||
}, | ||
]); | ||
let eventWriter = answers.githubUsername; | ||
|
||
if (eventWriter === "") { | ||
console.log(chalk.bgRed.bold(` Please enter a valid GitHub username. `)); | ||
addEvent(); | ||
} else if (!fs.existsSync(`./data/${eventWriter}.json`)) { | ||
console.log( | ||
chalk.bgYellow.bold( | ||
` You don't have a LinkFree JSON file!. Create an account first! ` | ||
) | ||
); | ||
process.exit(0); | ||
} else { | ||
let answers = await enquirer.prompt([ | ||
{ | ||
type: "select", | ||
name: "userStatus", | ||
message: | ||
"Are you the event organizer or a participant? (This is optional.)", | ||
choices: ["Organizer", "Participant", "None - Skip this question"], | ||
}, | ||
{ | ||
type: "input", | ||
name: "speakerDetails", | ||
message: | ||
"Give your topic of your talk at the event. (This is optional. Press enter to skip.)", | ||
}, | ||
{ | ||
type: "confirm", | ||
name: "isVirtual", | ||
message: "Is the event virtual?", | ||
}, | ||
{ | ||
type: "confirm", | ||
name: "isInPerson", | ||
message: "Is the event in person?", | ||
}, | ||
{ | ||
type: "input", | ||
name: "name", | ||
message: "What is the name of the event?", | ||
}, | ||
{ | ||
type: "input", | ||
name: "description", | ||
message: "Give a description of the event", | ||
}, | ||
{ | ||
type: "input", | ||
name: "url", | ||
message: "Give associated URL for the event", | ||
}, | ||
{ | ||
type: "input", | ||
name: "start", | ||
message: | ||
"Give event start date and time (Supported format: 2023-08-09T00:00:00.000+00:00)", | ||
}, | ||
{ | ||
type: "input", | ||
name: "end", | ||
message: | ||
"Give event end date and time (Supported format: 2023-08-09T00:00:00.000+00:00)", | ||
}, | ||
{ | ||
type: "input", | ||
name: "cfpClose", | ||
message: | ||
"Give CFP end date and time (Supported format: 2023-08-09T00:00:00.000+00:00) - (This is optional. Press enter to skip.)", | ||
}, | ||
{ | ||
type: "input", | ||
name: "color", | ||
message: "Give a color theme", | ||
}, | ||
]); | ||
|
||
createEventFile(eventWriter, answers); | ||
} | ||
}; | ||
|
||
module.exports = addEvent; |
Oops, something went wrong.