Coder Social home page Coder Social logo

metaory / xico Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 35 KB

๐Ÿ‘ป xico - make images from unicode characters

Home Page: https://github.com/metaory/xico

License: MIT License

Shell 97.21% sed 2.79%
cli command-line font-glyph font-glyphs icon-gen icon-generation icon-generator svg-cli svg-font svg-generator svg-icon svg-icons svg

xico's Introduction

XICO

NAME
	xico - make images from unicode characters or user custom config


SYNOPSIS
	xico [-h | --help] [-c | --config FILE] [-i | --input CHAR [-] FILE];


DESCRIPTION
	xico is a simple cli tool to make images from unicode glyphs

	with no FILE, or when FILE is -, read standard input

	output can only be png or svg

	define a collection of jobs in user config "$XDG_CONFIG_HOME/xico/xico.conf"

	or specify alternative configuration file to use with "-c | --config FILE"


OPTIONS
	-i, --input <CHAR> <FILE>	image character & destination-path
	-c, --config <FILE>		specify alternative configuration file to use
	-h, --help			display help
	 # -b, --background		[TODO] image background color
	 # -f, --foreground		[TODO] image foreground color
	 # -s, --size			[TODO] image size


EXAMPLES
	# convert one character
	xico -i ๐บ lambda.png

	# process with user configuration file
	xico

	# process with alternative configuration file
	xico -c awesome-xico.conf


CONFIGURATION
	xico looks for the configuration file at the following paths
		1. "$XDG_CONFIG_HOME/xico/xico.conf"
		2. "$XDG_CONFIG_HOME/xico.conf"
		3. "$HOME/.xico.conf"

	simple key value options with at least one blank character (<Space> or <Tab>)

	this section documents the root level of the configuration file

	# default size (mm)
	size 	500

	# default bg (rgba|transparent)
	bg 	transparent

	# default font (monospace)
	font 	monospace

	# define logical groups

	# relative to working directory
	โจท 	./error.png
	๐žต 	./foo/micro.png

	# absolute path
	แฎท 	~/dev/acme/assets/ico/head_1.png
	แณ… 	~/dev/acme/assets/ico/head_2.png

	# use env variables
	๐‘ฃ 	/tmp/curve_${RANDOM}.png
	๐‘ฃ‰ 	${XDG_CONFIG_HOME}/xyzzy/curve.png

	# the missing directories will be created
	๐ฐ 	~/pics/fuga/edge_1.png
	๐ฐ’ 	~/pics/fuga/edge_2.png

	# set a base path for remaining items
	base 	~/pics/widgets

	# the example bellow will write to
	# 	~/pics/widgets/char_a.png
	# 	~/pics/widgets/char_e.png
	# 	~/pics/widgets/char_f.png

	๐‘ขด 	char_a.png
	๐‘ขฆ 	char_e.png
	๐‘ขข 	char_f.png

	# reset the base path
	base 	~/.config/frob

	# the example bellow will write to
	# 	~/.config/frob/hoge.png
	# 	~/.config/frob/state/nyoro.png

	ใŸ 	hoge.png
	ใƒ† 	state/nyoro.png


ENVIRONMENT.VARIABLES
	XICO_SILENT    | less verbose
	XICO_DEBUG     | debug mode


SEE.ALSO
	inkscape(1)


AUTHOR
	metaory <metaory@gmail.com>, Apr 2024

Requirements


Installation

  • clone repo
  • give execution permissions
  • place it in your path
# Clone the repo
git clone git@github.com:metaory/xico.git

# Navigate to repo
cd xico

# Give execution permissions
chmod +x xico

# Link it somewhere in your PATH
ln -sfv xico /usr/bin/xico

# Use it anywhere

# Usage
xico --help

TODO

  • Makefile
  • Attributes; bg, fg, font, size
  • Fallback engines for Inkscape, Cairo, Convert, ...

โ–€โ–„โ–€โ€ƒโ–ˆโ€ƒโ–ˆโ–€โ–€โ€ƒโ–ˆโ–€โ–ˆ
โ–ˆโ–‘โ–ˆโ€ƒโ–ˆโ€ƒโ–ˆโ–„โ–„โ€ƒโ–ˆโ–„โ–ˆ

License

MIT

xico's People

Contributors

metaory avatar

Stargazers

Tony Thomas avatar Titan Abriansyah Indihatmoko avatar  avatar

Watchers

 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.