-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
56 lines (33 loc) · 1.72 KB
/
README
File metadata and controls
56 lines (33 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
=================================
Chess Query Language (CQL) parser
=================================
.. contents::
Description
===========
This package provides a parser for Chess Query Language (`CQL`_).
The documentation for `CQL version 6.0.4`_ as found in first half of 2020, plus `CQL version 6.1`_ and `CQL version 6.2`_ as found in mid-2024, was used as a reference.
`CQLi`_ provides an alternative implementation of CQL-6.1 and a '-parse' option which gives output more easily compared with ChessQL output.
This package does not implement an evaluator to find games in a `PGN`_ file which match a query.
Installation Instructions
=========================
This package is available on PyPI so can be installed by typing
python -m pip install --user chessql
at the command prompt.
See `Python`_ and `pip`_ documentation for alternatives and platform-specific points.
Use
===
Function core.parser.parse(<string>) returns a QueryContainer instance with the result of parsing a string usually read from a <*>.cql file.
Function core.parser.parse_command_line_query() returns a QueryContainer instance with the result of parsing a command line usually passed to the CQL executable.
Notes
=====
Version 3.0 of Chessql is incompatible with earlier versions.
An evaluator for some CQL constructs is implemented in `ChessTab`_.
.. _Python: https://python.org
.. _pip: https://packaging.python.org/installing
.. _CQL: http://www.gadycosteff.com
.. _PGN: http://www6.chessclub/help/PGN-spec
.. _CQL version 6.0.4: http://www.gadycosteff.com/cql-0-4
.. _CQL version 6.1: http://www.gadycosteff.com/cql-6.1
.. _CQL version 6.2: http://www.gadycosteff.com/cql
.. _CQLi: https://cql64.com
.. _ChessTab: http://www.solentware.co.uk/download.html