Skip to content

Commit

Permalink
Version 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pgulutzan committed Sep 29, 2023
1 parent fb6f7a1 commit 19349c7
Show file tree
Hide file tree
Showing 16 changed files with 551 additions and 164 deletions.
20 changes: 10 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@

# FILENAME_EXTRA
# Default is blank. ocelotgui passes -DFILENAME_EXTRA="qt4" when building with qt4,
# so the final package name will look like ocelotgui_2.0.0qt4-1_amd64.deb or
# ocelotgui-2.0.0qt4-1.x86_64.rpm. Ordinarily it should not be specified.
# so the final package name will look like ocelotgui_2.1.0qt4-1_amd64.deb or
# ocelotgui-2.1.0qt4-1.x86_64.rpm. Ordinarily it should not be specified.

# FILENAME_RELEASE
# Default is "1". Ordinarily it doesn't need to be changed.
Expand All @@ -161,21 +161,21 @@

# e.g. to generate .deb file and install with dpkg:
# deb_build.sh, which copies files and invokes debian/rules, which uses CMakeLists.txt
# sudo dpkg -i ocelotgui_2.0.0-1_amd64.deb
# sudo dpkg -i ocelotgui_2.1.0-1_amd64.deb
# but see also comments in deb_build.sh and debian/README.Debian

# e.g. to generate .rpm file and install with rpm:
# rpm_build.sh, which copies files and invokes ocelotgui.spec, which uses CMakeLists.txt
# rpmlint ocelotgui-2.0.0-1.x86_64.rpm
# rpm -i ocelotgui-2.0.0-1.x86_64.rpm
# rpmlint ocelotgui-2.1.0-1.x86_64.rpm
# rpm -i ocelotgui-2.1.0-1.x86_64.rpm
# but see also comments in rpm_build.sh

# Todo: We only check if CMAKE_SYSTEM_PROCESSOR = x86_64. On FreeBSD 12, uname -p says amd64.
# Todo: Maybe set(CMAKE_CXX_FLAGS "${Qt6Widgets_EXECUTABLE_COMPILE_FLAGS}") as we do for Qt5Widgets.
# Todo: We do not install README_tarantool.htm or the *_tarantool.png files, though we put them on github.
# Todo: We do not install ocelotgui-logo.png, we only install ocelotgui_logo.png.

message("-- CmakeLists.txt for ocelotgui 2.0.0")
message("-- CmakeLists.txt for ocelotgui 2.1.0")
message("-- see comments in CMakeLists.txt for special instructions")
message("-- see README.md for general instructions for building")

Expand Down Expand Up @@ -546,14 +546,14 @@ if (PACKAGE_TYPE MATCHES "RPM")
install(FILES ocelotgui.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif (PACKAGE_TYPE MATCHES "RPM")

# version = 2.0.0
# version = 2.1.0
set(CPACK_PACKAGE_VERSION_MAJOR "2")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "1")
set(CPACK_PACKAGE_VERSION_PATCH "0")

# I assume nobody wants package names like ocelotgui_2.0.0-Linux.deb
# I assume nobody wants package names like ocelotgui_2.1.0-Linux.deb
# but that's what I get if CMAKE_SYSTEM_NAME = "Linux".
# I'd prefer ocelotgui_2.0.0-1_amd64.deb or ocelotgui-2.0.0.x86_64.rpm
# I'd prefer ocelotgui_2.1.0-1_amd64.deb or ocelotgui-2.1.0.x86_64.rpm
# If it's neither "DEB" nor "RPM", = default.
set(FILENAME_PLATFORM_FOR_DEB "Linux")
set(FILENAME_PLATFORM_FOR_RPM "Linux")
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# Otherwise if running makepkg a second time it may be necessary to say makepkg -f
#Re cmake: This is an out-of-source build and produces a RelWithDebInfo executable with an -O2 flag.
# For other options read CMakeLists.txt.
#Re version: In fact all the source files now are for version 2.0.0 but leaving pkgver=1.7.0 might save hassle.
#Re version: In fact all the source files now are for version 2.1.0 but leaving pkgver=1.7.0 might save hassle.
pkgname=ocelotgui
pkgver=1.7.0
pkgrel=1
Expand Down
173 changes: 140 additions & 33 deletions README.htm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

ocelotgui

<P>Version 2.0.0</P>
<P>Version 2.1.0</P>

<P>The ocelotgui GUI, a database client, allows users to connect to
a MySQL or MariaDB DBMS server, enter SQL statements, and receive results.
Expand Down Expand Up @@ -47,6 +47,7 @@ <H4>Using</H4>
... <A href="#special-effects">Special effects</A>
... <A href="#explorer-widget">Explorer widget</A>
... <A href="#ERDiagram">ERDiagram</A>
... <A href="#charts">Charts</A>
... <A href="#contact">Contact</A>
<H4>Appendixes</H4>
... <A href="#Appendix-1">Appendix 1 Details about ocelotgui options</A>
Expand Down Expand Up @@ -122,21 +123,21 @@ <H3 id="getting-the-ocelotgui-executable-package">Getting the ocelotgui executab
cut and paste the corresponding pair of instructions onto your computer and
you can be up and running in about 15 seconds.<BR><BR>
For 32-bit, Debian-like, Qt5<PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui_2.0.0-1_i386.deb
sudo apt install ./ocelotgui_2.0.0-1_i386.deb</PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui_2.1.0-1_i386.deb
sudo apt install ./ocelotgui_2.1.0-1_i386.deb</PRE>
For 64-bit, Debian-like, Qt5<PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui_2.0.0-1_amd64.deb
sudo apt install ./ocelotgui_2.0.0-1_amd64.deb</PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui_2.1.0-1_amd64.deb
sudo apt install ./ocelotgui_2.1.0-1_amd64.deb</PRE>
For 64-bit, RPM-like, Qt5<PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui-2.0.0-1.x86_64.rpm
sudo rpm -i ocelotgui-2.0.0-1.x86_64.rpm</PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui-2.1.0-1.x86_64.rpm
sudo rpm -i ocelotgui-2.1.0-1.x86_64.rpm</PRE>
For 64-bit, any Linux, Qt5<PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui-2.0.0.tar.gz
tar zxvf ocelotgui-2.0.0.tar.gz
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui-2.1.0.tar.gz
tar zxvf ocelotgui-2.1.0.tar.gz
ocelotgui/ocelotgui-qt5</PRE>
For 64-bit, any Linux, Qt4 (deprecated)<PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui-2.0.0.tar.gz
tar zxvf ocelotgui-2.0.0.tar.gz
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui-2.1.0.tar.gz
tar zxvf ocelotgui-2.1.0.tar.gz
ocelotgui/ocelotgui-qt4</PRE>
</P>

Expand Down Expand Up @@ -171,7 +172,7 @@ <H2 ID="some-screenshots">Some screenshots</H2><HR>

<H2 ID="user-manual">User Manual</H2><HR><HR>

<P>Version 2.0.0, June 7 2023</P>
<P>Version 2.1.0, September 29 2023</P>

<P>Copyright (c) 2023 by Peter Gulutzan. All rights reserved.</P>

Expand Down Expand Up @@ -653,13 +654,6 @@ <H3 id="special-effects">Special Effects</H3><HR>
change how large the history file can become with OCELOT_HISTFILESIZE=number,
change how large the initial history can become with OCELOT_HISTSIZE=number.
</P>

<P>
<A href="shot7.jpg"><img src="shot7.jpg" alt="shot7.jpg" align="right" height="50" width="100"></A>
RE: CHARTS. While a result set is visible, if some columns are numeric, press Alt+Shift+B to
display as a bar chart, Alt+Shift+P to display as a pie chart, Alt+Shift+L to display as a line chart.
</P>

<P>RE: EXPORT. A result set can be dumped to a file as text, as table, or as html.
</P>

Expand Down Expand Up @@ -881,6 +875,119 @@ <H3 id="ERDiagram">ERDiagram</H3><HR>
(the primary keys) to be displayed with a bold font. Move a mouse over a line to see the foreign key name.
</P>

<H3 id="charts">Charts</H3><HR>

<P>
<A href="shot7.jpg"><img src="shot7.jpg" alt="shot7.jpg" align="right" height="50" width="100"></A>
While a result set is visible, if some columns are numeric, press Alt+Shift+B to
display as a bar chart, Alt+Shift+P to display as a pie chart, Alt+Shift+L to display as a line chart.
No plugins or separate programs are necessary.
But to customize the look of the charts, you will need client statements.
</P>
<P>
The basic statement syntax is<br>
SET ocelot_grid_chart = 'literal' [WHERE clause];<br>
After you've typed SET ocelot_grid_chart = the prompt/autocomplete list wil be
BAR | LINE | PIE | BAR VERTICAL | BAR STACKED | BAR VERTICAL STACKED | BAR SUBGROUP BY VALUE % 3
| BAR SUBGROUP BY LEFT(COLUMN_NAME, 2) | LINE SUBGROUP BY LEFT(COLUMN_NAME, 2) | PIE SUBGROUP BY LEFT(COLUMN_NAME, 2) | [string]
-- and you can make your own combination for example<br>
SET ocelot_grid_chart = 'BAR STACKED SUBGROUP BY VALUE % 5';<br>
The optional WHERE may include COLUMN_NAME | COLUMN_NUMBER | COLUMN_TYPE
(relational operator) (literal value), along with AND|OR, as is usual for
any SET OCELOT_GRID_... statements. For example<br>
SET OCELOT_GRID_chart = 'PIE' WHERE column_name = 'k';<br>
SET ocelot_grid_chart=''; will cancel all previous uses of SET ocelot_chart_grid,
that is, it turns the feature off.
</P>
<P>
Shortcut key combinations are:<br>
Alt+Shift+B causes SET ocelot_grid_chart='bar';<br>
Alt+Shift+L causes SET ocelot_grid_chart='line';<br>
Alt_Shift+P causes SET ocelot_grid_chart='pie';<br>
Alt+Shift+N causes SET ocelot_grid_chart='';<br>
As usual, it is possible to change the key combinations with
SET ocelot_shortcut... statements.
</P>
<P>
GROUPS: Charts make sense when representing numbers.
A "group" is any uninterrupted series of numbers in a result-set row.
For example, in<br>
SELECT 'a',1,2,3.7,4,'b',5e1,6,'c';<br>
the first group is 1,2,3.7,4 and the second group is 5e1,6.
(That is the default. to change the default, use a WHERE clause.)
</P>
<P>SUBGROUPS. A group may be divided into subgroups.
Subgrouping is what decides how sampling is done within a group.
Different methods of subgrouping are appropriate for different
types of chart.<br>
There is automatic subgrouping of pies because otherwise all
pie segments would have a single colour.
(Different subgroups have different colours.)<br>
There is automatic subgrouping of lines because otherwise the
points of all lines would be in the same axis and there would
be no apparent movement. The automatic subgrouping in this case
is SUBGROUP BY LEFT(COLUMN_NAME,2) so it need not be specified.
</P>
<P>
LAYOUT OF A CELL. (After header, not including cell border.)<pre>
+--------------------------------------------------+
| TOP |
|L | L|
|E | CANVAS E|
|F | G|
|T | E|
| | N|
| | D|
| _____________________________________________ |
| BOTTOM |
+--------------------------------------------------+
</pre>
But if cell size is small ocelotgui might cancel everything except the canvas.<br>
CANVAS: is a non-optional component, it has the actual bar/line/pie chart.<br>
LEGEND: is on the RIGHT. Icons and very short text.<br>
TOP: text (not shown by default).<br>
LEFT: For vertical-bar or line has "values axis", for horizontal-bar has "samples axis". Text, rotated 90 degrees.<br>
LEFT LINE: a straight line between LEFT and canvas.<br>
BOTTOM: For horizontal-bar or line has "values axis", for vertical-bar has "samples axis". Text.<br>
BOTTOM LINE: a straight line between canvas and BOTTOM.<br>
Values axis: Becomes next to LEFT or BOTTOM in a bar or line.<br>
Samples axis: Becomes next to LEFT or BOTTOM in a bar or line.<br>
</P>
<P>
It is possible to cancel or change any item except the canvas.
So a fuller statement of the SET syntax can be<pre>
SET ocelot_grid_chart = '
{BAR|LINE|PIE} currently default=bar if this is missing, but don't do it
[VERTICAL] default is horizontal
[STACKED] default is grouping
[TOP=value] default is null
[RIGHT=value|LEGEND|NULL] default is LEGEND
[LEFT=value|DEFAULT|NULL] default is DEFAULT
[BOTTOM=value|DEFAULT|NULL] default is DEFAULT
[AXIS=NULL|ALL] default is ALL, anything but NULL will make axes appear
'
WHERE condition];</pre>
For example, to suppress everything except the canvas with a vertical bar chart:<br>
SET ocelot_grid_chart='BAR VERTICAL RIGHT=NULL LEFT=NULL BOTTOM=NULL AXIS=NULL';<br>
For example, to add a top line along with the other components with a pie:<br>
SET ocelot_grid_chart='PIE TOP=TOPPER';<br>
</P>
<P>
EFFECTS OF OTHER SETTINGS:<br>
SET ocelot_grid_font=... affects what font the text items have.<br>
SET ocelot_grid_cell_border_size=... affects the width of lines.<br>
And other ocelot_grid settings may affect all cells including cells with charts.<br>
Any item value might be truncated. An easy way to change width of a single chart
is to use long column names, that is, instead of saying SELECT 1, 2, 3; say<br>
SELECT 1 AS really_long_column_name, 2, 3;<br>
but for some charts it is possible to use "SET ocelot_grid_cell_width=..." instead.
</P>
<P>
ILLUSTRATIONS. Pictures showing effects are in a blog post:
<a href="http://ocelot.ca/blog/blog/2023/08/08/charts/">Charts</a>.
The current output may look slightly different from the illustrations there,
and the Qwt library is no longer necessary.
</P>

<H3 id="contact">Contact</H3><HR>

Expand Down Expand Up @@ -2022,7 +2129,7 @@ <H3 id="Appendix-3">Appendix 3 Tarantool</H3><HR>
Tarantool library, its code is embedded in ocelotgui.exe.</P>

<P>You need the latest ocelotgui client.
The Release 2.0.0 version is okay at the time of release,
The Release 2.1.0 version is okay at the time of release,
but some things might not be up to date.
It may be better to build it from source.
Download from github.com/ocelot-inc/ocelotgui.</P>
Expand Down Expand Up @@ -2183,11 +2290,11 @@ <H3 id="Appendix-4">Appendix 4 Windows</H3><HR>
* Download the ocelotgui zip file from github.
Check https://github.com/ocelot-inc/ocelotgui/blob/master/README.md
to see where the latest release is. For example it might be
https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui-2.0.0-1.ocelotgui.zip<br>
https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui-2.1.0-1.ocelotgui.zip<br>
* Unzip. It was zipped with 7-zip from http://www.7-zip.org,
but other utilities should work. For example, on Windows command prompt,
if you have the PowerShell utility on your path:
PowerShell Expand-Archive ocelotgui-2.0.0-1.ocelotgui.zip c:\ocelotgui<br>
PowerShell Expand-Archive ocelotgui-2.1.0-1.ocelotgui.zip c:\ocelotgui<br>
* Read the COPYING and LICENSE arrangements.
On Windows ocelotgui is statically linked to Qt and MariaDB libraries,
so the copyright and licensing is not the same as for Linux.<br>
Expand Down Expand Up @@ -2440,7 +2547,7 @@ <H4>Building ocelotgui.exe from source</H4>
del ocelotui.zip
"C:\Program Files (x86)\7-Zip\7z" a -tzip ocelotgui.zip ocelotgui.exe changelog manual.htm ocelotgui-logo.png ocelotgui_logo.png shot8.jpg CMakeLists.txt menu-debug.png ocelotgui.pro shot9.jpg codeeditor.h menu-edit.png ocelotgui.ui special-detach.png COPYING menu-file.png options.txt shot10.jpg special-images.png COPYING.thirdparty menu-help.png ostrings.h shot11.png special-settings.png copyright menu-options.png README.htm shot1.jpg special-vertical.png debugger.png menu-run.png README.md shot2.jpg starting-dialog.png debugger_reference.txt menu-settings.png README.txt shot3.png starting.png example.cnf PKGBUILD ocelotgui.1 readmylogin.c shot4.jpg statement-widget-example.png hparse.h ocelotgui.cpp result-widget-example.png shot5.jpg third_party.h install_sql.cpp ocelotgui.desktop rpmchangelog shot6.jpg windows.txt LICENSE.GPL ocelotgui.h shot7.jpg tarantool.txt rpm_build.sh ocelotgui.spec completer_1.png completer_2.png completer_3.png conditional.png explorer1.png explorer2.png explorer3.png explorer4.png explorer5.png explorer6.png explorer7.png explorer8.png explorer9.png

: What we actually put in the release looks like ocelotgui-2.0.0-1.ocelotgui.zip, so rename the .zip file at some point.
: What we actually put in the release looks like ocelotgui-2.1.0-1.ocelotgui.zip, so rename the .zip file at some point.


: (Dynamic linking)
Expand Down Expand Up @@ -2518,14 +2625,14 @@ <H3 id="getting-and-using-the-ocelotgui-source">Appendix 5 Getting and using the
by github and is named ocelotgui-[version].tar.gz.
Since version 1.0.9, there is also a release file named ocelotgui_[version].orig.tar.gz
which is preferable because it does not contain unnecessary executables.
Thus release 2.0.0 is at
https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui_2.0.0.orig.tar.gz.
Thus release 2.1.0 is at
https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui_2.1.0.orig.tar.gz.
Typically, to get it, one would cd to a download directory, then
<PRE>
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.0.0/ocelotgui_2.0.0.orig.tar.gz
wget https://github.com/ocelot-inc/ocelotgui/releases/download/2.1.0/ocelotgui_2.1.0.orig.tar.gz
</PRE>
or use a browser to go to <A HREF="https://github.com/ocelot-inc/ocelotgui/releases">https://github.com/ocelot-inc/ocelotgui/releases</A>
and click ocelotgui_2.0.0.orig.tar.gz.</P>
and click ocelotgui_2.1.0.orig.tar.gz.</P>

<P>On Debian-like systems some packages must be installed first.
For example on Ubuntu:<PRE>
Expand Down Expand Up @@ -2564,8 +2671,8 @@ <H3 id="getting-and-using-the-ocelotgui-source">Appendix 5 Getting and using the
<P>(Package builds on ArchLinux-like systems can also be done with the PKGBUILD file in the ocelotgui github repository.)</P>

<P>Unpack all the source files by saying:<PRE>
tar -zxvf ocelotgui_2.0.0.orig.tar.gz
cd ocelotgui-2.0.0</PRE>
tar -zxvf ocelotgui_2.1.0.orig.tar.gz
cd ocelotgui-2.1.0</PRE>
At this point it is a good idea to examine the file CMakeLists.txt.
This file has comments about options which are available to
customize the build process: CMAKE_PREFIX_PATH, CMAKE_INSTALL_PREFIX,
Expand All @@ -2589,12 +2696,12 @@ <H3 id="getting-and-using-the-ocelotgui-source">Appendix 5 Getting and using the
Please read the comments in the scripts before using them.
For Debian-like platforms say<PRE>
./deb_build.sh
sudo apt install /tmp/debian3/ocelotgui_2.0.0-1_amd64.deb
#or sudo apt install /tmp/debian3/ocelotgui_2.0.0-1_i386.deb</PRE>
sudo apt install /tmp/debian3/ocelotgui_2.1.0-1_amd64.deb
#or sudo apt install /tmp/debian3/ocelotgui_2.1.0-1_i386.deb</PRE>
For RPM-like platforms say<PRE>
./rpm_build.sh
sudo rpm -i ~/ocelotgui_rpm//rp/rpmbuild/RPMS/x86_64/ocelotgui-2.0.0-1.x86_64.rpm
#or sudo rpm -i ~/ocelotgui_rpm//rp/rpmbuild/RPMS/x86_64/ocelotgui-2.0.0-1.i686.rpm</PRE>
sudo rpm -i ~/ocelotgui_rpm//rp/rpmbuild/RPMS/x86_64/ocelotgui-2.1.0-1.x86_64.rpm
#or sudo rpm -i ~/ocelotgui_rpm//rp/rpmbuild/RPMS/x86_64/ocelotgui-2.1.0-1.i686.rpm</PRE>
Usually the result will go to subdirectories of /usr, in which case,
if /usr/bin is on your PATH, then saying ocelotgui will start the program.
</P>
Expand Down
Loading

0 comments on commit 19349c7

Please sign in to comment.