ogarcia / trellowarrior Goto Github PK
View Code? Open in Web Editor NEWTool to sync Taskwarrior projects with Trello boards
License: GNU General Public License v3.0
Tool to sync Taskwarrior projects with Trello boards
License: GNU General Public License v3.0
Hi ! Thanks for this amazing piece of software.
I have a few issues with it though,
Expected behaviour
On a board, when adding a card, when adding a card and syncing, everything sync properly, and I have the same card / task on both applications.
Observed behaviour
With each sync, a few new cards are added. The number of cards added is related to the number of cards already present.
It also seems that my tasks on taskwarrior have a few urls, as if there were no checks of an already present URL / card, and thus the creation of a new card.
After a few syncs on a blanck board with one task, it looks like that :
Here are the contents of such a "created by sync" card on taskwarrior :
# Name Editable details
# ----------------- ----------------------------------------------------
# ID: 22
# UUID: xxxxxxxxxxx
# Status: Pending
# Mask:
# iMask:
Project: test
# Separate the tags with spaces, like this: tag1 tag2
Tags:
Description: trellolistname:'A FAIRE'
Created: 2021-04-12 08:09:46
Started:
Ended:
Scheduled:
Due:
Until:
Recur:
Wait until:
# Modified: 2021-04-12 08:10:18
Parent:
# Annotations look like this: <date> -- <text> and there can be any number of them.
# The ' -- ' separator between the date and text field should not be removed.
# A "blank slot" for adding an annotation follows for your convenience.
Annotation: 2021-04-12 08:09:46 -- [Trello URL] https:\/\/trello.com\/c\/azertyuiop
Annotation: 2021-04-12 08:10:18 -- [Trello URL] https:\/\/trello.com\/c\/lollipop ##they are different cards, with different links.
Annotation: 2021-04-12 08:21:56 --
# Dependencies should be a comma-separated list of task IDs/UUIDs or ID ranges, with no spaces.
Dependencies:
# User Defined Attributes
UDA priority:
UDA trelloid:
UDA trellolistname:
# End
I've just set up trello warrior to work from my linux laptop and my iMac.
This way I can sink them both to be indenticual and sync everything with the same trelloboard.
after making changes in my iMac and doing trellowarrior sync
I move to my Linux laptop and once I do trellowarrior sync
I get the following
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.trello.com', port=443): Max retries exceeded with url: /1/members/me/boards/?filter=open (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7ce3078ca0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
I've also gotten
File "/usr/lib/python3.8/site-packages/trello/trelloclient.py", line 231, in fetch_json
raise ResourceUnavailable("%s at %s" % (response.text, url), response)
trello.exceptions.ResourceUnavailable: {"message":"Rate limit exceeded: requests per interval for API token","error":"API_TOKEN_LIMIT_EXCEEDED"} at https://api.trello.com/1/cards/********************* (HTTP status: 429)
If I open that link to api.trello.com I get this
Is there anyway to search what card it is? Either in trello, or with task warrior, since it's not a taskwarrior ID I can not easily search it, to see if that specific card is causing conflicts.
For both oth this errors, If I try again after 1 minute or 2 trellowarrior sync
works again correctly.
After this the only issue I can't figure out why is task count is not showing, I'm not sure if some tasks were not synced
I use VIT to visualize my tasks and edit them
when I go to next
in my Linux laptop (the first computer where I set up all of my tasks) I have
177 tasks shown
after a trellowarrior sync
my imac shows
159 tasks shown
I can't figure out what are the missing tasks, nor do I get an error after sync, is there anything I'm missing.
I made the set up in my imac exactly the same as my linux set up. I copied the exact same api numbers, is this correct?
Please, let me know if there's any part of the process I'm missing, to have the exact same setup in both computer and in trello.
Thank you
The original py-trello is not working anymore. It has been broken for about 6 weeks. Please consider using this temporary fix mentioned by @Konano at the end of this issue.
Nice project - I'm struggling to get started with it though :(
I've just followed the README to install TrelloWarrior, but I'm not able to call TrelloWarrior with thh authenticate command.
I have:
(trw) marsh@wuji:~$ pip2 show py-trello tasklib
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: py-trello
Version: 0.17.1
Summary: Python wrapper around the Trello API
Home-page: https://trello.com/board/py-trello/4f145d87b2f9f15d6d027b53
Author: Richard Kolkovich
Author-email: [email protected]
License: BSD License
Location: /home/marsh/trw/lib/python2.7/site-packages
Requires: pytz, requests, requests-oauthlib, python-dateutil
Required-by: trellowarrior
---
Name: tasklib
Version: 2.2.0
Summary: Python Task Warrior library
Home-page: https://github.com/robgolding63/tasklib
Author: Rob Golding
Author-email: [email protected]
License: BSD
Location: /home/marsh/trw/lib/python2.7/site-packages
Requires: tzlocal, pytz
Required-by: trellowarrior
when authorising I get:
(trw) marsh@wuji:~$ trellowarrior auth --api-key 5dc73ba01fd7a7d6b9b06f08b24e0f45 --api-key-secret xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --expiration 30days --name TrelloWarrior
Traceback (most recent call last):
File "/home/marsh/trw/bin/trellowarrior", line 5, in <module>
from trellowarrior.main import main
File "/home/marsh/trw/local/lib/python2.7/site-packages/trellowarrior/main.py", line 13, in <module>
from tasklib.task import Task
File "/home/marsh/trw/local/lib/python2.7/site-packages/tasklib/__init__.py", line 1, in <module>
from .backends import TaskWarrior
File "/home/marsh/trw/local/lib/python2.7/site-packages/tasklib/backends.py", line 9, in <module>
from functools import lru_cache
ImportError: cannot import name lru_cache
Have I done something stupid?
I'm interested in support for multiple Trello lists for mapping to the "doing" status that could be differentiated with tags or a suffix to the project name. Just wondering if this is something that would be precluded or made more difficult by the current design in any way, and, if not, if this is something you'd accept a PR for.
It's not a high priority, as it a PEBKAC, still shows how one can make a mistake. If discussions were enabled I'd wouldn't make an issue out of this. Especially that I've just made the same mistake as in #21. Still there could be an issue with quoting a string.
As far as I see in the docs and in the code the configuration stanza is sync_projects
(ending with a “s”). Yet if I quote the string:
❯ grep '^sync' ~/.config/trellowarrior/trellowarrior.conf
sync_projects = 'project_name'
❯ trellowarrior -v sync
INFO:TrelloWarrior:Setting loglevel to INFO
Traceback (most recent call last):
File "/home/dzwiedziu/.local/bin/trellowarrior", line 8, in <module>
sys.exit(main())
File "/home/dzwiedziu/.local/lib/python3.10/site-packages/trellowarrior/main.py", line 128, in main
config.configure(config_file=args.config, projects=args.projects)
File "/home/dzwiedziu/.local/lib/python3.10/site-packages/trellowarrior/config.py", line 129, in configure
logger.warning('Missing config section for sync project \'{}\', ignoring it'.format(sync_project))
NameError: name 'sync_project' is not defined
...so I've changed to sync_project
:
❯ sed -i -e 's/^sync_projects/sync_project/' ~/.config/trellowarrior/trellowarrior.conf
❯ grep '^sync' ~/.config/trellowarrior/trellowarrior.conf
sync_project = 'project_name'
❯ trellowarrior -v sync
INFO:TrelloWarrior:Setting loglevel to INFO
No projects to sync
This made me search the docs and code again, as I was overthinking what can be the issue. AFAIK now trellowarrior did exactly what it was coded for – no sync_projects
, no sync.
The fix? Remove apostrophes from sync_projects
:
❯ grep '^sync' ~/.config/trellowarrior/trellowarrior.conf
sync_projects = project_name
❯ trellowarrior -v sync
INFO:TrelloWarrior:Setting loglevel to INFO
INFO:trellowarrior.clients.trellowarrior:Syncing project project_name step 1: delete Trello cards that already deleted in Taskwarrior
INFO:trellowarrior.clients.trellowarrior:Syncing project project_name step 2: syncing changes between Taskwarrior and Trello
INFO:trellowarrior.clients.trellowarrior:Syncing project project_name step 3: delete Takswarrior tasks that already deleted in Trello
INFO:trellowarrior.clients.trellowarrior:Syncing project project_name step 4: upload new Takswarrior tasks
INFO:trellowarrior.clients.trellowarrior:Project project_name synchronized
Hey, community.
First of all, thanks for the flawless amazing integration!
I was wondering if there is any convenient way to keep the synchronization near "real-time" between Trello and taskwarrior? Perhaps some sort of a daemon process?
This project works great for a personal board, but when I tried to run sync on a collaborative board, it would import all projects regardless of the assignee. The owner's username should be used to filter them out.
It would be great to create a mapping between Trello tasks description to Taskwarrior's annotation field, so the synchronization would also populate those fields
I'm getting this on install:
trellowarrior.py: error: unrecognized arguments: --trello-name xxx
using the line given from the docs:
trellowarrior.py -c path/to/your/configfile authenticate --api-key your_api_key --api-key-secret your_api_secret --trello-name TrelloWarrior --expiration 30days
...is there something I could have done wrong?
I cloned the project locally and have installed both of the python libraries. API Keys should be good (they came from Trello - as suggested).
I'm running Debian Buster.
It would be great to have a link mapping between trellos's card and taskwarrior task.
Perhaps something like this:
On trello: My card (https://trello.com/c/RaBOy722/2-my-card)
On taskwarrior: My card (with an attribute UDA trellolink: https://trello.com/c/RaBOy722/2-my-card
)
After deleting task in taskwarrior, trellowarrior sync
return this error:
Traceback (most recent call last):
File "/home/username/.local/bin/trellowarrior", line 8, in <module>
sys.exit(main())
File "/home/username/.local/lib/python3.8/site-packages/trellowarrior/main.py", line 134, in main
args.func(args)
File "/home/username/.local/lib/python3.8/site-packages/trellowarrior/commands/sync.py", line 15, in sync
trellowarrior_client.sync_project(project)
File "/home/username/.local/lib/python3.8/site-packages/trellowarrior/clients/trellowarrior.py", line 196, in sync_project
self.trello_client.delete_card(taskwarrior_deleted_task['trelloid'])
AttributeError: 'TrelloClient' object has no attribute 'delete_card'
Do I miss any option in trellowarrior.conf
?
[personal]
taskwarrior_project_name = REMIND
trello_board_name = remind
trello_todo_list = To do
trello_doing_list = Doing
trello_done_list = Done
Task warrior stores dates and times as UTC, and trello gives them with a timezone offset according to your local time (maybe that's the local time of who created the card, don't know). Somewhere during syncing, this timezone information is lost and the card due dates get moved back or forward according to the timezone offset. It must be something like this:
I'm in timezone UTC+10:30, and every time i run trellowarrior to sync, it pushes the due dates of cards/tasks forward by several hours (haven't determined if consistent, or by what exact amount each time)
TL;DR: a bug in timezone handling is causing due dates to be wrongly changed on sync when certain conditions are met.
So I tried to run trellowarrior
and it get's me this error:
Traceback (most recent call last):
File "/usr/lib/python3.10/zoneinfo/_common.py", line 12, in load_tzdata
return importlib.resources.open_binary(package_name, resource_name)
File "/usr/lib/python3.10/importlib/resources.py", line 46, in open_binary
return reader.open_resource(resource)
File "/usr/lib/python3.10/importlib/abc.py", line 433, in open_resource
return self.files().joinpath(resource).open('rb')
File "/usr/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/home/dinhego/.local/lib/python3.10/site-packages/tzdata/zoneinfo/localtime'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/sbin/trellowarrior", line 33, in <module>
sys.exit(load_entry_point('trellowarrior==1.3.2', 'console_scripts', 'trellowarrior')())
File "/sbin/trellowarrior", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/trellowarrior/main.py", line 13, in <module>
from trellowarrior.commands.sync import sync
File "/usr/lib/python3.10/site-packages/trellowarrior/commands/sync.py", line 9, in <module>
from trellowarrior.clients.trellowarrior import TrelloWarriorClient
File "/usr/lib/python3.10/site-packages/trellowarrior/clients/trellowarrior.py", line 9, in <module>
from trellowarrior.clients.taskwarrior import TaskwarriorClient
File "/usr/lib/python3.10/site-packages/trellowarrior/clients/taskwarrior.py", line 10, in <module>
from tasklib.backends import TaskWarrior as Client
File "/usr/lib/python3.10/site-packages/tasklib/__init__.py", line 1, in <module>
from .backends import TaskWarrior
File "/usr/lib/python3.10/site-packages/tasklib/backends.py", line 11, in <module>
from .task import Task, TaskQuerySet, ReadOnlyDictView
File "/usr/lib/python3.10/site-packages/tasklib/task.py", line 10, in <module>
from .serializing import SerializingObject, local_zone
File "/usr/lib/python3.10/site-packages/tasklib/serializing.py", line 13, in <module>
local_zone = ZoneInfo('localtime')
File "/usr/lib/python3.10/zoneinfo/_common.py", line 24, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key localtime'
tzdata
is installed, apparently, when I run pip list
Syncing a board failed with a traceback:
Traceback (most recent call last):
File "./trellowarrior.py", line 411, in <module>
main()
File "./trellowarrior.py", line 400, in main
project['trello_done_list'])
File "./trellowarrior.py", line 273, in sync_trello_tw
download_trello_card(project_name, list_name, trello_card, task_warrior, doing_list_name, done_list_name)
File "./trellowarrior.py", line 183, in download_trello_card
new_tw_task['description'] = trello_card.name.decode('utf-8')
File "/home/john/repos/git/trellowarrior/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 29: ordinal not in range(128)
I added a breakpoint to look more closely:
183 try:
184 new_tw_task['description'] = trello_card.name.decode('utf-8')
185 except:
186 import pdb
187 pdb.set_trace()
188 -> if trello_card.due_date:
189 new_tw_task['due'] = trello_card.due_date
190 new_tw_task['trelloid'] = trello_card.id
191 new_tw_task['trellolistname'] = list_name.decode('utf-8')
192 new_tw_task.save()
193 if list_name == doing_list_name:
(Pdb) trello_card.name
u'Spicy Boat Noodles at Bangkok\u2019s Victory Monument'
So we're trying to decode something that is not encoded. If we encode it first, we can decode it:
(Pdb) print trello_card.name
Spicy Boat Noodles at Bangkok’s Victory Monument
(Pdb) print trello_card.name.encode('utf-8')
Spicy Boat Noodles at Bangkok’s Victory Monument
(Pdb) print trello_card.name.encode('utf-8').decode('utf-8')
Spicy Boat Noodles at Bangkok’s Victory Monument
My guess is that in the past py-trello
did not return unicode strings, so it was necessary to decode them first. But now it looks like the .decode(...)
calls are not necessary.
trello_board_name
set to Board AThe card is added to the closed board.
The card is added to the new open board.
Just as a heads-up: I'm in the process of applying cookiecutter to trellowarrior.
This adds a bunch of goodies like support for Sphinx docs, Travis CI, pytest, and the Click CLI framework.
At the moment this is mostly just a whole lot of stubs. Here's the big diff.
(It includes some tweaks to trellowarrior conf parsing which should be considered separately.)
I just wanted to mention it to check if you think it's a worthwhile idea.
RawConfigParser.read([file1, file2, ...])
try to read all the files given as argument and override the conf values with the last read.
The order of the configuration file list is important and it should be clear to the user that a merge will occur. If a merge is not intended, it's easy to fix (I can create the PR later).
In all cases, what is the order of priority for the conf files ? I'm in favor of (by increasing priority) :
Hey,
Thanks for the amazing work with this project. I'm really excited to get it going.
I'm on Arch Linux
I installed trellowarrior through the AUR successfully
Right now I'm setting everything up, the whole API setup was super clear thanks for the clean instructions.
I got everything regarding the API working
I only run into a problem with running the initial trellowarrior sync
There's something I'm not setting correctly in the last MANDATORY FIELDS
sync_projects
Can I have more info please on how to fill-up this field? What is meant by Define what sections are loaded,
sync_projects MANDATORY. Define what sections are loaded, separated by spaces.
Then I filled up these ones
taskwarrior_project_name MANDATORY. The name of project in Taskwarrior.
trello_board_name MANDATORY. The name of Trello Board.
My trello bard is called "TODO"
so I put this in my trellowarrior.conf
which was by defauly created in:
~/.config/trellowarrior/trellowarrior.conf
taskwarrior_project_name = TODO
trello_board_name = TODO
overall this is what my trellowarrior.conf looks like
trello_api_key = ********************************
trello_api_secret = ****************************************************************
trello_token = ****************************************************************
trello_token_secret = ********************************
sync_projects
taskwarrior_project_name = TODO
trello_board_name = TODO
┗━━━━━━ trellowarrior sync
Traceback (most recent call last):
File "/usr/bin/trellowarrior", line 33, in <module>
sys.exit(load_entry_point('trellowarrior==1.2.1', 'console_scripts', 'trellowarrior')())
File "/usr/lib/python3.8/site-packages/trellowarrior/main.py", line 128, in main
config.configure(config_file=args.config, projects=args.projects)
File "/usr/lib/python3.8/site-packages/trellowarrior/config.py", line 62, in configure
config_parser.read(self.config_file)
File "/usr/lib/python3.8/configparser.py", line 697, in read
self._read(fp, filename)
File "/usr/lib/python3.8/configparser.py", line 1113, in _read
raise e
configparser.ParsingError: Source contains parsing errors: '/home/santi/.config/trellowarrior/trellowarrior.conf'
[line 6]: 'sync_projects\n'
I'm sure I'm using sync_projects
wrong I just need some direction on how to do it correctly and some help to see if there's anything else I'm missing.
Linux Manjaro XFCE with Awesome Window Manager
Thanks for the help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.