Skip to content

Commit

Permalink
Add licence and update description
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuskarotkis authored and Wagner committed Aug 6, 2021
1 parent 74f9776 commit dd15c62
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/user/bots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3267,7 +3267,12 @@ Truncate By Delimiter
* `max_length`: max string length
* `field`: string field
Example: Cut through a long domain with a dot.
Example: Cut through a long domain with a dot. Truncated until the domain not exceeds the maximum length.
input domain = www.subdomain.web.secondsubomain.test.domain.com
delimiter = '.'
max_length = 20
results = test.domain.com
.. _intelmq.bots.experts.truncate_by_delimiter.expert:
Expand Down
3 changes: 3 additions & 0 deletions intelmq/bots/experts/truncate_by_delimiter/expert.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
"""
Cut string if length is bigger than max
SPDX-FileCopyrightText: 2021 Marius Karotkis <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
from intelmq.lib.bot import Bot

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
"""
Testing truncate by delimiter bot
SPDX-FileCopyrightText: 2021 Marius Karotkis <[email protected]>
SPDX-License-Identifier: AGPL-3.0-or-later
"""
import unittest
import intelmq.lib.test as test
Expand Down

0 comments on commit dd15c62

Please sign in to comment.