Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clowdflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Shakour
clowdflows
Commits
a2716a8b
Commit
a2716a8b
authored
Nov 12, 2013
by
Janez K
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added split documents widget
parent
3ae1e412
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
1 deletion
+87
-1
workflows/base/db/package_data.json
workflows/base/db/package_data.json
+75
-0
workflows/base/library.py
workflows/base/library.py
+12
-1
No files found.
workflows/base/db/package_data.json
View file @
a2716a8b
...
...
@@ -1579,6 +1579,81 @@
"description"
:
""
}
},
{
"pk"
:
238
,
"model"
:
"workflows.abstractwidget"
,
"fields"
:
{
"category"
:
34
,
"treeview_image"
:
""
,
"name"
:
"Filter documents"
,
"is_streaming"
:
false
,
"uid"
:
"261a890d-3c77-4fbf-a462-b873ca3d400e"
,
"interaction_view"
:
""
,
"image"
:
""
,
"package"
:
"base"
,
"static_image"
:
""
,
"post_interact_action"
:
""
,
"user"
:
null
,
"visualization_view"
:
""
,
"streaming_visualization_view"
:
""
,
"action"
:
"split_documents"
,
"wsdl_method"
:
""
,
"wsdl"
:
""
,
"interactive"
:
false
,
"has_progress_bar"
:
false
,
"order"
:
1
,
"description"
:
""
}
},
{
"pk"
:
521
,
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
238
,
"name"
:
"String"
,
"short_name"
:
"str"
,
"uid"
:
"21652a75-6742-4330-9bc3-9683f30a5618"
,
"default"
:
""
,
"required"
:
false
,
"multi"
:
false
,
"parameter_type"
:
null
,
"variable"
:
"string"
,
"parameter"
:
false
,
"order"
:
1
,
"description"
:
""
}
},
{
"pk"
:
522
,
"model"
:
"workflows.abstractinput"
,
"fields"
:
{
"widget"
:
238
,
"name"
:
"Filter"
,
"short_name"
:
"flt"
,
"uid"
:
"ccc080f1-e7e4-4bd7-9837-b59dc9037ae9"
,
"default"
:
"!classname"
,
"required"
:
false
,
"multi"
:
false
,
"parameter_type"
:
"text"
,
"variable"
:
"class"
,
"parameter"
:
true
,
"order"
:
2
,
"description"
:
""
}
},
{
"pk"
:
248
,
"model"
:
"workflows.abstractoutput"
,
"fields"
:
{
"widget"
:
238
,
"name"
:
"String"
,
"short_name"
:
"str"
,
"variable"
:
"string"
,
"uid"
:
"cc43f6b5-d012-46b7-9b28-e19d22410ed3"
,
"order"
:
1
,
"description"
:
""
}
},
{
"pk"
:
237
,
"model"
:
"workflows.abstractwidget"
,
...
...
workflows/base/library.py
View file @
a2716a8b
...
...
@@ -143,4 +143,15 @@ def base_ravel_list(input_dict):
#end
def
base_wordcloud
(
input_dict
):
return
{}
\ No newline at end of file
return
{}
def
split_documents
(
input_dict
):
output_dict
=
{}
documents
=
input_dict
[
'string'
].
splitlines
()
query
=
input_dict
[
'class'
]
new_documents
=
[]
for
doc
in
documents
:
if
doc
.
split
(
' '
,
1
)[
0
]
==
input_dict
[
'class'
]:
new_documents
.
append
(
doc
.
split
(
" "
,
1
)[
1
])
output_dict
[
'string'
]
=
"
\n
"
.
join
(
new_documents
)
return
output_dict
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment