This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble-scanners.git

commit f6cf17e962f4a2eb2b755c245f0d2cb246dbb760
Author: Daniel Gruno <humbed...@apache.org>
AuthorDate: Fri Mar 2 16:33:45 2018 +0100

    add forum type, and a date-string field for histograms
---
 src/plugins/scanners/discourse.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/scanners/discourse.py 
b/src/plugins/scanners/discourse.py
index cfa823e..6b2a44b 100644
--- a/src/plugins/scanners/discourse.py
+++ b/src/plugins/scanners/discourse.py
@@ -118,11 +118,13 @@ def scanJob(KibbleBit, source, cat, creds):
                     'sourceID': source['sourceID'],
                     'organisation': source['organisation'],
                     
+                    'type': 'discourse',
                     'category': cat['slug'],
                     'title': topic['title'],
                     'creator': allUsers[topic['posters'][0]['user_id']]['id'],
                     'creatorName': 
allUsers[topic['posters'][0]['user_id']]['name'],
                     'created': CreatedDate,
+                    'createdDate': time.strftime("%Y/%m/%d %H:%M:%S", 
time.gmtime(CreatedDate)),
                     'updated': UpdatedDate,
                     'solved': False,    # Discourse doesn't have this notion, 
but other forums might.
                     'posts': topic['posts_count'],
@@ -177,8 +179,10 @@ def scanJob(KibbleBit, source, cat, creds):
                         'sourceID': source['sourceID'],
                         'organisation': source['organisation'],
                         
+                        'type': 'discourse',
                         'creator': uhash,
                         'created': CreatedDate,
+                        'createdDate': time.strftime("%Y/%m/%d %H:%M:%S", 
time.gmtime(CreatedDate)),
                         'topic': dhash,
                         'post_id': post['id'],
                         'text': post['cooked'],

-- 
To stop receiving notification emails like this one, please contact
humbed...@apache.org.

Reply via email to