aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/parser.go
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #89 from NonerKao/noteQuey-Liang Kao2017-09-211-0/+71
|\ | | | | Add new feature: notes for todos
| * Refactor previous commitsQuey-Liang Kao2017-08-291-41/+50
| | | | | | | | | | | | | | | | | | Rewrite the `ManipulateNotes` function into `HandleNotes`, which routes the note sub-commands to calls of newly-written `Parse*Note` functions. On successful parse, these functions return true, and false otherwise. Related tests are also refined.
| * Redefine sub-commands: "ln" and "n"Quey-Liang Kao2017-08-201-2/+2
| | | | | | | | | | | | Sub-command "ln" is redefined to the function of listing all todos with their notes; "n" replaces original "ln", listing the notes of a specific todo.
| * Implement the "en" feature: Editting notesQuey-Liang Kao2017-08-141-2/+28
| |
| * Implement the "dn" feature: Deleteing notesQuey-Liang Kao2017-08-141-0/+17
| |
| * Implement the "ln" feature: Listing notes of a todoQuey-Liang Kao2017-08-141-2/+9
| |
| * Implement the "an" feature: Adding notes to todosQuey-Liang Kao2017-08-141-0/+12
| | | | | | | | | | | | This patch introduce a new attribute of a todo item, which is "Notes", of type []string. The following enhancing patches will contain the listing, removing and editing features.
* | Fix a bug in ParseNewTodo()Quey-Liang Kao2017-08-201-1/+1
|/ | | | | The new pattern now does not allow empty todos to be added as "a" or "add" strings.
* Fix #64, parsing a todo with europe date formatGrant Ammons2017-06-121-3/+3
| | | | | * the `hasDue` function was not running, and therefore it was not parsing the due date. * Also added the beginnings of a more holistic test approach, using `app_test.go`.
* fix typoGrant Ammons2017-05-101-1/+1
|
* FormattingGrant Ammons2017-05-101-1/+1
|
* Trim space of the subjectGrant Ammons2017-05-091-2/+2
|
* WIP on a unified editGrant Ammons2017-05-091-18/+12
| | | | | | | | | | | | | | | | | | | | | | | This allows a unified edit functionality that supports the following: **`t e 25 due tom`** * Edits the due date * Leaves subject, projects and contexts unchanged **`t e 25 take out the trash with @bob` * Updates the subject, projects and contexts * Leaves the due date unchanged **`t e 25 take out the trash with @bob due tom` * Updates the subject, projects and contexts * Updates the due date **What's missing** * Tests that exercise this functionality
* subcommands like delete don't take a subject, so make it optionalMichael Strüder2017-05-091-6/+12
|
* allow any whitespace between subcommand, id and inputMichael Strüder2017-05-091-7/+9
|
* display an error on malformed inputMichael Strüder2017-05-091-1/+5
|
* extract subcommand, id, and input string in ParserMichael Strüder2017-05-091-1/+16
|
* Add support for showing tasks due the previous week.Ashish Vijayaram2017-04-171-0/+3
| | | | This is useful for those who need a report of entries from last week.
* Adds support to projects with hyphenRodrigo Dumont2017-03-251-2/+2
|
* Fix spacing bug when adding todosGrant Ammons2017-03-071-1/+1
| | | | All new todos would have a space in them. This fixes that.
* This commit removes all usages of github.com/jinzhu/now.DmitriyMV2017-03-041-13/+11
| | | | | | | | | github.com/jinzhu/now has numerous errors handling date and time. The example's of them are: 1. Incorrect handling of DST (https://github.com/jinzhu/now/issues/13). 2. 24 Hour long days (https://stackoverflow.com/questions/25254443/return-local-beginning-of-day-time-object-in-go) Chicago has 23, 24, or 25 hours in a day. 3. Incorrect usage of time.Truncate which can return time with a non-zero minute, depending on the time's Location. (https://github.com/golang/go/issues/16647). There are other issues as well, including getting incorrect beginning and end of the month.
* Support UTF-8 strings as contexts and projectsQuey-Liang Kao2017-01-261-5/+6
|
* New Feature: Expanding existing todosQuey-Liang Kao2017-01-211-0/+11
|
* Add more helpful messagesQuey-Liang Kao2017-01-211-7/+4
|
* Makes all output messages consistentQuey-Liang Kao2017-01-191-3/+11
| | | | | | | | | | | | | | | | | | | Since the panic() function provides overwhelming messages available for developers but meaningless to users, the way to deal with error output is simplified. There are two panic()'s that are fixed: * The one in parseArbitraryDateWithYear() function. This function is the possible endpoint of adding a todo or editing dues. Instead of calling panic(), now it outputs the specific parsing error, and then terminate itself by os.Exit(). * The one in formatDue() function This function is responsible for parsing the due information of a given todo. If the todos being added previously have passed the checking, then there is no reason that a due fails the format check here, except for the corruption of the todo file.
* Merge pull request #18 from NonerKao/masterGrant Ammons2017-01-181-2/+6
|\ | | | | Bugfix: "todo a" no longer adds an empty todo
| * Bugfix: "todo a" no longer adds an empty todoQuey-Liang Kao2017-01-161-2/+6
| |
* | Run gofmt on formatter and parserHuu Nguyen2017-01-161-2/+2
|/
* bugfix - use 'tod' as shorthand for todayGrant Ammons2016-09-081-1/+1
|
* Fix issue with parsing specific datesGrant Ammons2016-05-121-2/+3
|
* Parse out arbitrary datesGrant Ammons2016-05-061-13/+43
| | | | | | | | | | | | | | This will parse out dates in the format of "mon dd", the month being a 3 letter month, and the date being just the day. due mar 10 due sep 25 due oct 2 it will also "intelligently" guess the year, based upon which is the shorter duration from time.Now(). for instance, if today's date is dec 25 and you schedule an event for jan 2, it will schedule it for the following year.
* Strip out a or addGrant Ammons2016-05-051-0/+2
|
* Allow editing due dates and setting it to noneGrant Ammons2016-05-041-0/+2
|
* Handle parsing dates, and printing themGrant Ammons2016-04-301-13/+60
|
* Rename method to describe it betterGrant Ammons2016-04-261-1/+1
|
* Organize things a bit betterGrant Ammons2016-04-241-0/+87