2 releases

0.1.1 Jan 20, 2023
0.1.0 Jan 20, 2023

#5 in #onefetch

Download history 8/week @ 2024-02-20 46/week @ 2024-02-27 1/week @ 2024-03-05 14/week @ 2024-03-12

65 downloads per month
Used in punfetch

MIT license

5KB
74 lines

logo

crate downloads license ci publish

A blazingly fast system fetch program to pair with onefetch


preview

View the complete ascii art collection at punfetch.dev


Installation

Install from crates.io

cargo install punfetch

Build from source

git clone https://github.com/ozwaldorf/punfetch.git
cd punfetch
make install

Usage

CLI

$ punfetch -h
A blazingly fast system fetch program to pair with onefetch.

Usage: punfetch [OPTIONS]

Options:
      --distro <DISTRO>    Distribution to search art for (e.g. "Manjaro" or "Ubuntu")
  -i, --image <IMAGE>      Image to display in place of the distro art
      --show-logo <WHEN>   Show the logo [default: always] [possible values: always, never, auto]
      --color-mode <MODE>  Color mode to use [default: hex] [possible values: hex, ansi, none]
      --color <COLOR>      Text color to use. Accepts ansi or hex color codes
  -h, --help               Print help
  -V, --version            Print version

Library

Punfetch is also a library to implement your own custom system fetchers! See the docs for more information and examples.

Makefile

Developing on the crate:

make clean       # Clean the project
make build       # Build the project
make run         # Run the project
make install     # Install the project
make test        # Run tests
make lint        # Run linter
make fmt         # Run formatter
make ci          # Precommit CI checks

Developing on punfetch.dev:

make init-pages   # Initialize pages
make patch-pages  # Patch vercel pages
make save-pages   # Save the diff patch
make dev          # Run the pages locally

Contributing

This project follows conventional commits

⚠️ Over 200 distributions are already supported, but many do not have colors defined. If your distro is not colored, please open a PR to update it!

Adding a new distribution

New distributions can easily be supported by adding a new entry to the distros.yaml file

"Examplo Linux":
  regex: "(examplo|examplo_old)" # Optional, regex to match against. Autogenerated if not provided.
  colors: # Optional, default fg will be used if not specified
    ansi:
      - white # The first color is used for the info text
      # - bright_green
      # - magenta
      # - etc,
    hex: # Optional, ansi colors will be used if not specified
      - "#ffffff"
  ascii: | # The ascii art to display!
    {0}         _nnnn_
    {0}        dGGGGMMb
    {0}       @p~qp~~qMb
    {0}       M|@||@) M|
    {0}       @,----.JM|
    {0}      JS^\__/  qKL
    {0}     dZP        qKRb
    {0}    dZP          qKKb
    {0}   fZP            SMMb
    {0}   HZM            MMMM
    {0}   FqM            MMMM
    {0} __| ".        |\dS"qML
    {0} |    `.       | `' \Zq
    {0}_)      \.___.,|     .'
    {0}\____   )MMMMMP|   .'
    {0}     `-'       `--'

If there are multiple patterns that could be used to identify the distribution, or the title of the distribution is lengthy, a regex should be provided. Patterns should be simple, lowercase, and A-z, 0-9 only.

Honorable mentions

@o2sh @spenserblack for creating onefetch

Contributors ❤️

contrib.rocks

(contrib.rocks)

Dependencies

~1.5MB
~32K SLoC