Coder Social home page Coder Social logo

file2base64's Introduction

File Converter to Base64

Converts any type of file to base64 string.

How to use it?

file2Base64 <file_input> [-o <output_file>] [-v] [-t]

  • file_input: Path of the file to be converted to base64. (required)
  • -o: Path of the output file (optional)
  • -t: Flag to indicate if the result will include the type of the file. I.e.: data:image/png;base64,.... (optional, default: true)
  • -v: Flag to indicate if the result will be also printed on the console when the output file is specified. (optional, default: true)
  • -version: Shows the current version of binary. (optional)

Install

Install on $GOBIN

From Code

make install

From Releases

  • Download the version for your OS
  • Copy the binary to $GOBIN

NOTE: Don't forget add $GOBIN to $PATH.

Build

  • With Makefile: make <OS>, where <OS> can be any of the following options:

    • windows
    • linux
    • darwin

    Makefile also support especify the architecture of the build, only needs set the flag arch with the supported architecture by go:

    make <OS> [arch=<GOARCH>]

    I.e. make linux arch=arm64

  • With Go:

    • go build -ldflags "-X main.version=0.0.1" -o "output_path[.exe]"

file2base64's People

Watchers

James Cloos avatar Rey David Dominguez Soto avatar  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.