Skip to content
This repository was archived by the owner on Sep 10, 2023. It is now read-only.

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extensionator

Ever come across some files that don't have an extension? example

In *nix systems, it doesn't really matter, but in Windows, it can be troublesome when you want to open them with a specific program.

Extensionator will help you add extensions to files automatically based on their mime type. It does require the file command to be installed, which usually comes with git-for-windows (if you told it to add the bash tools to your path).

Installation

This tool is not published to PyPI, so you'll have to install it directly from the repo.

$ pip install git+https://github.com/ethanavatar/extensionator.git

Usage

$ python -m extensionator --help
usage: extensionator [-h] {file,dir} ...

Add extensions to files that don't have an extension based on their mime type.

positional arguments:
  {file,dir}  Command to run
    file      Add extensions to a single file
    dir       Add extensions to all files in a directory

optional arguments:
  -h, --help  show this help message and exit

Convert a single file

$ python -m extensionator file path/to/file

Convert all files in a directory

$ python -m extensionator dir path/to/dir/of/files

About

Add extensions to files that don't have an extension based on their mime type.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages