On Tue, 6 Oct 2020 18:24:11 +0200 Boris Faure <bo...@fau.re> said:

> I've just noticed, I've not answered your question.
> 
> Why such a tool?
>   Because writing colors in the format used in eet is quite boring and
> not so convenient. You can check the .desc files produced.
> 
> Why JSON?
>   I wanted something easy enough and common enough.  I could have picked
> YAML or TOML or INI.
> 
>   Why python? Because you need to run meson/ninja. That's why I picked
> JSON because there's native support in python.
> 
> Now that's written this, I might consider INI since it might be easier
> to work with than JSON and at some point I'll want people to submit such
> files.

and efreet has a parser already too.

personally i'd have just made it an insanely boring text file with # on first
char of line being a comment and

f80 #RGB
ff8000 #RRGGBB
ff0080ff #AARRGGBB
255 128 0 255 # RGBA
1.0 0.5 0.0 1.0 # RGBA
1.0 0.5 0.0 # RGB

etc. ... each line is a palette entry in order for the basic terminal colors.
just provide a fuzzy parser per color line to allow use of the preferred format

> On 20-09-28 22:42, Christopher Michael wrote:
> > My first thought is ... WHY Json??...
> > 
> > dh
> > 
> > 
> > On 9/28/20 5:49 PM, Boris Faure wrote:
> > > billiob pushed a commit to branch master.
> > > 
> > > http://git.enlightenment.org/apps/terminology.git/commit/?id=0dc4e1014f7010bd049e5650a942ef1127a1e7f6
> > > 
> > > commit 0dc4e1014f7010bd049e5650a942ef1127a1e7f6
> > > Author: Boris Faure <bill...@gmail.com>
> > > Date:   Mon Sep 28 23:24:07 2020 +0200
> > > 
> > >      colorschemes: input files are JSON now
> > > ---
> > >   data/colorschemes/builder.sh | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/data/colorschemes/builder.sh b/data/colorschemes/builder.sh
> > > index 36994f6..1483e54 100755
> > > --- a/data/colorschemes/builder.sh
> > > +++ b/data/colorschemes/builder.sh
> > > @@ -18,7 +18,7 @@ trap 'rm -f "$TMPFILE"' INT TERM HUP EXIT
> > >   for JSON in "$@"
> > >   do
> > >      # use the name, without extension as key in eet
> > > -   KEY=$(basename "$JSON" ".desc")
> > > +   KEY=$(basename "$JSON" ".json")
> > >      DESC="${KEY}.desc"
> > >      $JSON2DESC "$JSON" "$DESC"
> > >      $EET -e "$TMP_EET" "$KEY" "$DESC" "$COMPRESS"
> > > 
> > 
> > 
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 
> -- 
> Boris Faure
> Pointer Arithmetician


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - ras...@rasterman.com



_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to