You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
12
20
@@ -38,18 +46,55 @@ To send us a pull request, please:
38
46
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
39
47
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
40
48
49
+
### Finding contributions to work on
50
+
51
+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/o2sh/onefetch/labels/help%20wanted) issues is a great place to start.
52
+
53
+
### Adding support for a new Language
54
+
55
+
First, you have to make sure that the language you want to add is supported by tokei ([supported languages](https://github.com/XAMPPRocky/tokei#supported-languages))
56
+
57
+
Adding support for a new Language requires adding a new entry in the `define_language!` macro in [language.rs](https://raw.githubusercontent.com/o2sh/onefetch/master/src/language.rs).
The first item `CSharp` corresponds to the name of the language as defined in tokei. The second item `csharp.ascii` is the name of the file containing the ascii logo, this file has to be placed in the _./resources_ folder (more info below). The third item `C#` is the display name. Then we have the colors `vec![Color::Blue, Color::Magenta]` used to customize the look of the ascii logo when displayed to the screen. The last item `c#` is required only if the Enum name `CSharp` doesn't match the display name `C#`.
64
+
65
+
#### Ascii logo
66
+
67
+
```
68
+
{4} _{1} _ _
69
+
{4} _|_{1}(_|/ \
70
+
{0} o{4}| {1} _|\_/
71
+
72
+
{0} /\
73
+
{0} / \
74
+
{0} | |
75
+
{0} |{2}NASA{0}|
76
+
{0} | |
77
+
{0} | |
78
+
{0} | |
79
+
{0} ' `
80
+
{0} | |
81
+
{0} | |
82
+
{0} |______|
83
+
{3} '-`'-` .
84
+
{3} / . \'\ . .'
85
+
{3} ''( .'\.' ' .;'
86
+
{3}'.;.;' ;'.;' ..;;'
87
+
```
88
+
89
+
Remarks:
90
+
- Your ascii logo's dimensions must fall below `25*45` (height\*width). The CI will fail otherwise.
91
+
- You can use `{N}` to color the ascii which will utilize the vec! of colors defined in `define_language!`
92
+
- Make sure to trim any unnecessary trailing whitespaces
93
+
41
94
### Project-specific notes
42
95
43
96
- Please ensure your changes are formatted according to `cargo fmt`.
44
97
- Do check for linting errors with `cargo clippy`. If you're having trouble with this, feel free to ask for help.
45
98
- Documenting your changes in `CHANGELOG.md` (in the Unreleased section) would be awesome, but is not required.
46
99
- If you can, try to write some tests for your change (if it addresses a bug) or feature. Again, feel free to ask for help. Our CI will run these tests to ensure your code never breaks with future changes.
47
100
48
-
## Finding contributions to work on
49
-
50
-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/o2sh/onefetch/labels/help%20wanted) issues is a great place to start.
51
-
52
-
## Licensing
53
-
54
-
See the [LICENSE](https://github.com/o2sh/onefetch/blob/master/LICENSE.md) file for our project's licensing. We will ask you confirm the licensing of your contribution.
0 commit comments