Find the percentage of programming languages used in your project
Project description
Polyglot
Find the percentage of programming languages used in your project
📖 Documentation
·
Report a Bug
·
Request Feature
Table of Contents
🙉 About The Project
Find the percentage of programming languages used in your project
⚡ Getting Started
In order to get started, please install pip
.
📝 Prerequisites
- pip
sudo apt-get install python3-pip
Learn more about pip here
⬇️ Installation
- Install pip packages
# install the python-polyglot package using pip
pip3 install python-polyglot
🎉 Usage
Once Polyglot is all setup and good to go, implementing is easy as pie.
🔰 Initial Setup
You can initialize Polyglot with the example below:
from polyglot.core import Polyglot
dirname = "path/to/directory"
polyglot = Polyglot(dirname)
polyglot.show(display=True)
+-------------------------+---------+-------+-------+
| Language | Files | Total | Blank |
+-------------------------+---------+-------+-------+
| Unknown file | 13.89 % | 5 | 0 |
| YAML | 2.78 % | 1 | 0 |
| GCC Machine Description | 8.33 % | 3 | 0 |
| Text | 13.89 % | 5 | 0 |
| Python | 55.56 % | 20 | 0 |
| TOML | 2.78 % | 1 | 0 |
| JSON | 2.78 % | 1 | 0 |
+-------------------------+---------+-------+-------+
+-------------------------+---------+-------+-------+
| Language | Lines | Total | Blank |
+-------------------------+---------+-------+-------+
| Unknown file | 29.67 % | 3491 | 101 |
| YAML | 58.35 % | 6865 | 1 |
| GCC Machine Description | 2.97 % | 349 | 90 |
| Text | 0.31 % | 36 | 4 |
| Python | 8.07 % | 949 | 205 |
| TOML | 0.59 % | 70 | 14 |
| JSON | 0.04 % | 5 | 0 |
+-------------------------+---------+-------+-------+
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature
) - Commit your Changes (
git commit -m 'Add some features'
) - Push to the Branch (
git push origin feature
) - Open a Pull Request
📰 License
Distributed under the MIT license. See LICENSE
for more information.
📞 Contact
Pranav Baburaj - pranavbaburaj@zohomail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_polyglot-4.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ca5f9946673d967897c875b9d120049bd5089b77efd20d8cfb247e9fc6f4f59 |
|
MD5 | 1cb98c4c556d4a80b232b0af910bfcc6 |
|
BLAKE2b-256 | 8e7db04bb2e307ffe8435ccaec977e1adac63a48018ae0ff3ce4d982c7d9a0f6 |