Giter Site home page Giter Site logo

surajwate / count-files Goto Github PK

View Code? Open in Web Editor NEW

This project forked from victordomingos/count-files

0.0 0.0 0.0 2.93 MB

A CLI utility written in Python to help you count files, grouped by extension, in a directory. By default, it will count files recursively in current working directory and all of its subdirectories, and will display a table showing the frequency for each file extension (e.g.: .txt, .py, .html, .css) and the total number of files found.

Home Page: https://no-title.victordomingos.com/projects/count-files/

License: MIT License

Python 99.84% HTML 0.16%

count-files's Introduction

English | Português | Русский | Українська

Count Files Github commits (since latest release) PyPI PyPI - Downloads

A command-line interface (CLI) utility written in Python to help you counting or searching files with a specific extension, files without an extension or all files regardless of the extension, in the specified directory.

Count Files_screenshot - counting files by extension

Documentation

Dependencies

To run this application, you need to have a working Python 3.6+ installation.

Installation

On regular desktop operating systems

Count Files is a platform-independent application that run in Python and can be easily installed using pip:

pip3 install count-files

If you are interested in the current development version, you can simply clone this git repository and install it using pip3 install -e. Please notice, however, that only released versions are expected to be stable and usable. The development code is often unstable or buggy, for the simple reason that it is a work in progress.

On iPhone or iPad (in Pythonista 3 for iOS)

It may also be used on iOS (iPhone/iPad) using the StaSh command-line in the Pythonista 3 app. Please see documentation for further instructions.

How to use

To check the list of available options and their usage, you just need to use one of the following commands:

count-files -h
count-files --help

By default, the program counts or searches for files recursively in current working directory and all of its subdirectories.
For fully supported operating systems (Linux, macOS, iOS, Windows), any hidden files or folders are ignored by default. For other operating systems in which Python can be run, this option to include/exclude hidden files is not available. And as a result, all existing files will be included.
The names of extensions are case insensitive by default. The results for ini and INI will be the same.
Optionally, you can pass it a path to the directory to scan, choose non-recursive counting or searching, process the file extensions with case-sensitive mode and enable search or counting in hidden files and folders.

See more about CLI arguments in English, Portuguese, Russian, Ukrainian.

The most simple form of usage is to type a simple command in the shell, without any arguments. It will display a table showing the frequency for each file extension (e.g.: .txt, .py, .html, .css) and the total number of files found.

count-files

Another main feature of this application consists in searching files by a given extension, which presents to the user a list of all found files paths.

count-files -fe txt [path]
count-files --file-extension txt [path]

You can also count the total number of files with a certain extension, without listing them.

count-files -t py [path]
count-files --total py [path]

For information about files without an extension, specify a single dot as the extension name.

count-files -fe . [path]
count-files --file-extension . [path]
count-files -t . [path]
count-files --total . [path]

If you need to list or to count all the files, regardless of the extension, specify two dots as the extension name.

count-files -fe .. [path]
count-files --file-extension .. [path]
count-files -t .. [path]
count-files --total .. [path]

You can also search for files using Unix shell-style wildcards: *, ?, [seq], [!seq].

count-files -fm *.py? [path]
count-files --filename-match *.py? [path]

Did you find a bug or do you have a suggestion?

Please, open a new issue or a pull request to the repository.

count-files's People

Contributors

victordomingos avatar

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.