Skip to content

Commit 2da4e42

Browse files
authored
SDK automation prep for html (#3222) (#3268)
1 parent 383991e commit 2da4e42

File tree

6 files changed

+63
-45
lines changed

6 files changed

+63
-45
lines changed

plugins/html/.CHECKSUM

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"spec": "1c682e5751de39f77df69ff820118640",
3-
"manifest": "f8496c6f37c90b1549c58634683b21a8",
4-
"setup": "8f8d60fa7c130285701aae5de46f6632",
2+
"spec": "49b79f0e8c4dfb3c6353812371d05915",
3+
"manifest": "d65ccfe2f8602b7dd112633062b099fb",
4+
"setup": "db867dafc899650683988f858d827f3e",
55
"schemas": [
66
{
77
"identifier": "docx/schema.py",

plugins/html/Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.3
1+
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.2.5
22

33
LABEL organization=rapid7
44
LABEL sdk=python
5-
LABEL type=plugin
6-
7-
RUN apt-get update && apt-get install -y texlive lmodern --no-install-recommends
85

96
WORKDIR /python/src
107

8+
RUN apt-get update && apt-get install -y texlive lmodern --no-install-recommends
9+
# root is required for the conversion to work. If USER set to nobody, actions/tests will fail
10+
1111
ADD ./plugin.spec.yaml /plugin.spec.yaml
1212
ADD ./requirements.txt /python/src/requirements.txt
1313

1414
RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
1515

1616
ADD . /python/src
1717

18-
RUN python setup.py build && python setup.py install
18+
RUN pip install .
1919

20-
# root is required for the conversion to work. If USER set to nobody, actions/tests will fail
20+
# User to run plugin code. The two supported users are: root, nobody
2121
USER root
2222

2323
ENTRYPOINT ["/usr/local/bin/icon_html"]

plugins/html/bin/icon_html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from sys import argv
66

77
Name = "HTML"
88
Vendor = "rapid7"
9-
Version = "1.2.7"
9+
Version = "1.2.8"
1010
Description = "Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. This plugin provides the ability to convert an HTML document into a variety of formats using [pypandoc](https://pypi.python.org/pypi/pypandoc). Supported formats are: DOCX, EPUB, Markdown, PDF, HTML5, Plain Text"
1111

1212

plugins/html/help.md

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ Example output:
271271

272272
# Version History
273273

274+
* 1.2.8 - Updated SDK to the latest version (6.2.5)
274275
* 1.2.7 - Initial updates for fedramp compliance | Updated SDK to the latest version
275276
* 1.2.6 - SDK Bump | Addressing Snyk vulnerabilities | Fixing Unit Tests | Dockerfile USER permission updated
276277
* 1.2.5 - Update requirements for pypandoc

plugins/html/plugin.spec.yaml

+51-34
Original file line numberDiff line numberDiff line change
@@ -3,54 +3,64 @@ extension: plugin
33
products: [insightconnect]
44
name: html
55
title: HTML
6-
description: "Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. This plugin provides the ability to convert an HTML document into a variety of formats using [pypandoc](https://pypi.python.org/pypi/pypandoc). Supported formats are: DOCX, EPUB, Markdown, PDF, HTML5, Plain Text"
7-
version: 1.2.7
6+
description: 'Hypertext Markup Language (HTML) is the standard markup language for
7+
documents designed to be displayed in a web browser. This plugin provides the ability
8+
to convert an HTML document into a variety of formats using [pypandoc](https://pypi.python.org/pypi/pypandoc).
9+
Supported formats are: DOCX, EPUB, Markdown, PDF, HTML5, Plain Text'
10+
version: 1.2.8
811
connection_version: 1
912
vendor: rapid7
1013
support: community
11-
supported_versions: ["2024-09-30"]
14+
supported_versions: ['2024-09-30']
1215
status: []
1316
cloud_ready: true
1417
fedramp_ready: true
1518
resources:
1619
source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/html
1720
license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE
1821
tags:
19-
- markdown
20-
- html
21-
- pdf
22-
- epub
23-
- docx
24-
- convert
25-
- utilities
22+
- markdown
23+
- html
24+
- pdf
25+
- epub
26+
- docx
27+
- convert
28+
- utilities
2629
hub_tags:
2730
use_cases: [data_utility]
2831
keywords: [markdown, html, pdf, epub, docx, convert, utilities, cloud_enabled]
2932
features: []
3033
sdk:
3134
type: slim
32-
version: 6.1.3
35+
version: 6.2.5
3336
user: root
37+
custom_cmd:
38+
- RUN apt-get update && apt-get install -y texlive lmodern --no-install-recommends
39+
- '# root is required for the conversion to work. If USER set to nobody, actions/tests
40+
will fail'
3441
links:
35-
- "[W3 Validator](https://validator.w3.org)"
42+
- '[W3 Validator](https://validator.w3.org)'
3643
key_features:
37-
- Convert an HTML document into another format to more easily export, share, or edit the document's contents
44+
- Convert an HTML document into another format to more easily export, share, or edit
45+
the document's contents
3846
version_history:
39-
- "1.2.7 - Initial updates for fedramp compliance | Updated SDK to the latest version"
40-
- "1.2.6 - SDK Bump | Addressing Snyk vulnerabilities | Fixing Unit Tests | Dockerfile USER permission updated"
41-
- "1.2.5 - Update requirements for pypandoc"
42-
- "1.2.4 - Actions modified in order to implement PluginExceptions"
43-
- "1.2.3 - Action HTML5: fix error with encoding to file"
44-
- "1.2.2 - Update to v4 Python plugin runtime"
45-
- "1.2.1 - New spec and help.md format for the Extension Library"
46-
- "1.2.0 - Update to add the Remove Scripts option to Text"
47-
- "1.1.0 - New action: Text"
48-
- "1.0.1 - Add `utilities` plugin tag for Marketplace searchability"
49-
- "1.0.0 - Update to v2 Python plugin architecture | Support web server mode"
50-
- "0.1.1 - SSL bug fix in SDK"
51-
- "0.1.0 - Initial plugin"
47+
- 1.2.8 - Updated SDK to the latest version (6.2.5)
48+
- 1.2.7 - Initial updates for fedramp compliance | Updated SDK to the latest version
49+
- 1.2.6 - SDK Bump | Addressing Snyk vulnerabilities | Fixing Unit Tests | Dockerfile
50+
USER permission updated
51+
- 1.2.5 - Update requirements for pypandoc
52+
- 1.2.4 - Actions modified in order to implement PluginExceptions
53+
- '1.2.3 - Action HTML5: fix error with encoding to file'
54+
- 1.2.2 - Update to v4 Python plugin runtime
55+
- 1.2.1 - New spec and help.md format for the Extension Library
56+
- 1.2.0 - Update to add the Remove Scripts option to Text
57+
- '1.1.0 - New action: Text'
58+
- 1.0.1 - Add `utilities` plugin tag for Marketplace searchability
59+
- 1.0.0 - Update to v2 Python plugin architecture | Support web server mode
60+
- 0.1.1 - SSL bug fix in SDK
61+
- 0.1.0 - Initial plugin
5262
references:
53-
- "[pypandoc](https://pypi.python.org/pypi/pypandoc)"
63+
- '[pypandoc](https://pypi.python.org/pypi/pypandoc)'
5464
actions:
5565
validate:
5666
title: Validate
@@ -61,7 +71,8 @@ actions:
6171
description: HTML Contents
6272
type: string
6373
required: true
64-
example: "<!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Automate with InsightConnect (HTML)!</p></body></html>"
74+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Automate
75+
with InsightConnect (HTML)!</p></body></html>
6576
output:
6677
validated:
6778
title: Is Validated
@@ -78,7 +89,8 @@ actions:
7889
description: Document to transform
7990
type: string
8091
required: true
81-
example: "<!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert HTML to Markdown</p></body></html>"
92+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert
93+
HTML to Markdown</p></body></html>
8294
output:
8395
markdown_contents:
8496
title: Contents
@@ -101,7 +113,8 @@ actions:
101113
description: Document to transform
102114
type: string
103115
required: true
104-
example: "<!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert HTML to HTML5</p></body></html>"
116+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert
117+
HTML to HTML5</p></body></html>
105118
output:
106119
html5_contents:
107120
title: Contents
@@ -124,7 +137,8 @@ actions:
124137
description: Document to transform
125138
type: string
126139
required: true
127-
example: "<!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert HTML to PDF</p></body></html>"
140+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert
141+
HTML to PDF</p></body></html>
128142
output:
129143
pdf:
130144
title: PDF
@@ -141,7 +155,8 @@ actions:
141155
description: Document to transform
142156
type: string
143157
required: true
144-
example: "<!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert HTML to EPUB</p></body></html>"
158+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert
159+
HTML to EPUB</p></body></html>
145160
output:
146161
epub:
147162
title: Epub
@@ -158,7 +173,8 @@ actions:
158173
description: Document to transform
159174
type: string
160175
required: true
161-
example: "<!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert HTML to DOCX</p></body></html>"
176+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect</title></head><body><p>Convert
177+
HTML to DOCX</p></body></html>
162178
output:
163179
docx:
164180
title: Docx
@@ -175,7 +191,8 @@ actions:
175191
description: Document to transform
176192
type: string
177193
required: true
178-
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect HTML</title></head><body><p>Automate with InsightConnect</p></body></html>
194+
example: <!DOCTYPE html><html><head><title>Rapid7 InsightConnect HTML</title></head><body><p>Automate
195+
with InsightConnect</p></body></html>
179196
remove_scripts:
180197
title: Remove Scripts
181198
description: Remove non-HTML scripts from the document

plugins/html/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
setup(name="html-rapid7-plugin",
6-
version="1.2.7",
6+
version="1.2.8",
77
description="Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. This plugin provides the ability to convert an HTML document into a variety of formats using [pypandoc](https://pypi.python.org/pypi/pypandoc). Supported formats are: DOCX, EPUB, Markdown, PDF, HTML5, Plain Text",
88
author="rapid7",
99
author_email="",

0 commit comments

Comments
 (0)