Skip to content

MArtytraM99/ConWinTer

Repository files navigation

ConWinTer

Console Windows Converter (or ConWinTer for short) is a commandline application for converting files from one format to another. Main focus is on image files but it can convert xlsx (Excel) files to plain csv. ConWinTer is capable of converting svg file to png and other.

This repo also provides a .reg file that adds support for converting files just by right-clicking a file and selecting output format. For more information see Explorer context menu section.

The core functionality i.e. converting files is cross-platform only mentioned right-click conversion feature is Windows only.

Usage

ConWinTer supports a few options for specifying input and output. Run ConWinTer.exe --help for more infomation.

Image options

  1. -i, --input <path> is a required option taking one argument. Argument is a path to image that should be converted. Image format is deduced from path extension (supported extensions are listed below).
  2. -o, --output <path> is a non-mandatory option taking one argument. Argument is a target path for image output. When -f or --output-format is not specified then image format is deduced from path extension. If this option is omitted then target path is same as input path with extension specified by --output-format.
  3. -f, --output-format <format> is a non-mandatory option taking one argument. Argument is a format that should be used as an output (supported formats/extensions are listed below).

Excel options

Basicly same as Image options

Supported extensions

Different extensions are supported as input and output

Images

Input: .png, .jpg, .bmp, .gif, .dib, .tif, .tiff, .ico, .svg, .ppm, .pgm, .pbm

Output: .png, .jpg, .bmp, .gif, .dib, .tif, .tiff, .ico

Excel

Input: .xlsx

Output: .csv (different separators are supported, use csv; as output format to use semicolon as separator or csvt to use tab)

Examples

Example 1:

ConWinTer.exe image --input C:\Images\image.jpg --output C:\Documents\converted.png

Converts image located at C:\Images\image.jpg to png and saves it to C:\Documents\converted.png.

Example 2:

ConWinTer.exe image -i C:\Images\image.jpg -o C:\Documents\converted.png

Does same operation as Example 1 but it uses shorter notation.

Example 3:

ConWinTer.exe image --input C:\Images\image.jpg --output-format png

Converts image located at C:\Images\image.jpg to png and saves it to same directory as source image (C:\Images\image.png).

Example 4:

ConWinTer.exe image -i C:\Images\image.jpg -f png

Does same operation as Example 3 but it uses shorter notation.

Example 5:

ConWinTer.exe excel --input C:\Documents\excel_file.xlsx --output C:\Documents\output.csv

Converts Excel file at C:\Documents\excel_file.xlsx to csv(s) - one for each worksheet - and saves it to C:\Documents\output_<sheet name>.csv where <sheet name> will be replaced by actual name of corresponding sheet.

Example 6:

ConWinTer.exe excel -i C:\Documents\excel_file.xlsx -f csv;

Converts Excel file at C:\Documents\excel_file.xlsx to csv(s) using semicolon as separator.

Explorer context menu

Context menu in File Explorer

For faster and easier use via the File Explorer Context Menu (right-click menu) this repo contains context_menu.reg file.

This feature is Windows only and was tested on a Windows 10 machine.

Setup

  • Add path to ConWinTer.exe inside PATH environment variable. For example if the exe file is in C:\ConWinTer\ConWinTer.exe then C:\ConWinTer should be added to PATH environment variable.
  • Run (simply by double-clicking) context_menu.reg file. This will ask for admin privileges and add file associations to registry.

If you setup everything correctly then all files ending with an extension that is supported as input will show menu for converting on right-click.

License

Licensed under the MS-PL license.

This project has dependencies on other open-source projects. These projects are referenced via NuGet packages and might be subject to different licenses.

Project Author Sources License
SVG.NET svg-net GitHub MS-PL
command-line-api dotnet GitHub MIT
ClosedXML ClosedXML GitHub MIT

About

Console Windows Converter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages