Git Product home page Git Product logo

onefetch's People

Contributors

alessandroasm avatar aluft-logi avatar andymac-2 avatar atluft avatar axdiamond avatar byron avatar ccmetz avatar dependabot[bot] avatar ebroto avatar emanon42 avatar ferryistaken avatar geeseven avatar github-actions[bot] avatar goosedb avatar hallerpatrick avatar kaindljulian avatar kloenk avatar ktsuench avatar luke-zhang-04 avatar maash3r avatar o2sh avatar pablodiegoss avatar phundrak avatar rogercyyu avatar sh3mm avatar shuni64 avatar spenserblack avatar xynxynxyn avatar yoichi avatar zapanton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onefetch's Issues

Set Custom colors via flag

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 :

DeepinScreenshot_select-area_20191012000557

This feature is for the brave only 🥇

Display git version + username

On top of the repository infos, we would like to show general information (not specific to the repo), like git username (git config user.name) and the version of Git installed on the machine (git --version). Something like -->

Untitled

💯 🥇

Add number of files to Repository size

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.

💯 🥇

Support for Dart

Could support for the Dart programming language be added?

Adding Dart support would also make this program compatible with repositories containing Flutter apps.

[Code organization] Split main.rs into modules

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 💯 🥇

[Pre-procesing]Keep the same spacing between the ASCII art and the info lines

As of today, the distance/spacing between the ASCII logo and the info bloc is quite inconsistent among the different languages:

  • Perl (too much spacing and presence of left indentation):

61182863-f91f6e00-a628-11e9-9856-8e9b3e1b928f

  • Swift (no spacing and left indentation):

56481406-0a088980-64e9-11e9-9e81-09f00b2414cb

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.

💯 🥇

Limt the number of language statistics

For repositories using multiple languages, like this one:

DeepinScreenshot_select-area_20191026152815

We would like to limit the number of language_stat to N (6 for example), like GH does:

DeepinScreenshot_select-area_20191026153248

Which means adding a seventh language_stat named Other with the cumulated % of the remaining languages.

💯 🥇

.gitattributes + linguist support?

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.

Additional repository statistics

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:

  • # issues,
  • # stars,
  • most important contributors,
  • latest release version

(Request from my tweet)

Reduce the Commit Hash to 7 characters

This one should be simple enough, we would like to shorten the commit hash to only 7 characters:

onefetch-commit-hash

64fc1d8e34d4f7cefa7a60a83125a7d6f199a --> 641fc1d

Good luck 🥇

Add -h command-line option for usage

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.

Cargo install

It would be awesome if this could be installed with a package manager.

cargo test after cargo build, or cargo build --release

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.

master (1ba028659c) failing to build on MacOS 10.14.6 (18G103)

$ 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

Implement logic for dominant language

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).

Choose Which Language's ascii art to print

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.

💯

Add flag to disable/enable bold characters

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)

💯 🥇

nix derivation

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

Output is terrible on windows

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

Multicolor ASCII

Like neofetch (written in bash), we would like to implement multicolor ASCII logos to better match their original design.

This might be tricky...

License detection

Create a function that will scan a project and retrieve its License (MIT, GPL...).

The license is currently hardcoded in the main function...

Implement logic for project Information

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...

Add ability to ignore git submodules

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.

Display the creation date of the repo

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

💯 🥇

Specify path on the command line

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 🙇‍♂️

List all supported languages

We would like to add a command line flag to display all supported languages,
Something like:

onefetch -s (--support)

💯 🥇

Keep the same spacing between the ASCII art and the info lines

As of today, the distance/spacing between the ASCII logo and the info bloc is quite inconsistent among the different languages:

  • Perl (too much spacing and presence of left indentation):

61182863-f91f6e00-a628-11e9-9856-8e9b3e1b928f

  • Swift (no spacing and left indentation):

56481406-0a088980-64e9-11e9-9e81-09f00b2414cb

The idea would be too have the same spacing for all and no left indentation.

💯 🥇

Replace Ascii art with custom image

It's quite a long shot, but here we go...

It would be nice if a user could choose to display an image (*png, *jpg) instead of the ascii art.

This would be done via flag, as such:

onefetch --source ~/pictures/my-picture.png

tempsnip

For the brave only 💯 🥇

Add Name of current Local Branch and Disk Size

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).

:)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.