Skip to content

Commit 9d74235

Browse files
committed
Update docs, docs/Makefile and CD workflow
1 parent 0a50062 commit 9d74235

5 files changed

Lines changed: 16 additions & 10 deletions

File tree

‎.github/workflows/cd.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ jobs:
5252
name: splunk-sdk-${{ steps.get-version.outputs.version }}
5353
path: ${{ env.DIST_DIR }}
5454
- name: Generate API reference
55-
run: make -C ./docs html
55+
run: make -C ./docs zip
5656
- name: Upload docs artifact
5757
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
5858
with:
5959
name: python-sdk-docs
60-
path: docs/_build/html
60+
path: docs/_build/splunk-sdk-python-docs.zip
6161

6262
publish-pre-release:
6363
if: startsWith(github.ref, 'refs/tags/') == false

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You may be asking:
1414
- [Where does the SDK fit in all this?](https://dev.splunk.com/enterprise/docs/devtools/python/sdk-python/)
1515
- What's the difference between `import splunklib` and `import splunk`?
1616
- This repo contains `splunklib`, whereas `splunk` is an internal library bundled with the Splunk platform.
17-
- [How do I use AI in Splunk Apps?](splunklib/ai/README.md)
17+
- [How do I use AI in Splunk Apps?](https://github.com/splunk/splunk-sdk-python/blob/develop/splunklib/ai/README.md)
1818

1919
## Getting started
2020

@@ -75,11 +75,11 @@ gtar --transform='s,^,<your_app>/,' \
7575

7676
The easiest and most effective way of learning how to use this library should be reading through the apps in our test suite, as well as the [splunk-app-examples](https://github.com/splunk/splunk-app-examples) repository. They show how to programmatically interact with the Splunk platform in a variety of scenarios - from basic metadata retrieval, one-shot searching and managing saved searches to building complete applications with modular inputs and custom search commands.
7777

78-
For details, see the [examples using the Splunk Enterprise SDK for Python](https://dev.splunk.com/enterprise/docs/devtools/python/sdk-python/examplespython) on the Splunk Developer Portal, as well as the [Splunk Enterprise SDK for Python Reference](http://docs.splunk.com/Documentation/PythonSDK)
78+
For details, see the [examples using the Splunk Enterprise SDK for Python](https://dev.splunk.com/enterprise/docs/devtools/python/sdk-python/examplespython) on the Splunk Developer Portal, as well as the [Splunk Enterprise SDK for Python Reference](https://docs.splunk.com/Documentation/PythonSDK)
7979

8080
#### Using AI in Splunk Apps
8181

82-
You can now leverage AI capabilities within your Splunk Apps using the `splunklib.ai` package. Take a look at its [README](splunklib/ai/README.md) to find out how to enhance your Apps agentic behaviour, custom tools and more.
82+
You can now leverage AI capabilities within your Splunk Apps using the `splunklib.ai` package. Take a look at its [README](https://github.com/splunk/splunk-sdk-python/blob/develop/splunklib/ai/README.md) to find out how to enhance your Apps agentic behaviour, custom tools and more.
8383

8484
#### Connecting to a Splunk Enterprise instance
8585

@@ -196,7 +196,7 @@ class MyScript(Script):
196196
### Contributions
197197

198198
We welcome all contributions!
199-
If you would like to contribute to the SDK, see [Contributing to Splunk](https://www.splunk.com/en_us/form/contributions.html). For additional guidelines, see [CONTRIBUTING](CONTRIBUTING.md).
199+
If you would like to contribute to the SDK, see [Contributing to Splunk](https://www.splunk.com/en_us/form/contributions.html). For additional guidelines, see [CONTRIBUTING](https://github.com/splunk/splunk-sdk-python/blob/develop/CONTRIBUTING.md).
200200

201201
### Setting up a development environment
202202

@@ -264,7 +264,7 @@ setup_logging(logging.DEBUG)
264264
| :------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------- |
265265
| [Splunk Developer Portal](http://dev.splunk.com) | General developer documentation, tools, and examples |
266266
| [Integrate the Splunk platform using development tools for Python](https://dev.splunk.com/enterprise/docs/devtools/python) | Documentation for Python development |
267-
| [Splunk Enterprise SDK for Python Reference](http://docs.splunk.com/Documentation/PythonSDK) | SDK API reference documentation |
267+
| [Splunk Enterprise SDK for Python Reference](https://docs.splunk.com/Documentation/PythonSDK) | SDK API reference documentation |
268268
| [REST API Reference Manual](https://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTprolog) | Splunk REST API reference documentation |
269269
| [Splunk>Docs](https://docs.splunk.com/Documentation) | General documentation for the Splunk platform |
270270
| [GitHub Wiki](https://github.com/splunk/splunk-sdk-python/wiki/) | Documentation for this SDK's repository on GitHub |

‎docs/Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44

55
BUILDDIR = ./_build
66
HTMLDIR = ${BUILDDIR}/html
7+
ZIPFILE = ${BUILDDIR}/splunk-sdk-python-docs.zip
78

8-
.PHONY: html
9+
.PHONY: html zip
910
html:
1011
rm -rf $(BUILDDIR)
1112
sphinx-build -b html -d $(BUILDDIR)/doctrees . $(HTMLDIR)
1213
sh munge_links.sh $(HTMLDIR)
1314
@echo "[splunk-sdk] ---"
1415
@echo "[splunk-sdk] Build finished. HTML pages available at docs/$(HTMLDIR)."
16+
17+
zip: html
18+
cd $(HTMLDIR) && zip -r $(abspath $(ZIPFILE)) .
19+
@echo "[splunk-sdk] Zip available at docs/$(ZIPFILE)."

‎docs/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
# Add any paths that contain custom static files (such as style sheets) here,
121121
# relative to this directory. They are copied after the builtin static files,
122122
# so a file named "default.css" will overwrite the builtin "default.css".
123-
html_static_path = ["css"]
123+
html_static_path = ["CSS"]
124124

125125

126126
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,

‎docs/munge_links.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ TARGET=$1
44

55
for file in $TARGET/*.html; do
66
echo ${file}
7-
sed -i -e 's/class="reference external"/class="reference external" target="_blank"/g' "${file}"
7+
# we use perl instead of sed - macOS sed -i creates backup files, but -i '' makes it not work on Linux
8+
perl -i -pe 's/class="reference external"/class="reference external" target="_blank"/g' "${file}"
89
done

0 commit comments

Comments
 (0)