diff --git a/.gitignore b/.gitignore index 567609b..b7d6d27 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ build/ +samples/pluie-color +samples/pluie-cmd +samples/pluie-cmd +samples/pluie-outputFormatter diff --git a/README.md b/README.md index b91b430..febe4a2 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,13 @@ sudo ninja install -C build ## Compilation ``` -valac --pkg pluie-echo-0.1 main.vala -o echo +valac --pkg pluie-echo-0.2 main.vala -o echo ``` +## Api / Documentation + +https://pluie.org/pluie-echo-0.2/index.htm + ## Docker a demo image is available on docker hub. you can run a container with : @@ -39,34 +43,36 @@ using Pluie; int main (string[] args) { - var c1 = new Color(37, false); + var c1 = new Color( 37, false); var c2 = new Color(204, true); - stdout.printf ("[%s][%s]", c1.s ("oki"), c2.s ("cool")); + var c3 = new Color( 15, true, 24); + stdout.printf ("[%s][%s]%s\n", c1.s ("oki"), c2.s ("it's"), c3.s (" cool ")); return 0; } ``` #### playing with ColorConf -compile main.vala +see samples/pluie-outputFormatter.vala ``` -valac --pkg pluie-echo-0.1 main.vala -o echo +cd samples +valac --pkg pluie-echo-0.2 pluie-outputFormatter.vala ``` -run ./echo +run ./pluie-outputFormatter -![ColorConf 1 code](https://www.meta-tech.academy/img/libpluie-echo_sample_colorconf1.png) +![ColorConf 1 code](https://www.meta-tech.academy/img/libpluie-echo_sample_colorconf2.png) -then, change in resources/echo.ini : +then, change in samples/echo.ini : ``` -title = 15,1,97 +title = 15,1,24 title_item = 220,1 -title_sep = 97,1 +title_sep = 24,1 ``` -run echo again : +run ./pluie-outputFormatter again : -![ColorConf 2 code](https://www.meta-tech.academy/img/libpluie-echo_sample_colorconf2.png) +![ColorConf 2 code](https://www.meta-tech.academy/img/libpluie-echo_sample_colorconf1.png) #### init OutputFormatter @@ -76,7 +82,7 @@ using Pluie; int main (string[] args) { - var of = Echo.init (true /* enable tracing */, "resources/echo.ini" /* optional config file */); + Echo.init (true /* enable tracing */, "resources/echo.ini" /* optional config file */); Dbg.in (Log.METHOD); of.echo ( @@ -98,9 +104,10 @@ int main (string[] args) #### more samples -![Sample 1 code](https://www.meta-tech.academy/img/libpluie-echo_sample_code1.png?tmp=1) +see samples/ +![Sample 1 code](https://www.meta-tech.academy/img/libpluie-echo_sample_code1.png?tmp=2) ![Sample 1 output](https://www.meta-tech.academy/img/libpluie-echo_sample1.png?tmp=1) -![Sample 2 code](https://www.meta-tech.academy/img/libpluie-echo_sample_code2.png?tmp=1) +![Sample 2 code](https://www.meta-tech.academy/img/libpluie-echo_sample_code2.png?tmp=2) ![Sample 2 output](https://www.meta-tech.academy/img/libpluie-echo_sample2.png?tmp=1) @@ -115,10 +122,13 @@ indent = 4 key_maxlen = 17 [Colors] -# keys are fixed. overwrite only values +# key are fixed. overwrite only values # fg ansi extended color code (0..255), bold (0|1), bg ansi extended color code (0..255) default = comment = 103,1 +command = 74,1 +param = 117,1 +bin = 15,1 option = 37,1 option_sep = 158 arg = 97,1 diff --git a/doc/index.html b/doc/index.html index ef7f26b..0d484d5 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,18 +2,18 @@ - pluie-echo-0.1 – Vala Binding Reference + pluie-echo-0.2 – Vala Binding Reference - +
@@ -24,7 +24,7 @@

diff --git a/doc/pluie-echo-0.1/Pluie.Dbg.DBG_ENTER.html b/doc/pluie-echo-0.1/Pluie.Dbg.DBG_ENTER.html deleted file mode 100644 index fbeeec5..0000000 --- a/doc/pluie-echo-0.1/Pluie.Dbg.DBG_ENTER.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Pluie.Dbg.DBG_ENTER – pluie-echo-0.1 – Vala Binding Reference - - - - -
- -
-

DBG_ENTER

-
-

Description:

-
public const int8 DBG_ENTER -

-
Namespace: Pluie.Dbg -
-
Package: pluie-echo-0.1 -
-
-

- - - \ No newline at end of file diff --git a/doc/pluie-echo-0.1/Pluie.Dbg.DBG_INLINE.html b/doc/pluie-echo-0.1/Pluie.Dbg.DBG_INLINE.html deleted file mode 100644 index f7b79b9..0000000 --- a/doc/pluie-echo-0.1/Pluie.Dbg.DBG_INLINE.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Pluie.Dbg.DBG_INLINE – pluie-echo-0.1 – Vala Binding Reference - - - - -
- -
-

DBG_INLINE

-
-

Description:

-
public const int8 DBG_INLINE -

-
Namespace: Pluie.Dbg -
-
Package: pluie-echo-0.1 -
-
-

- - - \ No newline at end of file diff --git a/doc/pluie-echo-0.1/Pluie.Dbg.DBG_LEAVE.html b/doc/pluie-echo-0.1/Pluie.Dbg.DBG_LEAVE.html deleted file mode 100644 index 708551e..0000000 --- a/doc/pluie-echo-0.1/Pluie.Dbg.DBG_LEAVE.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Pluie.Dbg.DBG_LEAVE – pluie-echo-0.1 – Vala Binding Reference - - - - -
- -
-

DBG_LEAVE

-
-

Description:

-
public const int8 DBG_LEAVE -

-
Namespace: Pluie.Dbg -
-
Package: pluie-echo-0.1 -
-
-

- - - \ No newline at end of file diff --git a/doc/pluie-echo-0.1/Pluie.Dbg.log.html b/doc/pluie-echo-0.1/Pluie.Dbg.log.html deleted file mode 100644 index 22fc8e1..0000000 --- a/doc/pluie-echo-0.1/Pluie.Dbg.log.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Pluie.Dbg.log – pluie-echo-0.1 – Vala Binding Reference - - - - -
- -
-

log

-
-

Description:

-
public void log (string msg, int line = 0, int8 mode = DBG_INLINE, string? file = null) -

-
Namespace: Pluie.Dbg -
-
Package: pluie-echo-0.1 -
-
-

- - - \ No newline at end of file diff --git a/doc/pluie-echo-0.1/Pluie.Color.Color.html b/doc/pluie-echo-0.2/Pluie.Color.Color.html similarity index 95% rename from doc/pluie-echo-0.1/Pluie.Color.Color.html rename to doc/pluie-echo-0.2/Pluie.Color.Color.html index 886f66b..91e28dc 100644 --- a/doc/pluie-echo-0.1/Pluie.Color.Color.html +++ b/doc/pluie-echo-0.2/Pluie.Color.Color.html @@ -2,12 +2,12 @@ - Pluie.Color.Color – pluie-echo-0.1 – Vala Binding Reference + Pluie.Color.Color – pluie-echo-0.2 – Vala Binding Reference - +