bilderhic
Bilderhic is a smart and simple command tool for automatization.
How does it work?
You have to create a pipe file.
Bilderhic will run the commands inside your file.
The commands of the pipe file can be Bilderhic commands,
or bash / cmd commands.
Bilderhic includes usefull commands for edit files.
Installation
npm i -g bilderhic
Usage
bhic <file> [-vb or --verbose] [-d or --debug]
or
bhic [-vb or --verbose] [-d or --debug] [-c or --command] <single line command>
~ Bilderhic Commands ~
> env command
Description
It allows you to create / load / edit environment variables (inside your process).
Usage
Set variable manually
env set <key> <value>
Set variable from user input
env prompt <key> -m <message>
Adds a value to a numeric variable
env add <key> <value>
Load variables
env load <file.yml>
File.yml example
app:
id: com.brand.app
version: 2
description: This is an awesome Android Application.
name: Awesomapp
Usage of environment variables
env load File.yml
:open config.xml
- set widget.id=[app.id]
- set widget.android-versionCode=[app.version]
- set widget.version=0.0.[app.version]
- set widget>name=[app.name]
- set widget>description=[app.description]
- save
- close
Clear your environment
env clear
Change the debug mode
env debug <enable or disable>
> copy command
Description
Copies a file or a folder. Override the files if it exists.
Usage
copy <from> <to> [-i or --ignore <file or folder>] [-q or --quiet]
> sync command
Description
Synchronizes (mirror mode) two folders. Only writes the diferrences between the folders.
Usage
sync <source> <destination> [-i or --ignore <file or folder>] [-q or --quiet]
> del command
Description
Deletes a file o a folder (recursively) if exists.
Usage
del <file or folder>
> cd command
DOC
> mkdir command
DOC
> ren command
Renames a file o a folder.
Usage
ren <file or folder> <newName> [--skip-unexisting or -sk] [--overwrite or -o]
> base64 command
Description
Parses a base-64 string.
Usage
base64 <text>
or
base64 <text> > <filename>
or
base64 <text> >> <environment variable>
Example
base64 YmlsZGVyaGlj > mistery.txt
> cat command
Description
Reads a file and prints its content.
Usage
cat <filename>
or
cat <filename> > <filename>
or
cat <filename> >> <environment variable>
Example
base64 YmlsZGVyaGlj > mistery.txt
> run command
Description
Renames a file or a folder.
Usage
ren <origin> <target> [--overwrite or -w]
> exit command
Description
Stops the pipe or the process.
Usage
exit [pipe]
> sleep command
Description
Waits until timer ends.
Usage
sleep <time (ms)>
> beep command
Description
Makes a console beep sound.
Usage
beep [times] [delay between beeps]
Examples
echo Beep!
beep
echo Beep! Beep!
beep 2
echo Beep! ... Beep! ... Beep!
beep 3 1000
~ Special Commands ~
:pipe <file>
:each folder
:each file
:open <file>
:eval <code>
:if <conditions>
:if <conditions>
:begin
<instructions here>
:end
File edition
Text editors: TXT
Object editors: XML, HTML, JSON
~ Text editors ~
- append <text>
- set <line number> <text>
- replace <text> <replacement text>
- replaceone <text> <replacement text>
- save
- close
~ Object editors ~
- add <key>=<value>
- set <selector> = <value or variable>
- get <selector> > <variableName>
- save
- close
Examples
bhic pipe.txt
bhic -c echo Hi world!
Misc
Multiple line command
bhic -c echo Running :eol: sleep 5000 :eol: beep :eol: echo Run finished