o2sh / onefetch Goto Github PK
View Code? Open in Web Editor NEWCommand-line Git information tool
Home Page: https://onefetch.dev
License: MIT License
Command-line Git information tool
Home Page: https://onefetch.dev
License: MIT License
Some of our ascii logos look a bit out of shape...
plz help ಥ_ಥ
Don't hesitate to add more languages, if you feel inspired 💯
Just do it
Hey, it’d be cool to have support for the Nim programming language.
https://github.com/nim-lang/nim
Title says it all:
Thanks for the project, it's a very cool idea :-)
Some of our ascii logos look a bit out of shape...
plz help ಥ_ಥ
Don't hesitate to add more languages, if you feel inspired.
Bye.
ฅ^•ﻌ•^ฅ
Currently, the colors used for each language are hard coded in a vector:
Language::Clojure => vec![Color::BrightBlue, Color::BrightGreen]
We would like to give the user the possibility to set his own colors by passing a flag:
onefetch --ascii_colors 1 2 3 4 5 6
Inspired from a neofetch's feature , it would be helpful to add a visual marker at the bottom right to tell the user the color order (1: red, 2: green...) as such :
This feature is for the brave only 🥇
We would like to display the number of files present in a repo.
That information should be displayed along side the "Repository size", as such:
Repository size: 31.63 MiB (307 files)
You can use git-ls-files
to get the list of files and then count it.
💯 🥇
We should add support for HolyC and make it so that the ascii logo of HolyC looks like it's in the TempleOS font; it should probably have a cross too. And I think its colours should be yellow, white, and cyan
As suggested in #70,
It's time to split the main.rs file into multiple files/modules.
Feel free to re-organize the code in a way that improves the navigation inside the project overall.
Thx 💯 🥇
As of today, the distance/spacing between the ASCII logo and the info bloc is quite inconsistent among the different languages:
The idea would be too have the same spacing for all and no left indentation (and no top/bottom empty lines).
It has to be a code base solution, some kind of pre-processing of the ascii files in rust. So that we won't have to retouch by hand every art that will be submitted/done in the future.
💯 🥇
We would like to allow users to disable one (or many) info line(s) from appearing in the output via a command line flag:
onefetch --disable size version
💯
https://github.com/github/linguist
Linguist is a tool developed by GitHub for the specific purpose of detecting languages. It's a very mature tool that gets it right the majority of the time by using complex rules.
For repositories using multiple languages, like this one:
We would like to limit the number of language_stat
to N (6 for example), like GH does:
Which means adding a seventh language_stat
named Other with the cumulated % of the remaining languages.
💯 🥇
In terminal emulators with light backgrounds, most of onefetch
s output is unreadable.
It would be nice if onefetch could parse .gitattributes
and respect linguist-documentation
rules.
E.g: onefetch believes that a project of mine (ANESE) is written primarily in assembly, when it's actually written entirely in C++. This is most likely caused by the large collection of .asm test files included in the repo.
Github allows marking directories / files as documentation (not code) via the linguist-documentation
attribute in a repo's .gitattributes
file.
See http://schacon.github.io/git/gitattributes.html and https://www.rubydoc.info/github/github/linguist for details.
What I think would be really nice to have are extra repository stats.
For example if the project is from a Github repository, that Onefetch could show, thanks to the Github API, the following things:
(Request from my tweet)
Executing onefetch -h
causes onefetch to treat -h
as a directory.
Since clap is already needed to compile due to your tokei dependency, you might want to make use of clap so that onefetch -h
would print a help message.
It would be awesome if this could be installed with a package manager.
Looking forward to merging your PR 👍 ! Just one quick question:
Why move cargo build
below cargo test
? Tests require a successful build. If the project has not been built, cargo test
will build it, so building after tests have run successfully is a bit redundant.
Originally posted by @spenserblack in #110
This is still unresolved, as we did not decide if we should move cargo test
arround, or make the build a release build, becaus of maybe some different output in dependencies.
I made a homebrew formula for this: Cj-bc/homebrew-onefetch
Actually it's not so good(ex: doesn't use 'make' to install), but It should work.
I wonder this helps someone ;)
$ history
[...]
516 git clone [email protected]:o2sh/onefetch.git
517 cd onefetch
518 make install
Compiling onefetch v1.6.5 (/Users/jbanks/onefetch)
error[E0425]: cannot find function `enable_ansi_support` in crate `ansi_term`
--> src/main.rs:449:37
|
449 | if cfg!(windows) && !ansi_term::enable_ansi_support().is_ok() {
| ^^^^^^^^^^^^^^^^^^^ not found in `ansi_term`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0425`.
error: could not compile `onefetch`.
To learn more, run the command again with --verbose.
make: *** [build] Error 101
Create a function that will scan a project and determine the dominant language (the language is currently hardcoded in the main function)
An idea would be to scan all files based on a set of extension (rs for rust, py for python) and find which extension represents most of the lines of code (in case of a multiple language project).
We would like to allow users to pick which language's ascii art to print.
By default, the ascii art corresponds to the main language of the repo.
With this feature, the user can choose which art to display:
onefetch --ascii_language rust
which will show the rust logo even if the main language isn't rust.
💯
By default, all info_name (Project, HEAD, version, etc.) and the ASCII art are displayed in Bold.
We would like to have a command line flag to disable boldness on all characters, something like:
onefetch --bold off //disable bold
onefetch --bold on //enable bold (equivalent to just onefetch)
💯 🥇
Some of our ascii logos look a bit out of shape...
plz help ಥ_ಥ
Don't hesitate to add more languages, if you feel inspired 💯
I would like a Nix derivation, so one can build with nix-build, and maybe someone could even get it into nixpkgs, so it is available on any system running nix.
This feature would need a Cargo.lock file, and a default.nix, I will see that I build that files
This is what it looks like on rust-analyzer
.
�[1;37mProject: �[0mrust-analyzer
�[37m ` :y.`yy`.y: `�[0m �[1;37mHEAD: �[0m0cce2bc (master, origin/master, origin/staging)
�[37m -``MNsNMMNNNNMMNsNM``-�[0m �[1;37mVersion: �[0mguide-2019-01
�[37m ` -MMNMMMMNNm``NNNMMMMNMM- `�[0m �[1;37mCreated: �[0m1 year, 10 months ago
�[37m `NNNMMMdo:` `+md/ `:odMMMNNN`�[0m �[1;37mLanguages: �[0mRust (96.38 %) TypeScript (3.57 %) JavaScript (0.04 %)
�[37m -ssNMMNo. .oNMMNss-�[0m Shell (0.01 %)
�[37m `mMM�[0m�[91mMMNmmmmmmmmmmmmmmmdy+`�[0m�[37m `sMMMm`�[0m �[1;37mAuthors: �[0m40% Aleksey Kladov 2128
�[37m `mMMM�[0m�[91mMMMMMMMMMMMMMMMMMMMMMMN/�[0m�[37m hMMMMm`�[0m �[1;37m �[0m25% bors[bot] 1313
�[37m -oMN-:Ny:�[0m�[91mmMMMMMm oNMMMMMm�[0m�[37m oN::MMo-�[0m �[1;37m �[0m5% Florian Diebold 296
�[37m.yMMMhhh+ �[0m�[91mdMMMMMd:::::+mMMMMN/�[0m�[37m odyhMMMy.�[0m �[1;37mLast change: �[0m4 hours ago
�[37m-sNMMy �[0m�[91mdMMMMMMMMMMMMMMMMs`�[0m�[37m `yMMNs-�[0m �[1;37mRepo: �[0mhttps://github.com/rust-analyzer/rust-analyzer.git
�[37m-sNMMy �[0m�[91mdMMMMMNyyyydMMMMMMy�[0m�[37m .odMMNs-�[0m �[1;37mCommits: �[0m5227
�[37m.yMMMm �[0m�[91mdMMMMMh +MMMMMM+�[0m�[37m sMMMMMy.�[0m �[1;37mLines of code: �[0m61872
�[37m -oMMM�[0m�[91mMMMMMMMMMMMMMM+ mMMMMMMMMMM�[0m�[37mMMMo-�[0m �[1;37mSize: �[0m18.96 MiB (889 files)
�[37m `mMMM�[0m�[91mMMMMMMMMMMMMMM+ :NMMMMMMMMM�[0m�[37mMMMm`�[0m �[1;37mLicense: �[0mApache License 2.0
�[37m `mMMMm `-:o+:/mMMMm`�[0m
�[37m -ssNMMMyomo smohMMMNss-�[0m
�[37m `NNNMs+mN/-` `-/Nd/yMNNN`�[0m
�[37m ` -MMNMMMMMNmmmmNMMMMMNMM- `�[0m
�[37m -``MNsNMMNMMNMMNsNM``-�[0m
�[37m ` :y.`yy`.y: `�[0m
Like neofetch (written in bash), we would like to implement multicolor ASCII logos to better match their original design.
This might be tricky...
As suggested by @mstruebing in #70,
It's time to split the main.rs file into multiple files/modules.
Feel free to re-organize the code in a way that improves the navigation inside the project overall.
Thx 💯 🥇
Create a function that will scan a project and retrieve its License (MIT, GPL...).
The license is currently hardcoded in the main function...
Create a function that will scan a project and retrieve its information: Name, Author, Number of lines, License...
These info are currently hardcoded in the main function...
Pretty please
Hello! Should onefetch report data from the remote repository (number of stars, number of issues, etc.)? Or is onefetch planned to focus mainly on local repository data?
Some projects pull in other large subprojects as submodules (think of LLVM in the Rust compiler source). This can dwarf the statistics, making them less useful.
This could either be added as a feature to tokei, or use the output of a git submodule command to generate a list of exclusions to give to it.
Current display:
In addition to their names, we would like to display the number of commits (number and percentage of total commits), in the same spirit of git summary:
💯 🥇
We would like to display the repo's age.
That information should be displayed along side the "Project" name, as such:
Project: onefetch, created 1 year, 1 month ago
You can use git log --reverse --pretty=oneline --format="%ar"
to fetch the repository age from oldest commit
💯 🥇
Hello, there!
Could support for Perl be added?
Hey over here 👋
Just wondering, do you think it would be possible to specify a path directly on the command line ?
onefetch /some/incredible/project/sources/
Sometimes we just want to output some info, without having to move into the effective target.
For your underneath git usages, the -C
option could do the job !
Thanks, bye 🙇♂️
We would like to add a command line flag to display all supported languages,
Something like:
onefetch -s (--support)
💯 🥇
As of today, the distance/spacing between the ASCII logo and the info bloc is quite inconsistent among the different languages:
The idea would be too have the same spacing for all and no left indentation.
💯 🥇
We would like to display the name of the current local branch as part of the project information.
Same thing for the disk size of the Project (tip: git count-objects -vH).
Feel free to be creative in the way you want to display those infos (espacially the branch).
:)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.