Skip to content

Commit 281cbe9

Browse files
author
Agustín Rodríguez
committed
readme reworked
1 parent 1127f57 commit 281cbe9

File tree

1 file changed

+63
-13
lines changed

1 file changed

+63
-13
lines changed

README.md

+63-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# bashme
22

3-
Bashme is a JavaScript library which provides a nerdy way to tell people about you. It was created with the intention to use it as a resumé replacement but it can also have other use cases. It aims to be customizable, extensible and easy to use.
3+
Bashme is a library which provides a nerdy way to tell people about you. It was created with the intention to use it as a resumé replacement but I it can have other use cases. It aims to be customizable, extensible and easy to use.
4+
5+
## Demo
6+
7+
Play with it in my personal website: http://agurodriguez.net
48

59
## Getting Started
610

@@ -13,35 +17,81 @@ npm install bashme
1317
Use it:
1418

1519
```js
16-
var bashme = new Bashme.default();
17-
bashme.use(new Bashme.GitHub(process.env.GITHUB_APP_KEY, process.env.GITHUB_SECRET);
20+
var bashme = new Bashme.Bashme();
21+
bashme.use(new Bashme.GitHub('agurodriguez'));
1822
bashme.show(document.querySelector('#bashme'));
1923
```
2024

2125
Full code in [example](example) folder.
2226

2327
> If you use react, you can try [react-bashme](https://github.com/agurodriguez/react-bashme).
2428
25-
## Contributing
29+
## A bit into the code
2630

27-
### About the `bashme` instance
31+
### The `Bashme` instance
2832

29-
A `bashme` instance is the library's entry point and is reponsible to process input/output from/to the terminal and to run the tasks related to every given command.
33+
`Bashme` is the main class which acts as library's entry point. It's reponsible for processing the input/output from/to the terminal and for running the tasks related to every given command.
3034

31-
It has two important methods, `use` and `show`, explained in the following paragraphs:
35+
It has two important methods, `use` and `show`:
3236

33-
#### `use(infoProvider: InfoProvider)`
37+
#### `use(provider: IProvider)`
3438

35-
This method registers a new `InfoProvider` in the `bashme` instance. When the `InfoProvider` is registerd it adds commands to the `bashme` instance that can be called by the user.
39+
This method registers a new `IProvider` in the `Bashme` instance. When the `IProvider` is registerd it adds commands to the `Bashme` instance that can be called by the user.
3640

3741
#### `show(domElement: HTMLElement)`
3842

3943
This method converts an `HTMLElement` into a full interactive terminal (Using [`xterm.js`]()) to allow users to write the commands they want to execute.
4044

41-
### Adding an InfoProvider
45+
### Providers
46+
47+
A provider is a class that implements the [`IProvider`](src/provider/types/index.ts) interface and provides commands to the `Bashme` instance that the user can then execute.
48+
49+
### Commands
50+
51+
A command is a class that inhertis from the [`AsyncCommand`](src/command/types/index.ts) or the [`SyncCommand`](src/command/types/index.ts) classes and are used to perform some specific action.
52+
53+
## Built-in Providers
54+
55+
### GitHub
56+
57+
See [GitHub.ts](src/provider/GitHub.ts)
58+
59+
#### Commands
60+
61+
| Command | Description |
62+
|-------------------|----------------------------------|
63+
| `github` | Shows GitHub profile information
64+
| `github contribs` | Shows GitHub contributions
65+
| `github orgs` | Shows GitHub organizations
66+
| `github repos` | Shows GitHub repositories
67+
68+
### Json
69+
70+
See [Json.ts](src/provider/Json.ts)
71+
72+
#### Commands
73+
74+
| Command | Description |
75+
|-------------------|----------------------------------|
76+
| `name` | Shows name
77+
| `bio` | Shows bio
78+
| `education` | Shows education
79+
| `work` | Shows work experience
80+
| `volunteer` | Shows volunteer experience
81+
| `awards` | Shows awards
82+
| `publications` | Shows publications
83+
| `skills` | Shows skills
84+
| `languages` | Shows languages
85+
86+
## License
4287

43-
A provider is a class that implements the [`InfoProvider`]() interface and is reponsible for filling the [`resumé`]() properties and for adding commands to the `bashme` instance.
88+
[MIT License](LICENSE)
4489

45-
### Adding a Command
90+
Copyright (c) 2018 Agustín Rodríguez
4691

47-
A command is a class that implements the [`Command`]() interface and is used to perform some actions when a specific command is given.
92+
Permission is hereby granted, free of charge, to any person obtaining a copy
93+
of this software and associated documentation files (the "Software"), to deal
94+
in the Software without restriction, including without limitation the rights
95+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
96+
copies of the Software, and to permit persons to whom the Software is
97+
furnished to do so, subject to the following conditions:

0 commit comments

Comments
 (0)