-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from noclocks/develop
Develop
- Loading branch information
Showing
166 changed files
with
8,134 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+478 KB
images/clients/lchc/logo/JPEG/LCHC_long_logotype_box_hunter_orange.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+778 KB
images/clients/lchc/logo/JPEG/LCHC_stacked_logotype_box_hunter_orange.jpg
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+59.2 KB
images/clients/lchc/logo/PNG/LCHC_long_logotype_box_hunter_orange.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+115 KB
images/clients/lchc/logo/PNG/LCHC_stacked_logotype_box_hunter_orange.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
3,814 changes: 3,814 additions & 0 deletions
3,814
images/clients/lchc/logo/SVG/lchc-badge-forest.svg
Large diffs are not rendered by default.
Oops, something went wrong.
3,814 changes: 3,814 additions & 0 deletions
3,814
images/clients/lchc/logo/SVG/lchc-logo-badge-navy.svg
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
File renamed without changes
Oops, something went wrong.
File renamed without changes
Binary file added
BIN
+7.51 KB
logo/noclocks-logo-main-black-white-transparent-enhanced (120x120).png
Oops, something went wrong.
Binary file added
BIN
+19.5 KB
logo/noclocks-logo-main-black-white-transparent-enhanced (320x320).png
Oops, something went wrong.
Binary file added
BIN
+18.9 KB
logo/noclocks-logo-main-black-white-transparent-enhanced (500x500).png
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
#!/usr/bin/env bash | ||
# -*- coding: utf-8 -*- | ||
|
||
# ------------------------------------------------------------------------------ | ||
# _____ | ||
# / __ \ | ||
# _ __ _ __ __ _ `' / /'_____ ____ _ | ||
# | '_ \| '_ \ / _` | / / / __\ \ / / _` | | ||
# | |_) | | | | (_| |./ /__\__ \\ V / (_| | | ||
# | .__/|_| |_|\__, |\_____/___/ \_/ \__, | | ||
# | | __/ | __/ | | ||
# |_| |___/ |___/ | ||
# | ||
# ------------------------------------------------------------------------------ | ||
|
||
# ------------------------------------------------------------------------------ | ||
# | ||
# SCRIPT NAME: png2svg.sh | ||
# | ||
# DESCRIPTION: Perform basic conversion of PNG images into SVG format | ||
# | ||
# USAGE: | ||
# | ||
# Save this script locally as "png2svg.sh" and make it executable: | ||
# sudo chmod +x png2svg.sh | ||
# | ||
# Run the script in the following manner: | ||
# ./png2svg.sh <file.png> | ||
# | ||
# This script can be run without verbosity with the following: | ||
# sudo ./png2svg.sh --silent <file.png> | ||
# | ||
# Enable this script to have global execution availability by placing it | ||
# into /usr/local/bin (or somewhere else in your user's PATH). By doing | ||
# this, you can call "png2svg.sh" from anywhere on the system. | ||
# | ||
# ------------------------------------------------------------------------------ | ||
|
||
# ------------------------------------------------------------------------------ | ||
# VARIABLE DECLARATIONS & SET PIPEFAIL | ||
# ------------------------------------------------------------------------------ | ||
set -Eeo pipefail | ||
DEPENDS=("convert" "curl" "dos2unix" "potrace") | ||
DEPENDS_REQ="" | ||
V_X="" | ||
V_S="" | ||
# Remove the unused variable | ||
# INPUT_X="" | ||
INPUT_Y="" | ||
INFO_SRC="https://pastebin.com/raw/VAnFpDLH" | ||
VB_00="Beginning PNG conversion process. Please wait..." | ||
VB_01="ERROR: A valid PNG image was not detected in your input parameters!" | ||
VB_02="Please try again" | ||
VB_03=" USAGE EXAMPLES: " | ||
VB_04=" [ Verbose (Slow) ] --> ./png2svg.sh <file.png>" | ||
VB_04B=" [ Piped Input v1 ] --> echo <file.png> | ./png2svg.sh" | ||
VB_05=" [ Silent (Fast) ] --> ./png2svg.sh --silent <file.png>" | ||
VB_05B=" [ Piped Input v2 ] --> echo <file.png> | ./png2svg.sh --silent" | ||
VB_06=" [ Usage Examples ] --> ./png2svg.sh --help" | ||
VB_07=" [ General Info ] --> ./png2svg.sh --info" | ||
VB_08="ERR: Missing required package: " | ||
VB_09="The following required packages are not installed on your system: " | ||
VB_10="Terminating file conversion process." | ||
VB_11="Done!" | ||
|
||
#------------------------------------------------------------------------------# | ||
# FUNCTION DECLARATIONS | ||
|
||
function inputstream() { | ||
# Write all incoming data into an array, "INST", to allow for both | ||
# interactive and piped inputs in parent functions | ||
INST="" | ||
if [ -t 0 ]; then | ||
local IN=($(echo -n "$@")) | ||
else | ||
local IN=($(</dev/stdin) $(echo -n "$@")) | ||
fi | ||
export INST=($(echo ${IN[@]})) | ||
return | ||
} | ||
|
||
function n_tc() { | ||
# Colorize text outputs | ||
inputstream "$@"; local COLOR_FILTER=$(echo ${INST[@]}) | ||
echo -e "\e[34m${COLOR_FILTER}\e[39m"; return | ||
} | ||
|
||
function vb_out() { | ||
# Output verbosity function | ||
echo $(n_tc "[$0]")" $@"; return | ||
} | ||
|
||
function depends_check() { | ||
# Make sure necessary software packages are present | ||
TEST_A=$("$1" --version > /dev/null 2>&1; echo -n $?) | ||
TEST_B=$("$1" -version > /dev/null 2>&1; echo -n $?) | ||
if [[ ! "${TEST_A}" == "0" && ! "${TEST_B}" == "0" ]]; | ||
then echo "FALSE" | ||
else echo "TRUE" | ||
fi; return | ||
} | ||
|
||
function depends() { | ||
# Core dependancy checking loop | ||
for i in ${DEPENDS[@]}; | ||
do | ||
case $(depends_check "$i") in | ||
FALSE) vb_out "${VB_08}$i"; DEPENDS_REQ+=( "$i" ) ;; | ||
esac | ||
done | ||
if [[ $(echo "${DEPENDS_REQ[@]}") =~ [A-Za-z0-9] ]]; | ||
then | ||
vb_out "${VB_09}" | ||
for i in "${DEPENDS_REQ[@]}"; do n_tc "$i"; done | ||
echo; read -p "Would you like to install them? [y/n]: " -n 1 -r | ||
echo "" # insert new line | ||
if [[ $REPLY =~ ^[Yy]$ ]]; | ||
then | ||
clear; echo $(vb_out "Installing ${DEPENDS_REQ[@]}")" Please wait..." | ||
sudo apt-get update | ||
for i in ${DEPENDS_REQ[@]}; do sudo apt-get install -y $i; done; clear | ||
else | ||
vb_out "${VB_10}"; exit 1 | ||
fi | ||
fi | ||
return | ||
} | ||
|
||
function help_p2s() { | ||
# Print the png2svg help text | ||
echo; echo "${VB_03}"; echo | ||
echo "${VB_04}"; echo "${VB_04B}" | ||
echo "${VB_05}"; echo "${VB_05B}" | ||
echo "${VB_06}"; echo "${VB_07}" | ||
echo; return | ||
} | ||
|
||
#------------------------------------------------------------------------------# | ||
# EXECUTE CORE OPERATIONS | ||
|
||
inputstream "$@"; INPUT_VARS=( $(echo ${INST[@]}) ) | ||
case "$1" in | ||
-h|-help|--help) help_p2s; exit 0 ;; | ||
-i|-info|--info) | ||
depends; curl -s ${INFO_SRC} | dos2unix; echo; exit 0 | ||
;; | ||
-q|--quiet|-quiet|-s|--silent|-silent) | ||
V_X="/dev/null"; V_S="sleep 0" | ||
;; | ||
*|'') | ||
if [[ "x${INPUT_VARS}" == "x" ]]; then help_p2s; exit 0 | ||
else V_X="/dev/stdout"; V_S="sleep 0.5"; fi | ||
;; | ||
esac | ||
|
||
depends; vb_out ${VB_00} &>${V_X}; ${V_S} | ||
|
||
if [[ $(echo "${#INPUT_VARS[@]}") -gt 1 ]]; | ||
then | ||
touch .tempfile; INPUT_T=".tempfile" | ||
for i in "${INPUT_VARS[@]}"; | ||
do | ||
if [[ -f "$i" && "$i" =~ \.png$ ]]; then echo -n "$i" > ${INPUT_T}; fi | ||
done | ||
INPUT_Y=$(cat ${INPUT_T}) | ||
if [[ "x${INPUT_Y}" == "x" ]]; | ||
then | ||
vb_out "${VB_01}" &>${V_X}; vb_out "${VB_02}" &>${V_X} | ||
help_p2s &>${V_X}; ${V_S}; exit 1 | ||
else | ||
convert -flatten "${INPUT_Y}" "temp.ppm" &>${V_X}; ${V_S} | ||
potrace -s "temp.ppm" -o "${INPUT_Y%.*}.svg" &>${V_X}; ${V_S} | ||
rm temp.ppm &>/dev/null; rm ${INPUT_T} &>/dev/null | ||
vb_out "${VB_11}" &>${V_X}; ${V_S} | ||
fi | ||
exit 0 | ||
else | ||
INPUT_1=$(if [[ -f ${INPUT_VARS} && ${INPUT_VARS} =~ \.png$ ]]; then echo -n TRUE; else echo -n; fi) | ||
if [[ "x${INPUT_1}" == "x" ]]; | ||
then | ||
vb_out "${VB_01}" &>${V_X}; vb_out "${VB_02}" &>${V_X} | ||
help_p2s &>${V_X}; ${V_S}; exit 1 | ||
else | ||
convert -flatten "${INPUT_VARS}" "temp.ppm" &>${V_X}; ${V_S} | ||
potrace -s "temp.ppm" -o "${INPUT_VARS%.*}.svg" &>${V_X}; ${V_S} | ||
rm temp.ppm &>/dev/null; vb_out "${VB_11}" &>${V_X}; ${V_S} | ||
fi | ||
exit 0 | ||
fi |