Skip to content

Commit

Permalink
Convert body text to markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
kostajh committed Apr 4, 2014
1 parent 3eda81d commit db3f6df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 6 additions & 2 deletions bugwarrior/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It currently supports the following remote resources:
- `teamlab <http://www.teamlab.com/>`_
- `redmine <http://www.redmine.org/>`_
- `jira <http://www.atlassian.com/software/jira/overview>`_
- `activecollab <http://www.activecollab.com>`_ (2.x and 3.x)
- `activecollab <http://www.activecollab.com>`_ (2.x and 3.x/4.x)
- `phabricator <http://phabricator.org/>`_

Configuring
Expand Down Expand Up @@ -361,7 +361,11 @@ Create a ``~/.bugwarriorrc`` file with the following contents.
# will make 21 API calls on each run: 1 call to get a list of favorites, then
# 2 API calls per projects, one for tasks and one for subtasks.
#
# You must install the pyac library (python-activecollab): `pip install pyac`.
# Required python modules:
#
# - pypandoc
# - pyac
#
[activecollab]
service = activecollab
activecollab.url = https://ac.example.org/api.php
Expand Down
10 changes: 5 additions & 5 deletions bugwarrior/services/activecollab.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import itertools
import json
import urllib2
import time

import six
from twiggy import log

import pypandoc
from pyac.library import activeCollab
from bugwarrior.services import IssueService, Issue
from bugwarrior.config import die
Expand Down Expand Up @@ -128,7 +126,8 @@ def to_taskwarrior(self):
'project': self.record['project'],
'priority': self.get_priority(),
self.NAME: self.record.get('name'),
self.BODY: self.record.get('body'),
self.BODY: pypandoc.convert(self.record.get('body'),
'md', format='html'),
self.PERMALINK: self.record['permalink'],
self.TASK_ID: self.record.get('task_id'),
self.PROJECT_ID: self.record['project'],
Expand Down Expand Up @@ -192,7 +191,8 @@ def __init__(self, *args, **kw):
self.client = ActiveCollabClient(
self.url, self.key, self.user_id, self.projects
)
self.ac = activeCollab(url=self.url, key=self.key, user_id=self.user_id)
self.ac = activeCollab(url=self.url, key=self.key,
user_id=self.user_id)

data = self.ac.get_projects()
for item in data:
Expand Down

0 comments on commit db3f6df

Please sign in to comment.