Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH action to synchronize wiki with .github/wiki #926

Merged
merged 4 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/wiki/Ascii-Art.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
This is the format onefetch uses for it's ASCII art files.

#### Here's an example:

```
{2} .:--::////::--.`
{1} `/yNMMNho{2}////////////:.
{1} `+NMMMMMMMMmy{2}/////////////:`
{0} `-:::{1}ohNMMMMMMMNy{2}/////////////:`
{0} .::::::::{1}odMMMMMMMNy{2}/////////////-
{0} -:::::::::::{1}/hMMMMMMMmo{2}////////////-
{0} .::::::::::::::{1}oMMMMMMMMh{2}////////////-
{0}`:::::::::::::{1}/dMMMMMMMMMMNo{2}///////////`
{0}-::::::::::::{1}sMMMMMMmMMMMMMMy{2}//////////-
{0}-::::::::::{1}/dMMMMMMs{0}:{1}+NMMMMMMd{2}/////////:
{0}-:::::::::{1}+NMMMMMm/{0}:::{1}/dMMMMMMm+{2}///////:
{0}-::::::::{1}sMMMMMMh{0}:::::::{1}dMMMMMMm+{2}//////-
{0}`:::::::{1}sMMMMMMy{0}:::::::::{1}dMMMMMMm+{2}/////`
{0} .:::::{1}sMMMMMMs{0}:::::::::::{1}mMMMMMMd{2}////-
{0} -:::{1}sMMMMMMy{0}::::::::::::{1}/NMMMMMMh{2}//-
{0} .:{1}+MMMMMMd{0}::::::::::::::{1}oMMMMMMMo{2}-
{1} `yMMMMMN/{0}:::::::::::::::{1}hMMMMMh.
{1} -yMMMo{0}::::::::::::::::{1}/MMMy-
{1} `/s{0}::::::::::::::::::{1}o/`
{0} ``.---::::---..`
```

#### Features:

- You can use `{0}` to `{X}`to color the ascii, with X > 0.
- You can pass the flag `-c, --ascii-colors 2 5 ...` to set your own colors.
- Look at the color palette to know the color order

![](https://i.imgur.com/NFT4WL4.png)
122 changes: 122 additions & 0 deletions .github/wiki/Command-line-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
```man
Usage: onefetch [OPTIONS] [INPUT]

Arguments:
[INPUT]
Run as if onefetch was started in <input> instead of the current working directory

Options:
--ascii-input <STRING>
Takes a non-empty STRING as input to replace the ASCII logo

It is possible to pass a generated STRING by command substitution

For example:

'--ascii-input "$(fortune | cowsay -W 25)'

-a, --ascii-language <LANGUAGE>
Which LANGUAGE's ascii art to print

-c, --ascii-colors <X>...
Colors (X X X...) to print the ascii art

-d, --disabled-fields <FIELD>...
Allows you to disable FIELD(s) from appearing in the output

-i, --image <IMAGE>
Path to the IMAGE file

--image-protocol <IMAGE_PROTOCOL>
Which image protocol to use

[possible values: kitty, sixel, iterm]

--color-resolution <VALUE>
VALUE of color resolution to use with SIXEL backend

[default: 16]
[possible values: 16, 32, 64, 128, 256]

--no-bold
Turns off bold formatting

--no-merges
Ignores merge commits

--no-color-palette
Hides the color palette

-n, --number-of-authors <NUM>
NUM of authors to be shown

[default: 3]

-e, --exclude <EXCLUDE>...
gnore all files & directories matching EXCLUDE

--no-bots [<REGEX>]
Exclude [bot] commits. Use <REGEX> to override the default pattern

-l, --languages
Prints out supported languages

-p, --package-managers
Prints out supported package managers

-o, --output <FORMAT>
Outputs Onefetch in a specific format

[possible values: json, yaml]

--true-color <WHEN>
Specify when to use true color

If set to auto: true color will be enabled if supported by the terminal

[default: auto]
[possible values: auto, never, always]

--show-logo <WHEN>
Specify when to show the logo

If set to auto: the logo will be hidden if the terminal's width < 95

[default: always]
[possible values: auto, never, always]

-t, --text-colors <X>...
Changes the text colors (X X X...)

Goes in order of title, ~, underline, subtitle, colon, and info

For example:

'--text-colors 9 10 11 12 13 14'

-z, --iso-time
Use ISO 8601 formatted timestamps

-E, --email
Show the email address of each author

--include-hidden
Count hidden files and directories

-T, --type <TYPE>...
Filters output by language type

[default: programming markup]
[possible values: programming, markup, prose, data]

--generate <SHELL>
If provided, outputs the completion file for given SHELL

[possible values: bash, elvish, fish, powershell, zsh]

-h, --help
Print help information (use `-h` for a summary)

-V, --version
Print version information
```
44 changes: 44 additions & 0 deletions .github/wiki/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Onefetch is installed, then what?

### Usage

```sh
> onefetch /path/of/your/repo
```
Or

```sh
> cd /path/of/your/repo
> onefetch
```

### Misc

By @spenserblack
```sh
# Runs `onefetch -a Assembly`, `onefetch -a C`, etc.
onefetch -l | tr "[:upper:] " "[:lower:]-" | while read line; do echo "$line"; onefetch -a $line; done;
```
By @Quazar_omega

A little function to put in `.bashrc` to run onefetch whenever you cd into a repo, making sure that it's different from the last one you were in:
```sh
LAST_REPO=""
cd() {
builtin cd "$@";
git rev-parse 2>/dev/null;

if [ $? -eq 0 ]; then
if [ "$LAST_REPO" != $(basename $(git rev-parse --show-toplevel)) ]; then
onefetch
LAST_REPO=$(basename $(git rev-parse --show-toplevel))
fi
fi
}
```

By @mbrehin
```sh
# Add Git alias for onefetch.
git config --global alias.project-summary '!which onefetch && onefetch'
```
11 changes: 11 additions & 0 deletions .github/wiki/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Welcome to the onefetch's wiki!
- **[Home](https://github.com/o2sh/onefetch/wiki)**
- **General**
- [Installation](https://github.com/o2sh/onefetch/wiki/installation)
- [Getting started](https://github.com/o2sh/onefetch/wiki/getting-started)
- **Options**
- [Command-line options](https://github.com/o2sh/onefetch/wiki/command-line-options)
- **Images**
- [Images in the terminal](https://github.com/o2sh/onefetch/wiki/Images-in-the-terminal)
- **Ascii**
- [Ascii file format](https://github.com/o2sh/onefetch/wiki/ascii-art)
23 changes: 23 additions & 0 deletions .github/wiki/Images-in-the-terminal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Onefetch supports displaying images using [`kitty`](https://sw.kovidgoyal.net/kitty/graphics-protocol.html), [`Sixel`](https://en.wikipedia.org/wiki/Sixel) and [`iTerm`](https://www.iterm2.com/documentation-images.html).

<p align="center">
<img src="https://raw.githubusercontent.com/o2sh/onefetch/main/assets/screenshot-1.png" height="250px">
</p>

When running `onefetch --image ./My-picture.jpg`, the program looks for the first `Image Backend` supported by the terminal and use it to display the requested image instead of the Ascii logo.

If you decide to go manual, and want to force the use of a specific image backend --> `onefetch --image ./My-picture.jpg --image-backend sixel|kitty|iterm`

### Sixel

The Sixel protocol is handled by multiple terminal emulators such as [`xterm`](https://invisible-island.net/xterm/) (enabled via flag `-ti 340`), [`mlterm`](https://wiki.ubuntu.com/Mlterm) and [`WezTerm`](https://github.com/wez/wezterm) which are actively maintained.

You can increase the color resolution using the `--color-resolution` flag.

### Kitty

The kitty terminal graphics protocol used on the terminal of the same name allows the program running in the terminal, to render graphics to the screen of the terminal emulator.

### ITerm

The iTerm inline image protocol supported by iTerm2 (also WezTerm) allows to display images within the terminal.
Loading