Code Monkey home page Code Monkey logo

file2png's Introduction

file2png

file2png is a rewrite of the bash script with the same name.

The original script was at this link.

Why a rewrite?

The bash scripts requires coreutils and Imagemagick. This are common on a *UNIX system, but not very common on Windows. This rewrite was built with cross-platform libraries so it should work on every system where you can find Rust.

I tried to keep the dependencies as low as possible, that's why I used argh and regress instead of the more popular clap and regex crates.

Installing file2png

To install file2png, you can use cargo install file2png or build it from source.

To build from source, first

git clone https://github.com/meguminloli/file2png

To build it for release,

cargo build --release

To debug it,

cargo build

On my system, the build (with all the dependencies) takes less than 12 seconds in release.

For smaller binaries and maybe improved performance, check out min-sized-rust.

Usage

To store a file as a png:

file2png store <input> <output>

To append comments to resulting metadata:

file2png store <input> <output> --comments <comment> --comments <comment> ..

To restore a png:

file2png restore <input>

This will restore the png to the original file name. To choose the resulting file name

file2png restore <input> --output <output>

To check the metadata

file2png info <input>

Benchmarks

Store performance Info performance Restore performance

Licensing

This project is licensed under GPLv3, because the original script was under the same license.

Have fun!

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.