Giter Site home page Giter Site logo

rkokkelk / todo.txt-ext Goto Github PK

View Code? Open in Web Editor NEW
30.0 9.0 7.0 1.22 MB

Thunderbird extension for the Todo.txt application.

License: GNU General Public License v2.0

JavaScript 97.91% Shell 2.09%
thunderbird thunderbird-extension thunderbird-addon todotxt

todo.txt-ext's Introduction

About

Thunderbird extension for the Todo.txt application. This extension tries to integrate the Todo.txt application with Thunderbird. Using the Lightning extension it is now possible to add, delete or modify todo's directly within Thunderbird.

Crowdin

Functionality

  • Add, delete or modify Todo's from within your Thunderbird.
  • Automatically use Thunderbirds functions from Todo.txt, such as categories, priorities, due dates etc.
  • Get a quick overview of all your tasks.
  • Search for complete and incomplete Todo's within Thunderbird using search parameters such as Contexts or Projects.
  • Use Todo.txt's syntax directly within Thunderbird.
  • Show todo's in plaintext or using the Thunderbird functionality.

Mozilla

Further information and usage statistics can be found at Mozzila.

Usage

The extension requires the following options:

  1. Location of your Todo.txt file
  2. Location of your Done.txt file

After this configuration it is possible to see every finished and incomplete tasks and add, delete or modify them accordingly.

Syntax

The extension can automatically assign the appropriate properties to a Thunderbird task based on the Todo.txt syntax. This means that when a user enters a new Task with Todo.txt syntax it will result in a correct Thunderbird task.

For example: (A) foobar +Dev +Home @PR

Entered as a new task within Thunderbird, it will automatically have the following properties:

  • High priority
  • Categories set to DEV & Home
  • Title containing foobar
  • Location set to @PR

Offcourse the Todo.txt file will contain the exact line as entered into Thunderbird including a creation date.

Building

Use the following steps to build the Todo-txt Thunderbird add-on directly from source code:

git clone https://github.com/rkokkelk/todo.txt-ext.git
git checkout master # Checkout the specific branch with the source code you want to try
./build -d # -d ensures that debug logs are shown in Thunderbird console

These steps results in a file called todotxt_1.1.0.xpi, specific name may change depending on the version of the add-on. You may install the add-on in Thunderbird by:

  1. Open Thunderbird
  2. Open the Add-on tab
  • via Properties (triple dashes) -> Add-ons -> Add-ons
  1. Install the add-on
  • Click the properties (Gear icon on top) -> Install Add-on from File...
  1. After restarting Thunderbird, the Todotxt add-on is available
  • For debugging output open the Thunderbird console windows, keyboard shortcut (Ctrl - Shift - j).

Thanks

This project was made possible of the following projects and persons:

  • This extension relies heavily on the todo-txt-js JavaScript library.
  • Much of the code was inspired on the StormCows extension.
  • French translations by L. Lucanakin.
  • German translations by N. Reichert

todo.txt-ext's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todo.txt-ext's Issues

input.split is not a function

When I tick the "Use thunderbird's functionality" I get the errormessage: "input.split is not a function" and my tasks doesn't show. If I don't use thunderbirds functionality everything works.

input.split is not a function

I am getting a warning box with title: "Warning ToDo.txt" and contents "input.split is not a function". Tasks in my todo.txt do not show up in tasks

Thunderbird 52.2.1 64-bit on Ubuntu 16.04.02
Lightning 5.4

Time integration

Having set up the add on, I don't seem to use time with due dates. Thunderbird allows a time to be set with dates, but upon synchronization, this reverts to 00:00. It can be a bit demoralising to start the day with a list of task that are already overdue - coloured red in Thunderbird's list. It would be nice to be able to order tasks by due time.

I have struggled to find any mention of time in the todo.txt documentation and I have not found a format that seems to work. If it is possible then, I guess this add on does not support it as setting the time in Thunderbird does not transfer to the todo.txt file and the setting in TB is lost on synchronization.

  1. If use of time is possible, do you know where I might find documentation on this (or a simple one-line demonstration of the format would be great)?
  2. If time is supported, then I guess this is a feature request for the add on to support it.

Thanks!

Feature Request: Recurring events extension

There is an extension to todo.txt using the "rec:xxx" key-value-pair, which makes a task recurrent, that is finishing it creates a new task.

i use https://github.com/mpcjanssen/simpletask-android on my mobile, where this functionality is implemented, so i have quite a number of tasks with the "rec:xxx" key-value-pair. if i mark these as done in thunderbird, i have to manually add a new task, with the same content.

please see https://github.com/mpcjanssen/simpletask-android/blob/master/app/src/main/assets/index.en.md for more information.

Thank you for considering!

error after recent update

Following is the message shown:

An error was encountered preparing the calendar located at todotxt://_unused for use. It will not be available.

[Exception... "Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]" nsresult: "0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)" location: "JS frame :: resource://calendar/modules/calUtils.jsm -> file:///usr/lib/thunderbird/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/calendar-js/calCalendarManager.js :: cmgr_createCalendar :: line 440" data: no]

Extention cannot work with non-latin UTF-8-codepage symbols in path

Xubuntu 16.10
Thunderbird 45.7.0
Todo.txt Extension 0.8.4
Extention cannot work with non-latin UTF-8-codepage symbols in path to file todo.txt

I see in prefs.js (in Thunderbird profile folder):

user_pref("extensions.todotxt.todo-txt", "/home/nick/A_/4@>/2) 018=5B 8 :><?LNB5@/ 01>G0O/Thunderbird/ToDo_txt/todo.txt");

instead right path.

After Thunderbird start it opened window: "Cannot find file todo.txt" - and Thunderbird freeze...

the plugin does not write to the file

Hi, I installed the plugin on thunderbird latest version (45.7.1), but I can not make it work. When I insert a new Task, the plugin does not update the file leaving it empty. If i manually add a line to the file, thunderbird shows correctly, but if I try to edit it keeps me the original version, without reporting any error. What can I check? Using Windows 10 64bit
Thank's

Not showing clear messages towards users while handling exceptions

Thanks for the fix. The following behaviour is still the same in 0.7.1.

I have a showstopper which I wouldn't call a bug as it's my own 'fault' for having a weird setup. I'll give you the info anyway just in case it's useful to you (or if it's an easy fix, even better as I'd love to be able to use this addon).

I keep a folder from a remote server permanently mounted via SSHFS. So if my remotely mounted dir is TODODIR I end up with something like:

/home/myname/TODODIR/todo.txt
/home/myname/TODODIR/done.txt

I initially had permissions problems but seem to have fixed them and since then every programme I've used to read/write to this folder works fine (although there is sometimes a delay of anything up to a few seconds).

todo.txt-ext will allow me to browse to and select those files and lists the paths correctly in preferences. It will show me existing items from those todo files in my calendar. But if I try to create a new task or do any form of writing to the files I get:

An error occurred when writing to the calendar Todo.txt!

Details...
Error code: MODIFICATION_FAILED
Description:

(ie. blank description).

Anyway I'm not trying to complain, you didn't advertise the add-on as working with SSHFS, I just tried it and it doesn't work so I thought I'd pass the info along. Thanks for all your hard work anyway! :)

Feature request: Make @+ mapping configurable

After loking at https://github.com/todotxt/todo.txt I think the mapping looks like below:
todotxt "+" = project tag "@" = Context tag
AddOn "+" = category "@" = Location

Using one of their examples, "(B) Schedule Goodwill pickup +GarageSale @phone" I would say the mapping should be the other way round?
I use Simpletask on my Android phone to get to the todo.txt which seems to handle things the opposite way as well.
However, you may have had good reasons to do it the way you did, so how about making the mapping configurable?

60.2.1: files cannot be sync' while TB is running

Hi,
With 60.2.1, while TB is running, other programs cannot access the three files (todo.txt, etc.), thus preventing my rd-party synchronization software to run (the latter sees the files but of length zero).

Maybe a simple lock issue?

Thanks for 60.2.1 by the way!

Initial testing on 60.2.1

Great stuff! Thanks for this Roy.
Here a few observations:

  1. The usage sections says that the extension needs the location of todo.txt and done.txt. Took me a while to figure out where these are configured. A quick hint to "Tools/AddOn Preferences" would help others I guess?
  2. After setting the location the task list in Thunderbird stayed empty, restart TB wouldn't help and I couldn't find a way to refresh. Once I entered a new task in TB all of a sudden all the other tasks appeared. Not a big deal but in the light of first-impressions count, you may want to look into this.
  3. I tried your "(A) foobar +Dev +Home @pr" example and a few others but only priority seems to get picked up, location and category won't.

Ignoring projects and contexts

Hi,

I like the idea of your addin.

But:
It ignores projects and contexts. Neither categories nor locations are used.

I just started from the scratch.
Thunderbird 45.5.1
Lightning 4.7.5.1
your ext 0.7.1

I started with empty files todo.txt and done.txt.

If I enter categories or location in Lightning they are just shortly displayed after saving the task. After sync they vanish.
If I enter a task directly in my todo.txt-file they projects and contexts are just displayed in the task's title but not in Thunderbird task's attributes.

image

Bye,
Stefan

Tasks (open and completed) always shown in calendar

First off: Your addon is great. I'm just testing the synchronisation between TB, Dropbox and my Android phone, before switching all my tasks from ICS file (no support under Android for tasks...) and another list in Google to todo.txt. Found this and other issues reported in that course.

The addon seams to not consider the settings whether to tasks (at all) and completed tasks inside the calendar (options under "View"/"Calendar"/"Current View"/"Tasks in View" and "Show completed Tasks"), but always shows them.

Bug or Feature? URLs disappear

URLs disapper. When in parentheses, the parentheses disappear too.
Luckily, the original lines in the todo.txt file are not modified, but these lines (two real world examples):

(C) @work Learn about Elixir (programming language) https://en.wikipedia.org/wiki/Elixir_%28programming_language%29
(C) @work Learn about https://www.kaggle.com (https://en.wikipedia.org/wiki/Kaggle) Kaggle prediction contests

appear in Thunderbird/Lightning without the URLS, i.e. something like:

Learn about Elixir (programming language)
Learn about Kaggle prediction contests

(with the normal priorities and categories).

Note: This happens if I add the to-do on the command line (todo.sh) or directly in Thunderbird/Lightning. In either case, the URLs are there in the todo.txt file, but are not there (or at least not visible) in Tb/L.

Is this intentional?

Is there a work-around? Since todo.txt doesn't allow us to put notes on to-do's (at least without extensions), the only place to store URLs would seem to be "in line". Or am I missing something here?

New categories are not saved

Hi, I upgraded pluging and now write the file works correctly. But I notice that if I add a category in one activity, this is not saved, but during synchronization is eliminated. It's normal?

Mentioned at #24.

Do not display tasks in calendar view

Firstly, excellent add-on!
Is it possible to have the Todo.txt Calendar enabled but not show tasks in the Calendar view? I have multiple calendars and Todo.txt entries overwhelm them. If I disable it in Calendar view it is also disabled in Task view. I know I can click to enable/disable depending upon which view is selected but it would be nice to be able to suppress the output in Calendar view as an option.

Add filtering tool for contexts and projects

(Thank you for this extension, it's brilliant)

As an enhancement, it would be great to add a "click-way" filtering tool that lists contexts and projects and allow to click on them to filter tasks faster than writing in the "filter tasks" search tool.

Context Handling: Location Field unused?

This is (purely) a suggestion: Your extension has proved very useful, but I can't help but notice that contexts (i.e. tags with an at-sign, e.g. "@work", "@Home") are not really recognized. Yes, you can filter using them, but you cannot sort based on them. I also notice that Thunderbird (Lightning) Tasks have a field named "Location", which is currently unused (as far as I can tell (?)). I would suggest considering whether contexts can (should) be stored in the field (in much the same way that "plus-tags" are stored in "category").

Lock file!

After press "Synchronize" file is locked.
Every click of the "sync" button increases the number of open handles (see in OpenedFilesView.exe).

(may be need "close" function in this function?)

OS: Windows 7 x64.
Synchronization soft: Syncthing v0.14.31

1111111111111111111111111111111
2222222222222222222

add description field

Maybe after a / or \ or ^, something to add also a description of a task. Thank you for your beautiful and useful app/TB extension

Due dates dating back one day

Due dates are invalid, dating back one day. Perhaps because my GMT is Sao Paulo/Brazil. I can't also hide the completed tasks.

Add-on failure to handle paths correctly

I just discovered another bug : it seems that todo.txt extension can't handle folders and files path with some letters : é, à, â, ê, ô, ...

Example 1 :

~/documents/mon agenda/todo.txt
=> no problem, your extension works !

Example 2 :

~/documents/mon agenda privé/todo.txt
=> impossible to sync thunderbird with the todo.txt, due to the "é" in the file path.

Extension fails to interact with todo.txt

So, for a brief two moments I was able to get a list of my todo.txt file withing Thunderbird. Once I attempted to test creating a new todo, it simply gave me an error message. I would list it here, but i forget what the error was.

Currently, it won't even connect to the file at all. It simply remains blank and any attempt to interact with it results in a MODIFICATION_FAILED error. I've restarted the app, my computer, uninstalled and reinstalled the extension, etc.

I would love to have this extension working, as it would make Thunderbird my go to application.

Dropbox Permission denied when syncing todo.txt

I currently use the SimpleTask app on my android phone to handle my todo.txt list. It syncs via dropbox. On my computer, I have Dropbox setup. So my todo.txt file always gets synced between my phone and my computer.

However, when I enable the todo.txt-ext in Thunderbird, Dropbox isn't able to sync my files due to the error "permission denied".

Reproduction steps:

  • Install Dropbox on PC
  • Create todo.txt / done.txt files in Dropbox folder on PC
  • Get SimpleTask android app
  • Connect SimpleTask to your Dropbox account and point to same todo.txt / done.txt files
  • Create task using todo.txt-ext
  • Verify that task shows up in SimpleTask
  • Complete task using SimpleTask
  • Look at Dropbox system tray icon on PC (hover mouse over it)
  • Notice error message "Can't sync "todo.txt" (permission denied)"

Does not handle recurring tasks properly

There are two ways to make a task recur.

One is to edit the data file entry directly and add a field like "rec:1w". This is a common extension of the original todo.txt format in such things as todo.txt-tools, and it's used by todo.txt interfaces such as topydo.txt.

The other is to use Thunderbird and add the recurring task to the Lightning calendar with the dialog window, e.g.: Calendar > (right click) New Task > Repeat and select todo.txt as the calendar. This adds the task to the todo.txt data file.

Neither method works correctly. E.g., using Thunderbird to view an edited data file displays a weekly task as scheduled daily since the previous occurrence to the next scheduled one, but using Thunderbird to create a recurring task, does not add the rec: field (or any other version of a recurrence field) at all.

Pre-requisites for todo.txt-ext ?

Hi! I installed the extension, restarted Thunderbid, then configured the todo file path, restarted Thunderbird and nothing appears anywhere (but extension is active). Do I need to install Lightning or something else first? Why this is not documented ? THANKS FOR YOUR HELP ! (recent Linux Mint, Thunderbird 52.4.0 64 bits)

Error Message: Component returned failure code

Hi,
I tried installing the addon and when I restarted thunderbird this following Error Message Pop Up in a Message Window.

Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getComplexValue]

Only Title, Priority and Dates are set

Hi,

I've given it multiply attempts, reinstalled the addon and reinitiated calendars, deleted and recreated the todo.txt file and replaced it with another sample file, but still the same:

Using the example line"(A) foobar +Dev +Home @pr" from the instructions priority is the only property which is displayed by Thunderbird/Lightning. Tags and location just remain in the title as they are but don't seem to be recognized by TB. When I set due/begin-dates in TB, only the days are synchronized to the todotxt-file but the exact time remains unknown.

Thunderbird 45.8.0
Lightning 4.7.8
todo.txt-ext 0.8.3

No related errors are reported in the error log

Thanks for looking into this.

Wrong date written to done.txt

When flagging a task as done it is added to the done.txt file, which is correct. The "done date" is written in a wrong way though.

It should be like:
x <Priority> <completion date> <*creation date*> <description> ....

But in fact it is like:
x <Priority> <completion date> <*completion date*> <description> ....

My version information:
TB v45.4.0 (Linux), todo.txt extension v0.8.1

Failed to synchronize when files are empty

The add-on fails to write tasks when one of the todo.txt or done.txt files is empty.

Example 1

todo.txt = 2016-06-22 Test
done.txt = empty
=> No sync between todo and lightning. Impossible to add a new task (Modification_failed)

Example 2

todo.txt = 2016-06-22 Test
done.txt = x 2016-06-20 2016-06-18 Test2
=> No problems : your extension works !

Example 3

todo.txt = 2016-06-22 Test
done.txt = 2016-06-18 Test2
=> Your extension will clear done.txt, this will result in the situation of the example 1 and the extension will bug.

Feature request: add Todo's by parsing certain emails

User contacted me with the following feature request which I will look if this could be implemented within the add-on.

I have a related task I would like to be able to do and with your experience of these two projects you might be able to know how it might be achieved. I work at a place where internet access is pretty much locked down, but we do have access to email. In the past I had used remember the milk (RTM). With that, you can send a suitably formatted email to an RTM email account and it would add a Todo item.
I would like to be able to do the same thing with Todo.txt ie send an email from work and when I get home and open thunderbird, have something run to extract new Todo's and put them into todo.txt. (Work uses outlook).

multiple instances appearing

I am using the nightly version of Thunderbird. Each time I restart the app an extra todo.txt account appears so that I have multiple task lists for the same todo.txt file.

on latest thunderbird nightly/lightning can't see todo's

I installed latest thunderbird nightly and i got an error message and my todo list was disbaled. i uninstalled and reinstalled but now the todo list doesn't even show up. on latest (July 5) thunderbird and matching gdata/lightning dailys.

Localization issues

User notified that there are issues with UTF-8 encoding of certain characters.

(A) Zavolať Blabláčová
(B) Napísať pre Štefana Tótha +Nákup
2015-11-17 Napísať voľačo 94 +Nákup
Police @Vymyslieť +Kuchyňa
This is test task with local characters ľščťžýáíéúô
This is test task with due due:2015-11-19
This is test task with time t:2015-11-17

issue solved

Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getComplexValue]
Thunderbird 45.8

Error code: MODIFICATION_FAILED

An error occurred when writing to the calendar Todo.txt!

This happens when I click the checkbox to show the Todo.txt calendar.

Any ideas?

Error when marking a task as completed

The interaction with my todo.txt file works just fine, such as adding or deleting tasks.
However, when I'm ticking off a task as competed, the following happens:

  1. Warning message: "oDoneStream is not defined"
  2. Error message: "Error writing calendar ", MODIFICATION_FAILED

As a result, the task in question is deleted from the todo.txt file (which is correct). The done.txt file remains untouched, meaning the task is not added.

No due date

It is not yet possible to set a due date within the add-on. This will be implemented using the todo.txt Add-on File Format Definitions. Such then when setting the due date it will result in a todo line with: (A) foobar due:2016-01-01

Category not working

Hi,

Each time I add a category, it correctly writes the +Category in the file.
However, each time the calendar synchronizes (I suppose that it then read the file), the +Category is not properly considered as a category but is written in extenso in the title of the task.

Support for Thunderbird 60

Hi,

since the recent release of Thunderbird 60 this AddOn stopped working, even if I turn off the extension.strictCompatibility option in the config. Here is the errorcode I get when starting up Thunderbird:

[Exception... "Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]" nsresult: "0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE)" location: "JS frame :: jar:file:///C:/Users/XXX/AppData/Roaming/Thunderbird/Profiles/squbtncx.default/extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D.xpi!/components/calItemModule.js -> resource://calendar/calendar-js/calCalendarManager.js :: createCalendar :: line 445" data: no]

As this AddOn really makes the cut for me using Thunderbird, are there any plans to make it compatible with version 60? Is there anything one could do to help?

Thanks,
MA3o

Installing the extension makes Thunderbird inoperable

After installing the extension Thunderbird becomes really sluggish. A number of scripts are reporting that are having execution problems and there are several dialog boxes inviting me to stop them. Even if I do it, another script is hanging and Thunderbird is still sluggish. One of the scripts (as an example) is calendar-ui-utils.js at line 522.

Environment: Ubuntu 14.04, KDE destop, Thunderbird 45.6.0.

Hide tasks in calendar

Currently all tasks with some kind of date information are shown in the calendar, which pollutes the calendar with a lot of stuff which is mostly some todo for later. It would be great to have an general checkbox toggle to enable/disable showing in calendar view.

UTF-8 path

Can I use UTF-8 codepage path to todo.txt?
Xubuntu 15.04
Thunderbird 38.2.0
(and what additional application I must to install to start work - except Lightning?)

Location shows prefix @ from context tag in TB

When option to show context inside title is switched off, then it's shown as location, but the syntax element @ as prefix of the context tag is shown in the corresponding field in the task in TB. It should be removed after parsing from the todo.txt/done.txt file.

Empty task list

Hi !

After configuring the paths, the todo list stays empty in Thunderbird. When I create a task, I can see it briefly in the task list (5 seconds) and then it disappears. When I "cat" the todo.txt file, everything is ok, I can even see the added task.

Can you help me with this? :)
Best,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.