platima / Colorer-schemes

Syntax and color schemes for colorer library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Colorer schemes

The library of schemes is a basic set of descriptions of syntaxes and styles of the coloring, used by Colorer library. The project contains files and scripts for creation of library of schemes. check build

Improvements of translation of this file to English are welcome

Structure

  • hrc - basic set of descriptions of syntaxes (hrc-files) and their generators
  • hrd - basic set of styles of a coloring (hrd-files), their generators and additions
  • shared - shared colorer xml schemes
  • javalib - required java libs

How to build from source

Common

To build the library of schemes, you will need:

  • git
  • ant 1.8 or higher
  • java development kit 8 (jdk) or higher
  • perl

Download the source from git repository:

git clone https://github.com/colorer/Colorer-schemes.git

Run build

build.cmd target

where the target is one of the values

  • base - simple build of the schema library. Folder 'build/base'
  • base.packed - build the schema library with the hrc-files packed into an zip file. Folder 'build/base-packed'
  • base.unpacked - build the schema library with the hrc-files don`t packed into an zip file. Folder 'build/base-unpacked'
  • base.allpacked - build the schema library with all files packed into a zip file. Folder 'build/base-allpacked'
  • base.distr-packed - archive base.packed. Folder 'build'
  • base.distr-unpacked - archive base.unpacked. Folder 'build'
  • base.distr-allpacked - archive base.allpacked. Folder 'build'

Features of build under Windows

Before starting the build scripts, make sure that the PATH environment variable contains the path to jdk and ant. Also you need the environment variable JAVA_HOME set. For example:

set PATH=v:\apps\jdk\bin;v:\apps\ant\bin;%PATH%
set JAVA_HOME=v:\apps\jdk

Features of build under Linux

Here is an example on Ubuntu 20.04.

Install ant

apt-get install ant

If the apt config contains APT::Install-Recommends "False";, then you must also install ant-optional.

Develop

Descriptions of syntaxes (scheme) are divided into static and generated. Static are in a directory hrc/hrc, generated in hrc/src.

After scheme change, it is necessary test changes for regressions. For this purpose it is necessary:

  1. to build the library of schemes build base
  2. check that bin directory in the root of the project has colorer (the utility for working with library of schemes)
  3. start script runtest.py from hrc/test directory
  4. script will check the result of coloring of reference file, the result is output to the console and fails.html file in current_working_dir/time_of_test directory.
  5. after the analysis of divergences in case of mistakes it is necessary to correct the scheme. If the current coloring is considered correct, it is necessary to replace the reference file with the new one. Reference files reside in hrc/test/_valid. New files reside in current_working_dir/time_of_test/result

Also before modification of a repository it is recommended to edit the hrc/hrc/CHANGELOG file

Links

About

Syntax and color schemes for colorer library


Languages

Language:HTML 91.8%Language:Perl 1.5%Language:XSLT 1.0%Language:Forth 0.8%Language:Faust 0.8%Language:Modula-2 0.6%Language:Java 0.5%Language:Verilog 0.5%Language:Roff 0.4%Language:C++ 0.3%Language:PHP 0.3%Language:Shell 0.2%Language:TeX 0.2%Language:Pascal 0.1%Language:COBOL 0.1%Language:D 0.1%Language:ColdFusion 0.1%Language:Python 0.1%Language:C 0.1%Language:MAXScript 0.1%Language:Rust 0.1%Language:Kotlin 0.1%Language:Groovy 0.1%Language:MATLAB 0.1%Language:Classic ASP 0.1%Language:CSS 0.1%Language:Tcl 0.0%Language:JavaScript 0.0%Language:M4 0.0%Language:Go 0.0%Language:Ruby 0.0%Language:xBase 0.0%Language:Lua 0.0%Language:Assembly 0.0%Language:Erlang 0.0%Language:Sass 0.0%Language:Less 0.0%Language:Batchfile 0.0%Language:Scheme 0.0%Language:XQuery 0.0%Language:Twig 0.0%Language:NSIS 0.0%Language:Awk 0.0%Language:ActionScript 0.0%Language:Visual Basic 6.0 0.0%Language:Raku 0.0%Language:QMake 0.0%Language:Fortran 0.0%Language:Inno Setup 0.0%Language:REXX 0.0%Language:ABAP 0.0%