summaryrefslogtreecommitdiffstats
path: root/scripts/README.rst
blob: 6d96afdd6082560a25dbc3827f00ebb3a9c9866b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Scripts
--------------------------

**docparser.py**

Parses SGML files containing Postgres command information and converts them
into a JSON data structure, this is the converted into a python dictionary
and saved to `pgspecial/help/commands.py`

This should me manually ran and the results committed after each new release
of the main Postgres project.

SGML files can be found: https://github.com/postgres/postgres/tree/master/doc/src/sgml/ref
Grab a copy of this directory on your local system.

**Usage**

::
    pip install beautifulsoup4
    # From root of project
    echo -n "helpcommands = " > pgspecial/help/commands.py; python scripts/docparser.py ref/ | python -mjson.tool | sed 's/"\: null/": None/g' >> pgspecial/help/commands.py