Skip to content

Commit

Permalink
help: migrate from scrollkeeper to yelp
Browse files Browse the repository at this point in the history
Fixes #81
  • Loading branch information
ensonic committed Aug 9, 2019
1 parent ab49c85 commit eb51b04
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 264 deletions.
7 changes: 1 addition & 6 deletions Makefile.am
Expand Up @@ -15,8 +15,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--enable-debug \
--disable-update-desktop \
--disable-update-mime \
--disable-update-icon-cache \
--disable-scrollkeeper
--disable-update-icon-cache

AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib \
Expand All @@ -43,8 +42,6 @@ EXTRA_DIST = \
intltool-merge.in \
intltool-update.in \
COPYING-DOCS \
omf.make \
xmldocs.make \
README.md TODO \
docs/version.entities.in \
docs/buzztrax.xsd \
Expand Down Expand Up @@ -150,8 +147,6 @@ uninstall-hook: update-icon-cache update-desktop-db update-mime-db
## We get warnings for left-over files when doing 'make distuninstallcheck'
distuninstallcheck_listfiles = find . -type f -print

## Workaround for scrollkeeper bug
distuninstallcheck_listfiles += | grep -v '/var/scrollkeeper'
## Workaround for installing files in own prefix
distuninstallcheck_listfiles += | grep -v '/share/mime'
## Workaround for installing icon theme in own prefix
Expand Down
5 changes: 0 additions & 5 deletions README.md
Expand Up @@ -67,11 +67,6 @@ environment variables. To use the apps these variables are enough:
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/buzztrax/share"
update-mime-database $HOME/buzztrax/share/mime/

to see the manual in yelp, you can skip this if reading the help
from buzztrax-edit's help menu is good enough for you:

export OMF_DIR="$OMF_DIR:$HOME/buzztrax/share/omf"

Likewise for the man-pages to be found:

export MANPATH=\$MANPATH:$prefix/share/man
Expand Down
20 changes: 2 additions & 18 deletions configure.ac
Expand Up @@ -505,27 +505,13 @@ AC_ARG_ENABLE(man,
AC_PATH_PROG([XSLTPROC], [xsltproc])
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)

dnl Check for scrollkeeper
AC_PATH_PROG(scrollkeeper_config, scrollkeeper-config, no)
if test x$scrollkeeper_config = xno; then
have_scrollkeeper=no
AC_MSG_WARN([Couldn't find scrollkeeper-config, please install the scrollkeeper package])
dnl if test x$xsltproc = xno; then
dnl AC_MSG_WARN([Couldn't find xsltproc, please install the libxml/libxslt package])
dnl fi
else
have_scrollkeeper=yes
fi
AM_CONDITIONAL(ENABLE_SCROLLKEEPER, test x$scrollkeeper_config != xno)
SCROLLKEEPER_BUILD_REQUIRED=0.3.5
AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED)

dnl User Documentation
YELP_HELP_INIT

dnl Check for aspell (spellcheck the docs)
AC_CHECK_PROGS(ASPELL,[aspell],[])
AM_CONDITIONAL(WITH_ASPELL,[test "x$ASPELL" != "x"])


dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS( \
Expand Down Expand Up @@ -682,7 +668,6 @@ AC_CONFIG_FILES(Makefile \
docs/version.entities \
docs/help/bt-edit/Makefile \
docs/help/bt-edit/C/Makefile \
docs/help/bt-edit/C/buzztrax-edit-C.omf \
docs/reference/bt-cmd/Makefile \
docs/reference/bt-core/Makefile \
docs/reference/bt-core/buzztrax-core.types \
Expand Down Expand Up @@ -717,7 +702,6 @@ Configuration

Documentation (API) : ${enable_gtk_doc}
Documentation (Man) : ${enable_man}
Documentation (User) : ${have_scrollkeeper}
Bindings Metadata (GIR) : ${enable_gir}

Alsa seq. for interaction ctrl. : ${use_alsa}
Expand Down
2 changes: 0 additions & 2 deletions docs/help/bt-edit/C/.gitignore
@@ -1,6 +1,4 @@
*~
buzztrax-edit-C.omf
buzztrax-edit-C.omf.out
buzztrax-edit.xml
Makefile
Makefile.in
Expand Down
43 changes: 3 additions & 40 deletions docs/help/bt-edit/C/Makefile.am
@@ -1,53 +1,19 @@
figdir = figures
docname = buzztrax-edit
lang = C
omffile = buzztrax-edit-C.omf
entities = legal.xml version.entities

all-local:
@-chmod -R u+w $(srcdir)
@cp $(top_builddir)/docs/version.entities $(srcdir)/version.entities

clean-local:
-@rm -f version.entities

# FIXME: only do this if ENABLE_SCROLLKEEPER ?
include $(top_srcdir)/xmldocs.make
dist-hook: app-dist-hook

# make a pdf using dblatex
# - it seems unneccesarily hard to get our logo onto the titlepage
# - we tried all sort of customizations ( -p dblatex_pdf.xsl )
buzztrax-edit.pdf: buzztrax-edit.xml dblatex_pdf.xsl
buzztrax-edit.pdf: index.docbook dblatex_pdf.xsl
dblatex \
-o buzztrax-edit.pdf \
-I figures \
buzztrax-edit.xml
index.docbook

buzztrax-edit.txt: buzztrax-edit.xml
buzztrax-edit.txt: index.docbook
xmlto txt buzztrax-edit.xml

buzztrax-edit2.pdf: buzztrax-edit.xml
xsltproc \
--stringparam paper.type A4 \
--stringparam fop.extentions 1 \
--stringparam fop1.extentions 1 \
--stringparam admon.graphics 1 \
http://docbook.sourceforge.net/release/xsl/current/fo/fo.xsl \
buzztrax-edit.xml >buzztrax-edit.fo; \
fop -fo buzztrax-edit.fo -pdf buzztrax-edit.pdf

# statistics for index building:
# sed -e 's/[[:space:]]\+/\n/g' buzztrax-edit.txt | sed 's/[,.\(\)"]//g' | egrep -v '^ *$' | sort -f | uniq -ic | sort -n
# sed -e 's/[[:space:]]\+/\n/g' buzztrax-edit.txt | sed 's/[,.\(\)"]//g' | egrep -v '^ *$' | egrep -v '^..?$' | sort -f | uniq -ic | sort -n


# here we should
# a) invoke xslproc, if available
# stylesheet=/opt/gnome/share/sgml/docbook/yelp/docbook/html/docbook.xsl
# xsltproc --nonet $(stylesheet) $(docname).xml
# b) simple install pregenerated html (pdf)

# this relies on particular names in the tests
# it would be nicer to fix the names in the tests and apply some rule:
# $$base/(*).png -> figures/\1.png
Expand Down Expand Up @@ -132,7 +98,4 @@ update_figures:
pngtopnm "$$base/buzztrax_settings_ui.png" | ../../mk-shadow.sh | pnmtopng >figures/settings-ui.png; \
fi;

## add shadows (now integrated above)
## for PNG in *.png; do pngtopnm "$PNG" | ../../../mk-shadow.sh | pnmtopng > "${PNG//.png}"-with-shadow.png

.PHONY: update-figures
34 changes: 0 additions & 34 deletions docs/help/bt-edit/C/buzztrax-edit-C.omf.in

This file was deleted.

File renamed without changes.
22 changes: 20 additions & 2 deletions docs/help/bt-edit/Makefile.am
@@ -1,9 +1,27 @@
SUBDIRS = C
@YELP_HELP_RULES@
HELP_ID = buzztrax-edit

HELP_FILES = \
index.docbook \
legal.xml \
version.entities

DOC_MODULE = buzztrax-edit
# TODO(ensonic): not complete list, see update_figures
HELP_MEDIA = \
figures/main-window.png

# We have no translation for the manual
HELP_LINUAGS =

SUBDIRS = C

EXTRA_DIST = C/aspell.pws

version.entities: $(abs_top_srcdir)/docs/version.entities
@cp $< $@

CLEANFILES = version.entities

if WITH_ASPELL
check-local:
@echo "Spellchecking C/$(DOC_MODULE).xml..."
Expand Down
54 changes: 0 additions & 54 deletions omf.make

This file was deleted.

4 changes: 2 additions & 2 deletions src/ui/edit/main-menu.c
Expand Up @@ -543,8 +543,8 @@ on_menu_help_activate (GtkMenuItem * menuitem, gpointer user_data)
//BtMainMenu *self=BT_MAIN_MENU(user_data);
GST_INFO ("menu help event occurred");

// use "ghelp:buzztrax-edit?topic" for context specific help
gtk_show_uri_simple (GTK_WIDGET (menuitem), "ghelp:buzztrax-edit");
// use "help:buzztrax-edit?topic" for context specific help
gtk_show_uri_simple (GTK_WIDGET (menuitem), "help:buzztrax-edit");
}

static void
Expand Down
101 changes: 0 additions & 101 deletions xmldocs.make

This file was deleted.

0 comments on commit eb51b04

Please sign in to comment.