mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-09 02:45:33 +00:00
Nicer breakdown output
This commit is contained in:
18
README.md
18
README.md
@@ -47,11 +47,21 @@ These stats are also printed out by the `linguist` binary. You can use the
|
|||||||
You can try running `linguist` on the `lib/` directory in this repository itself:
|
You can try running `linguist` on the `lib/` directory in this repository itself:
|
||||||
|
|
||||||
$ bundle exec linguist lib/ --breakdown
|
$ bundle exec linguist lib/ --breakdown
|
||||||
100% Ruby
|
|
||||||
|
|
||||||
Ruby: ["linguist/blob_helper.rb", "linguist/classifier.rb", "linguist/file_blob.rb", "linguist/generated.rb",
|
100.00% Ruby
|
||||||
"linguist/heuristics.rb", "linguist/language.rb", "linguist/md5.rb", "linguist/repository.rb",
|
|
||||||
"linguist/samples.rb", "linguist/tokenizer.rb", "linguist.rb"]
|
Ruby:
|
||||||
|
linguist/blob_helper.rb
|
||||||
|
linguist/classifier.rb
|
||||||
|
linguist/file_blob.rb
|
||||||
|
linguist/generated.rb
|
||||||
|
linguist/heuristics.rb
|
||||||
|
linguist/language.rb
|
||||||
|
linguist/md5.rb
|
||||||
|
linguist/repository.rb
|
||||||
|
linguist/samples.rb
|
||||||
|
linguist/tokenizer.rb
|
||||||
|
linguist.rb
|
||||||
|
|
||||||
#### Ignore vendored files
|
#### Ignore vendored files
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ if File.directory?(path)
|
|||||||
puts
|
puts
|
||||||
file_breakdown = repo.breakdown_by_file
|
file_breakdown = repo.breakdown_by_file
|
||||||
file_breakdown.each do |lang, files|
|
file_breakdown.each do |lang, files|
|
||||||
puts "#{lang}: #{files}"
|
puts "#{lang}:"
|
||||||
|
files.each do |file|
|
||||||
|
puts file
|
||||||
|
end
|
||||||
|
puts
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif File.file?(path)
|
elsif File.file?(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user