Documentation: Add some screenshots to the user manual.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 28 Nov 2020 20:32:24 +0000 (21:32 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 28 Nov 2020 20:35:42 +0000 (21:35 +0100)
Added a mechanism to automatically generate screenshots from the
graphic user interface for inclusion in the manual.

21 files changed:
doc/automake.mk
doc/data-selection.texi
doc/doc-make.in [new file with mode: 0644]
doc/pspp.texi
doc/screengrab [new file with mode: 0755]
doc/screenshots/autorecode.grab [new file with mode: 0644]
doc/screenshots/chisquare.grab [new file with mode: 0644]
doc/screenshots/compute.grab [new file with mode: 0644]
doc/screenshots/count-define.grab [new file with mode: 0644]
doc/screenshots/count.grab [new file with mode: 0644]
doc/screenshots/define-groups-t.grab [new file with mode: 0644]
doc/screenshots/descriptives.grab [new file with mode: 0644]
doc/screenshots/frequencies.grab [new file with mode: 0644]
doc/screenshots/independent-samples-t.grab [new file with mode: 0644]
doc/screenshots/one-sample-t.grab [new file with mode: 0644]
doc/screenshots/reliability.grab [new file with mode: 0644]
doc/screenshots/sort-simple.grab [new file with mode: 0644]
doc/screenshots/sort.grab [new file with mode: 0644]
doc/screenshots/split-status-bar.grab [new file with mode: 0644]
doc/statistics.texi
doc/transformation.texi

index 5cabeae1d19279e80a81c64d5c3cfae90d81f830..3d2377c258fcdb4e96a42ff82c488dcdcb71ea5a 100644 (file)
@@ -112,7 +112,7 @@ am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc:$(top_builddir)/doc
 
 FIGURE_SYNTAX = \
  doc/pspp-figures/aggregate.sps \
-doc/pspp-figures/autorecode.sps \
+ doc/pspp-figures/autorecode.sps \
  doc/pspp-figures/chisquare.sps \
  doc/pspp-figures/compute.sps \
  doc/pspp-figures/count.sps \
@@ -206,13 +206,22 @@ $(FIGURE_TXTS) $(FIGURE_HTMLS): $(pspp_output)
        $(AM_V_GEN)$(SED) -e 's/@/@@/g' $< > $@
 
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --css-ref=pspp-manual.css
+# Adjust the path for screenshot images.
+# But make sure these operations are idempotent.
 html-local:
+       for h in doc/pspp.html/*.html; do \
+               if grep -Fq '<img src="screenshots/' $$h; then continue; fi ; \
+               $(SED) -i -e 's|<img src="\([^"]*\)"|<img src="screenshots/\1"|' $$h; \
+       done
 
-install-html-local: html-local
+install-html-local: html-local $(HTML_SCREENSHOTS)
        $(MKDIR_P) $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
+       $(INSTALL) -d $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html/screenshots
+       for p in $(HTML_SCREENSHOTS); do \
+               $(INSTALL_DATA) $$p $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html/screenshots ;\
+       done
        $(INSTALL_DATA) ${top_srcdir}/doc/pspp-manual.css $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
 
-
 \f
 
 desktopdir = $(datadir)/applications
@@ -234,3 +243,54 @@ dist_appdata_DATA = doc/org.fsf.pspp.metainfo.xml
 
 EXTRA_DIST += doc/org.fsf.pspp.metainfo.xml.in \
        doc/org.fsf.pspp.desktop.in
+
+\f
+
+SCREENSHOTS = \
+$(top_srcdir)/doc/screenshots/autorecode.grab \
+$(top_srcdir)/doc/screenshots/chisquare.grab \
+$(top_srcdir)/doc/screenshots/count.grab \
+$(top_srcdir)/doc/screenshots/count-define.grab \
+$(top_srcdir)/doc/screenshots/compute.grab \
+$(top_srcdir)/doc/screenshots/descriptives.grab \
+$(top_srcdir)/doc/screenshots/one-sample-t.grab \
+$(top_srcdir)/doc/screenshots/independent-samples-t.grab \
+$(top_srcdir)/doc/screenshots/define-groups-t.grab \
+$(top_srcdir)/doc/screenshots/frequencies.grab \
+$(top_srcdir)/doc/screenshots/reliability.grab \
+$(top_srcdir)/doc/screenshots/split-status-bar.grab \
+$(top_srcdir)/doc/screenshots/sort-simple.grab \
+$(top_srcdir)/doc/screenshots/sort.grab
+
+
+PDF_SCREENSHOTS =  $(SCREENSHOTS:.grab=-hc.png)
+EPS_SCREENSHOTS =  $(SCREENSHOTS:.grab=-hc.eps)
+HTML_SCREENSHOTS = $(SCREENSHOTS:.grab=-ad.png)
+INFO_SCREENSHOTS = $(SCREENSHOTS:.grab=-ad.png)
+
+doc-make: doc/doc-make.in Makefile
+       $(SED) -e 's|%top_srcdir%|@top_srcdir@|g' \
+       -e 's|%abs_builddir%|@abs_builddir@|g' \
+       -e 's|%MKDIR_P%|@MKDIR_P@|g' \
+       -e 's|%src_ui_gui_psppiredir%|$(src_ui_gui_psppiredir)|g' \
+       -e 's|%UI_FILES%|$(UI_FILES)|g' \
+       -e 's|%IMAGES%|$(INFO_SCREENSHOTS) $(HTML_SCREENSHOTS) $(EPS_SCREENSHOTS) $(PDF_SCREENSHOTS)|g' \
+       $< > $@
+
+
+# Install all the PNG files so that info readers can recognise them
+install-info-local:
+       $(MKDIR_P) $(DESTDIR)$(prefix)/share/info/
+       for p in $(INFO_SCREENSHOTS); do \
+               $(INSTALL_DATA) $$p $(DESTDIR)$(prefix)/share/info/ ;\
+       done
+
+uninstall-local:
+       for p in $(INFO_SCREENSHOTS); do \
+               f=`basename $$p ` ; \
+               $(RM) $(DESTDIR)$(prefix)/share/info/$$f ; \
+       done
+
+EXTRA_DIST+= $(SCREENSHOTS) doc/doc-make.in doc/screengrab
+
+EXTRA_DIST+= $(EPS_SCREENSHOTS) $(PDF_SCREENSHOTS) $(INFO_SCREENSHOTS)
index 17d5d0e41c630a86d8ef613e1a4b24f2bbb9421a..c2f3ab31a4ddf0fdd33797a83981acd820e35590 100644 (file)
@@ -254,6 +254,17 @@ split.
 
 Unless @cmd{TEMPORARY} was used, after a split has been defined for
 a dataset it remains active until explicitly disabled.
+In the graphical user interface, the active split variable (if any) is
+displayed in the status bar (@pxref{split-status-bar:scr}.
+If a dataset is saved to a system file (@pxref{SAVE}) whilst a split
+is active, the split stastus is stored in the file and will be
+automatically loaded when that file is loaded.
+
+@float Screenshot, split-status-bar:scr
+@psppimage {split-status-bar}
+@caption {The status bar indicating that the data set is split using the @exvar{treatment} variable}
+@end float
+
 
 @node TEMPORARY
 @section TEMPORARY
diff --git a/doc/doc-make.in b/doc/doc-make.in
new file mode 100644 (file)
index 0000000..333dce8
--- /dev/null
@@ -0,0 +1,88 @@
+# -*- makefile -*-
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This makefile is used to generate the artifacts needed by the
+# user manual.
+
+
+# In order to get this makefile to work there are several programs
+# which need to be found on $PATH.  Using debian 10.5 you can install
+# these with:
+#  apt-get install xdotool xvfb imagemagick x11-apps
+# and optionally:
+#  apt-get install xserver-xephyr
+
+
+MKDIR_P=%MKDIR_P%
+top_srcdir=%top_srcdir%
+abs_builddir=%abs_builddir%
+src_ui_gui_psppiredir=%src_ui_gui_psppiredir%
+
+IMAGES=%IMAGES%
+
+UI_FILES=%UI_FILES%
+
+all: $(IMAGES)
+
+## The ui files must be installed in order for screenshots to succeed
+installed_ui_files=${subst src/ui/gui,$(src_ui_gui_psppiredir),$(UI_FILES)}
+
+src/ui/gui/psppire:
+       $(MAKE) -f Makefile $@
+
+XSERVER?=xvfb
+
+# Generate a X11 window dump based on a .grab file
+
+# Default theme for web pages
+$(top_srcdir)/doc/screenshots/%-ad.xwd: src/ui/gui/psppire $(top_srcdir)/doc/screengrab $(top_srcdir)/doc/screenshots/%.grab $(installed_ui_files)
+       @$(MKDIR_P) ${dir $@}
+       bash ${word 2,$^} --application=$< --topsrcdir=$(top_srcdir) --x-server=$(XSERVER) --theme=Adwaita --payload=${word 3,$^} $@
+
+# High Contrast theme for printed manuals
+$(top_srcdir)/doc/screenshots/%-hc.xwd: src/ui/gui/psppire $(top_srcdir)/doc/screengrab $(top_srcdir)/doc/screenshots/%.grab $(installed_ui_files)
+       @$(MKDIR_P) ${dir $@}
+       bash ${word 2,$^} --application=$< --topsrcdir=$(top_srcdir) --x-server=$(XSERVER) --theme=HighContrast --payload=${word 3,$^} $@
+
+.PRECIOUS: $(top_srcdir)/doc/screenshots/%-ad.xwd $(top_srcdir)/doc/screenshots/%-hc.xwd
+
+
+%.png: %.xwd
+       convert $< $@
+
+%.eps: %.xwd
+       convert $< $@
+
+
+$(src_ui_gui_psppiredir)/%.ui: $(top_srcdir)/src/ui/gui/%.ui
+       @$(MKDIR_P) ${dir $@}
+       cp $< $@
+
+
+# Syntax examples
+
+src/ui/terminal/pspp:
+       $(MAKE) -f Makefile $@
+
+.PHONY: md5
+md5:
+       (cd $(top_srcdir)/doc/screenshots; md5sum *.xwd)
+
+.PHONY: clean
+clean:
+       $(RM) $(IMAGES)
+       $(RM) $(top_srcdir)/doc/screenshots/*.xwd
index 6b3b64e05174fc09423197d402f908168f55c1a6..1394150289d83a609766fc936898558e57ba3d74 100644 (file)
@@ -33,6 +33,20 @@ graphic user interface
 @end html
 @end macro
 
+@macro psppimage{FILE}
+@cartouche
+@ifhtml
+@image{screenshots/\FILE\-ad} @c Adwaita theme is better for web pages.
+@end ifhtml
+@iftex
+@image{screenshots/\FILE\-hc,433.62pt} @c High Contrast theme, width \\the\\hsize
+@end iftex
+@ifinfo
+@image{screenshots/\FILE\-ad} @c Adwaita theme for stand aloneinfo
+@end ifinfo
+@end cartouche
+@end macro
+
 @macro psppoutput{FILE}
 @ifnothtml
 @smallexample
diff --git a/doc/screengrab b/doc/screengrab
new file mode 100755 (executable)
index 0000000..a8ee440
--- /dev/null
@@ -0,0 +1,133 @@
+#!/bin/bash
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+fail ()
+{
+    kill $pid;
+    echo FAILED to grab image for $payload
+    cat $errfile
+    rm -f $errfile
+    exit 1;
+}
+
+pass ()
+{
+    kill $pid;
+    rm -f $errfile
+    exit 0;
+}
+
+# Types the argument, with a pause after the first character.
+hard_type ()
+{
+    xdotool type "${1:0:1}"
+    xdotool sleep 0.5
+    xdotool type "${1:1}"
+}
+
+theme=Aidwaita
+
+while test $# -gt 0; do
+    case "$1" in
+        --topsrcdir=*)
+            topsrcdir=${1/--topsrcdir=/}
+        ;;
+        --application=*)
+            application=${1/--application=/}
+            ;;
+        --x-server=*)
+            xserver=${1/--x-server=/}
+            ;;
+        --payload=*)
+            payload=${1/--payload=/}
+        ;;
+        --theme=*)
+            theme=${1/--theme=/}
+        ;;
+        *)
+            output=$1;
+        ;;
+    esac
+    shift 1;
+done
+
+rm -f $output
+export LC_ALL=C
+
+width=1440
+height=900
+
+temp=`mktemp -d`
+export HOME=$temp
+
+mkdir -p $HOME/.config
+cat > $HOME/.config/psppirerc <<EOF
+[PsppireOutputWindow]
+maximize=true
+
+[PsppireDataWindow]
+maximize=true
+height=$height
+width=$width
+
+[PsppireSyntaxWindow]
+maximize=true
+EOF
+
+
+# xserver=xephyr
+
+case "$xserver" in
+    xvfb)
+        display=:$RANDOM
+        Xvfb +extension XTEST \
+             -screen 0 "$width"x"$height"x24 \
+             $display &
+        ;;
+    xephyr)
+        display=:$RANDOM
+        Xephyr -screen "$width"x"$height" \
+               +extension XTEST \
+               -noxv \
+               -dumb $display &
+        ;;
+    native)
+        display=$DISPLAY
+        ;;
+    *)
+        printf "Unknown X server type\n";
+        exit 1;
+        ;;
+esac
+pid=$!
+export DISPLAY=$display
+export GTK_THEME=$theme
+
+sleep 1
+
+errfile=`mktemp`
+$application -q -n 2> $errfile &
+if test "$xserver"x = "native"x; then pid=$!; fi
+
+xdotool sleep 0.5
+if test $? -ne 0 ; then fail; fi
+
+trap fail ERR
+. $payload
+
+mv $output,tmp $output
+pass;
diff --git a/doc/screenshots/autorecode.grab b/doc/screenshots/autorecode.grab
new file mode 100644 (file)
index 0000000..8ef6b71
--- /dev/null
@@ -0,0 +1,39 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/personnel.sav
+xdotool key Return
+xdotool sleep 1
+#xdotool mousemove --sync 240 10 click 1
+xdotool key alt+t
+#xdotool key Down Down Down Return
+xdotool key m
+xdotool search --sync --name "Automatic Recode" windowfocus --sync
+xdotool sleep 2
+xdotool key Down
+xdotool key Down Down Down Down Return
+xdotool sleep 1
+
+xdotool key shift+Tab Return
+xdotool key alt+n
+xdotool type occ
+
+
+
+xdotool sleep 1
+xwd -name "Automatic Recode" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/chisquare.grab b/doc/screenshots/chisquare.grab
new file mode 100644 (file)
index 0000000..9324ebc
--- /dev/null
@@ -0,0 +1,31 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+xdotool sleep 1
+xdotool key Down Down Down Down Down Down Down Down Down Right Return
+xdotool sleep 10
+xdotool key Down Return
+xdotool sleep 1
+xdotool key Tab Tab Tab Tab
+
+xdotool sleep 1
+xwd -name "Chi-Square Test" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/compute.grab b/doc/screenshots/compute.grab
new file mode 100644 (file)
index 0000000..5ed9a0d
--- /dev/null
@@ -0,0 +1,33 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool key alt+t
+xdotool key c
+xdotool search --sync --name "Compute Variable" windowfocus --sync
+
+xdotool key alt+v
+xdotool type bmi
+
+xdotool key alt+n
+xdotool type "weight/(height/1000)**2."
+
+xdotool sleep 1
+xwd -name "Compute Variable" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/count-define.grab b/doc/screenshots/count-define.grab
new file mode 100644 (file)
index 0000000..ea74121
--- /dev/null
@@ -0,0 +1,39 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/hotel.sav
+xdotool key Return
+xdotool sleep 1
+xdotool key alt+t
+xdotool key n
+xdotool search --sync --name "Count Occurrences of Values within Cases" windowfocus --sync
+
+xdotool key alt+t
+xdotool key Down
+xdotool key shift+Down shift+Down shift+Down
+xdotool key shift+Tab shift+Tab space
+xdotool key alt+t
+xdotool type low_count
+xdotool key Tab Tab Tab Tab Tab
+xdotool key space
+xdotool search --sync --name "Count Values within Cases: Values to Count" windowfocus --sync
+
+xdotool key alt+l 2
+
+xdotool sleep 1
+xwd -name "Count Values within Cases: Values to Count" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/count.grab b/doc/screenshots/count.grab
new file mode 100644 (file)
index 0000000..a094896
--- /dev/null
@@ -0,0 +1,36 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/hotel.sav
+xdotool key Return
+xdotool sleep 1
+xdotool key alt+t
+xdotool key n
+xdotool search --sync --name "Count Occurrences of Values within Cases" windowfocus --sync
+
+xdotool key alt+t
+xdotool key Down
+xdotool key shift+Down shift+Down shift+Down
+xdotool key shift+Tab shift+Tab space
+xdotool key alt+t
+xdotool type low_count
+xdotool key Tab Tab Tab Tab Tab
+
+
+xdotool sleep 1
+xwd -name "Count Occurrences of Values within Cases" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/define-groups-t.grab b/doc/screenshots/define-groups-t.grab
new file mode 100644 (file)
index 0000000..7d09ab1
--- /dev/null
@@ -0,0 +1,36 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+xdotool sleep 1
+xdotool key Down Down Right Down Down Return
+xdotool search --sync --name "Independent-Samples T Test" windowfocus --sync
+xdotool key Down Tab Tab Tab Return
+xdotool key  Tab Tab Tab Tab Tab Tab Tab Down Down Return
+xdotool key  Tab Tab Tab Tab Tab Return
+xdotool search --sync --name "Define Groups" windowfocus --sync
+xdotool key  Tab Down
+xdotool sleep 2
+xdotool key  Alt+2
+xdotool key Down Down
+
+xdotool sleep 1
+xwd -name "Define Groups" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/descriptives.grab b/doc/screenshots/descriptives.grab
new file mode 100644 (file)
index 0000000..860ca97
--- /dev/null
@@ -0,0 +1,30 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+
+xdotool key Down Right Down Return
+xdotool search --sync --name "Descriptives" windowfocus --sync
+xdotool key Down Down Return Down Down Return Tab
+xdotool key alt+z Tab
+
+xdotool sleep 1
+xwd -name "Descriptives" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/frequencies.grab b/doc/screenshots/frequencies.grab
new file mode 100644 (file)
index 0000000..b1f285b
--- /dev/null
@@ -0,0 +1,32 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/personnel.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+xdotool key Down Right Return
+xdotool search --sync --name "Frequencies" windowfocus --sync
+
+xdotool key Down Down Down Return
+xdotool key Down Return
+xdotool key Alt+s space Down space Down space
+xdotool key Tab Tab Tab Tab
+
+xdotool sleep 1
+xwd -name "Frequencies" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/independent-samples-t.grab b/doc/screenshots/independent-samples-t.grab
new file mode 100644 (file)
index 0000000..b3ee82a
--- /dev/null
@@ -0,0 +1,31 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+xdotool sleep 1
+xdotool key Down Down Right Down Down Return
+xdotool search --sync --name "Independent-Samples T Test" windowfocus --sync
+xdotool key Down Tab Tab Tab Return
+xdotool key  Tab Tab Tab Tab Tab Tab Tab Down Down Return
+xdotool key  Tab Tab Tab Tab Tab
+
+xdotool sleep 1
+xwd -name "Independent-Samples T Test" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/one-sample-t.grab b/doc/screenshots/one-sample-t.grab
new file mode 100644 (file)
index 0000000..b7ec465
--- /dev/null
@@ -0,0 +1,33 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+xdotool sleep 1
+xdotool key Down Down Right Down Return
+xdotool sleep 1
+xdotool search --sync --name "One - Sample T Test" windowfocus --sync
+xdotool key Down Down Down Return
+xdotool key Tab
+xdotool sleep 1
+hard_type 76.8
+
+xdotool sleep 1
+xwd -name "One - Sample T Test" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/reliability.grab b/doc/screenshots/reliability.grab
new file mode 100644 (file)
index 0000000..2a4f16d
--- /dev/null
@@ -0,0 +1,30 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/hotel.sav
+xdotool key Return
+xdotool sleep 1
+xdotool mousemove --sync 300 10 click 1
+xdotool key Down Down Down Down Down Down Down Return
+xdotool search --sync --name "Reliability Analysis" windowfocus --sync
+xdotool key Down
+xdotool key Shift+Down Shift+Down Shift+Down Shift+Down
+xdotool key Tab space
+
+xdotool sleep 1
+xwd -name "Reliability Analysis" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/sort-simple.grab b/doc/screenshots/sort-simple.grab
new file mode 100644 (file)
index 0000000..22326f9
--- /dev/null
@@ -0,0 +1,34 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+xdotool key alt+v d
+xdotool sleep 1
+xdotool mousemove --sync 200 133 click 1
+xdotool sleep 1
+xdotool mousemove --sync 205 133 click 3
+xdotool key Down Down Down
+
+xdotool sleep 1
+tfile=`mktemp --suffix=.xwd`
+xwd -root > $tfile
+convert -crop 400x200+0+100 $tfile $output,tmp
+rm -f $tfile
+
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/sort.grab b/doc/screenshots/sort.grab
new file mode 100644 (file)
index 0000000..ffb7e54
--- /dev/null
@@ -0,0 +1,28 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/physiology.sav
+xdotool key Return
+xdotool sleep 1
+
+xdotool key alt+d s
+xdotool search --sync --name "Sort Cases" windowfocus --sync
+xdotool key Down shift+Down Tab Return Tab Tab
+
+xdotool sleep 1
+xwd -name "Sort Cases" > $output,tmp
+if test $? -ne 0; then fail; fi
diff --git a/doc/screenshots/split-status-bar.grab b/doc/screenshots/split-status-bar.grab
new file mode 100644 (file)
index 0000000..b8d24b5
--- /dev/null
@@ -0,0 +1,36 @@
+## PSPP - a program for statistical analysis.
+## Copyright (C) 2020 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+xdotool key ctrl+o
+hard_type $topsrcdir/examples/horticulture.sav
+xdotool key Return
+xdotool sleep 1
+xdotool key alt+d p
+xdotool search --sync --name "Split File" windowfocus --sync
+xdotool sleep 1
+xdotool key alt+t
+xdotool key shift+Tab
+xdotool sleep 1
+xdotool key Down Return
+xdotool key Tab Tab Tab Tab Tab space
+
+xdotool sleep 1
+tfile=`mktemp --suffix=.xwd`
+xwd -root > $tfile
+convert -crop 700x100+0+800 $tfile $output,tmp
+rm -f $tfile
+
+if test $? -ne 0; then fail; fi
index 2ec1bc5dc93cc59d6e55a2c8bab01b35240c0f90..c0e6a1c084d190fdad0a055bec2517d0c034228f 100644 (file)
@@ -142,6 +142,11 @@ first @cmd{DESCRIPTIVES} command.
 @caption {Running two @cmd{DESCRIPTIVES} commands, one with the @subcmd{SAVE} subcommand}
 @end float
 
+@float Screenshot, descriptives:scr
+@psppimage {descriptives}
+@caption {The Descriptives dialog box with two variables and Z-Scores option selected}
+@end float
+
 In @ref{descriptives:res}, we can see that there are 40 valid data for each of the variables
 and no missing values.   The mean average of the height and temperature is 16677.12
 and 37.02 respectively.  The descriptive statistics for temperature seem reasonable.
@@ -290,6 +295,11 @@ If you are using the graphic user interface, the dialog box is set up such that
 by default, several statistics are calculated.   Some are not particularly useful
 for categorical variables, so you may want to disable those.
 
+@float Screenshot, frequencies:scr
+@psppimage {frequencies}
+@caption {The frequencies dialog box with the @exvar{sex} and @exvar{occupation} variables selected}
+@end float
+
 From @ref{frequencies:res} it is evident that there are 33 males, 21 females and
 2 persons for whom their sex has not been entered.
 
@@ -1464,6 +1474,11 @@ The analysis is performed as shown in @ref{chisquare:ex}.
 There is only one test variable, @i{viz:} @exvar{sex}.  The other variables in the dataset
 are ignored.
 
+@float Screenshot, chisquare:scr
+@psppimage {chisquare}
+@caption {Performing a chi-square test using the graphic user interface}
+@end float
+
 In @ref{chisquare:res} the summary box shows that in the sample, there are more males
 than females.  However the significance of chi-square result is greater than 0.05
 --- the most commonly accepted p-value --- and therefore
@@ -1843,6 +1858,12 @@ using the @cmd{SELECT} command.
 @caption {Running a one sample T-Test after excluding all non-positive values}
 @end float
 
+@float Screenshot, one-sample-t:scr
+@psppimage {one-sample-t}
+@caption {Using the One Sample T-Test dialog box to test @exvar{weight} for a mean of 76.8kg}
+@end float
+
+
 @ref{one-sample-t:res} shows that the mean of our sample differs from the test value
 by -1.40kg.  However the significance is very high (0.610).  So one cannot
 reject the null hypothesis, and must conclude there is not enough evidence
@@ -1902,13 +1923,28 @@ using the @cmd{SELECT} command.
 The null hypothesis is that both males and females are on average
 of equal height.
 
+@float Screenshot, independent-samples-t:scr
+@psppimage {independent-samples-t}
+@caption {Using the Independent Sample T-test dialog, to test for differences of @exvar{height} between values of @exvar{sex}}
+@end float
+
+
 In this case, the grouping variable is @exvar{sex}, so this is entered
 as the variable for the @subcmd{GROUP} subcommand.  The group values are  0 (male) and
 1 (female).
 
 If you are running the proceedure using syntax, then you need to enter
 the values corresponding to each group within parentheses.
-
+If you are using the graphic user interface, then you have to open
+the ``Define Groups'' dialog box and enter the values corresponding
+to each group as shown in @ref{define-groups-t:scr}.  If, as in this case, the dataset has defined value
+labels for the group variable, then you can enter them by label
+or by value.
+
+@float Screenshot, define-groups-t:scr
+@psppimage {define-groups-t}
+@caption {Setting the values of the grouping variable for an Independent Samples T-test}
+@end float
 
 From @ref{independent-samples-t:res}, one can clearly see that the @emph{sample} mean height
 is greater for males than for females.  However in order to see if this
@@ -2230,6 +2266,11 @@ to use @cmd{COMPUTE} (@pxref{COMPUTE}) and this is what is done in @ref{reliabil
 In this case, all variables in the data set are used.  So we can use the special
 keyword @samp{ALL} (@pxref{BNF}).
 
+@float Screenshot, reliability:src
+@psppimage {reliability}
+@caption {Reliability dialog box with all variables selected}
+@end float
+
 @ref{reliability:res} shows that Cronbach's Alpha is 0.11  which is a value normally considered too
 low to indicate consistency within the data.  This is possibly due to the small number of
 survey questions.  The survey should be redesigned before serious use of the results are
index d33f71bfcab9a521b80c193c3870119fcf8a16c8..42a9b6b2a6916d396420347024eb8c7ea8d0e06d 100644 (file)
@@ -338,6 +338,11 @@ after correcting a data entry error}
 @end float
 
 
+@float Screenshot, autorecode:scr
+@psppimage {autorecode}
+@caption {Autorecode dialog box set to recode @exvar{occupation} to @exvar{occ}}
+@end float
+
 Notice in @ref{autorecode:res}, how  the new variable has been automatically
 allocated value labels which correspond to the strings of the old variable.
 This means that in future analyses the descriptive strings are reported instead
@@ -414,8 +419,17 @@ It also shows how you can add a label to this new variable (@pxref{VARIABLE LABE
 so that a more descriptive label appears in subsequent analyses, and this can be seen
 in the ouput from the @cmd{DESCRIPTIVES} command in @ref{bmi:res}.
 
+@float Screenshot, bmi:scr
+@psppimage {compute}
+@caption {Using the dialog box to generate a new variable and compute its values}
+@end float
+
 The expression which follows the @samp{=} sign can be as complicated as necessary.
 @xref{Expressions} for a precise description of the language accepted.
+Normally it is easiest to enter the code directly, however there is a dialog box
+available if desired.  This is illustrated in @ref{bmi:scr}.
+One advantage is that it offers a list of mathematical
+functions which can be selected and pasted into the expression.
 
 @float Results, bmi:res
 @psppoutput {compute}
@@ -499,6 +513,28 @@ are 2 or lower.
 In @ref{count:ex} the @cmd{COUNT} transformation creates a new variable, @exvar{low_counts} and
 its values are shown using the @cmd{LIST} command.
 
+If using the graphic user interface, a two step process must be used to set
+up the @cmd{COUNT} transformation.  The first dialog box (@ref{count:scr}) provides for the
+variables to be chosen.
+Then, one must click on the button marked ``Define Values...'' to reveal
+the dialog box for selecting the values to count.
+
+@float Screenshot, count:scr
+@psppimage {count}
+@caption {The variables @exvar{v1}, @exvar{v2} and @exvar{v3} selected, ready
+to define values to count}
+@end float
+
+In this dialog box, you must select the values you wish to count
+--- in this case all values up to and including 2 --- as shown in @ref{count-define:scr}
+and click ``Add''.  As many ranges or may be added as you desire.
+When all desired ranges have been added click ``Continue''.
+
+@float Screenshot, count-define:scr
+@psppimage {count-define}
+@caption {Count ``Define Values'' dialog with @samp{lowest thru 2} selected}
+@end float
+
 In @ref{count:res} we can see the values of @exvar{low_counts} after the @cmd{COUNT}
 transformation has completed.  The first value is 1, because there is only one
 variable amoung @exvar{v1}, @exvar{v2} and @exvar{3} which has a value of 2 or less.
@@ -871,3 +907,28 @@ this time in ascending order.
 Note that @cmd{SORT CASES}, like all other transformations, affects only the active file.
 It does not have any effect upon the @file{physiology.sav} file itself. For that, you
 would have to rewrite the file using the @cmd{SAVE} command (@pxref{SAVE}).
+
+When using the graphic user interface, it is often simpler to perform a sort
+directly from the data view.
+To do this, switch to the data view.  Select the column corresponding to the
+variable by which you want to sort and click button 1 and then click button 3.
+A popup menu will appear like that shown in @ref{sort-simple:scr}.  Select
+either ``Sort Ascending'' or ``Sort Descending'' from this menu.
+
+@float Screenshot, sort-simple:scr
+@psppimage {sort-simple}
+@caption {Sorting the data on a single variable @exvar{height}}
+@end float
+
+However, sometimes you will want to sort on two or more variables, and that is
+not possible using this method.  In this case, you must either use some code or
+the ``Sort Cases'' dialog from the Data menu.  @ref{sort:scr} shows the dialog
+box set up to perform a sort on both @exvar{sex} and @exvar{height}.
+Note that the order in which you enter the variables is important.  In this case,
+the data will be first sorted on @exvar{sex}, and then all cases for which @exvar{sex}
+is the same will then be sorted by @exvar{height}.
+
+@float Screenshot, sort:scr
+@psppimage {sort}
+@caption {Sorting the data on two variables @exvar{sex} and  @exvar{height}}
+@end float