[gimp-web-devel/hugo: 10/16] tool for updating API docs




commit 0691a0dc92e42870f53f93e67fab63e1fdb409c1
Author: robin-swift <robinswiftart gmail com>
Date:   Wed Jul 27 16:26:51 2022 +0100

    tool for updating API docs

 scripts/make_api_docs.sh   | 25 -------------------------
 scripts/update_api_docs.sh | 29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 25 deletions(-)
---
diff --git a/scripts/update_api_docs.sh b/scripts/update_api_docs.sh
new file mode 100644
index 0000000..c448d78
--- /dev/null
+++ b/scripts/update_api_docs.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+function get_api_docs () {
+DOWNLOAD_URL="https://download.gimp.org/pub/gimp/v$1";
+
+echo "Looking up current revision..."
+VERSION=`wget -O - $DOWNLOAD_URL | grep "0.0_LATEST-IS" | sed "s/.*LATEST-IS-//;s|</a>.*||"`
+
+echo "Getting tarball..."
+wget $DOWNLOAD_URL/gimp-$VERSION.tar.bz2
+
+echo "Extracting..."
+tar xf gimp-$VERSION.tar.bz2
+
+echo "Installing into static/..."
+mkdir -p static/libgimp/$1
+mkdir -p static/libgimp-ui/$1
+
+mv gimp-$VERSION/devel-docs/libgimp/html/* static/libgimp/$1
+mv gimp-$VERSION/devel-docs/libgimp-ui/html/* static/libgimp-ui/$1
+
+echo "Tidying up..."
+rm -fr gimp-$VERSION gimp-$VERSION.tar.bz2
+
+echo "Done."
+}
+
+get_api_docs 2.8
+get_api_docs 2.10


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]