Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Commit

Permalink
see changelog for v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhitsolutions committed Mar 9, 2019
1 parent bbe6d87 commit 87c1f8a
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 319 deletions.
1 change: 0 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Expand Down
667 changes: 368 additions & 299 deletions MyTasks.format.ps1xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MyTasks.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RootModule = 'MyTasks.psm1'

# Version number of this module.
ModuleVersion = '2.1.0'
ModuleVersion = '2.2.0'

CompatiblePSEditions = @("Desktop", "Core")

Expand Down
1 change: 1 addition & 0 deletions MyTasksFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Function _ImportTasks {
$tmp.TaskModified = $prophash.TaskModified -as [datetime]
$tmp.Completed = [Convert]::ToBoolean($prophash.Completed)

$tmp.refresh()
$tmp
}
Catch {
Expand Down
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ This PowerShell module is designed as a task or simple To-Do manager. The module
Install-Module MyTasks [-scope currentuser]
```

Task data is stored in an XML file. Here are a few highlights.
Task data is stored in an XML file. Other configuration information is stored in simple text files. Here are a few highlights.

## Class based
## Class Based

This module uses a class definition for the task object and is designed to work on both Windows PowerShell and PowerShell Core.

Expand Down Expand Up @@ -92,10 +92,10 @@ While you could use the object's properties and methods directly, you should use

## XML Data

All of the task information is stored in an XML file. The commands in this module will read in, update, and remove items as needed using PowerShell commands such as `Select-XML`. By default these files are stored in your Documents folder (on Windows systems) or in Home (on Linux). You can change the default location by using the [Set-myTaskHome](./docs/Set-MyTaskHome.md) command. This is helpful if you are sharing task information between laptops via a service like Dropbox.
All of the task information is stored in an XML file. The commands in this module will read in, update, and remove items as needed using PowerShell commands such as `Select-XML`. By default these files are stored in your Documents folder (on Windows systems) or in Home (on Linux). You can change the default location by using the [Set-myTaskHome](docs/Set-MyTaskHome.md) command. This is helpful if you are sharing task information between computers via a service like Dropbox or OneDrive.

```powershell
Set-MyTaskHome Drop:\mytasks\
Set-MyTaskHome -path C:\Users\Jeff\dropbox\mytasks\
```

If you use this feature, you'll need to make sure you run this command before doing anything. It is recommended to put this command in a PowerShell profile script.
Expand All @@ -106,9 +106,11 @@ You shouldn't have to manage the module related variables directly. Use `Get-MyT

The Task object includes a Category property. The module will define a default set of categories ("Work","Personal","Customer","Other"), but users can create their own by using the MyTaskCategory commands:

+ [Add-MyTaskCategory](./docs/Add-MyTaskCategory.md)
+ [Get-MyTaskCategory](./docs/Get-MyTaskCategory.md)
+ [Remove-MyTaskCategory](./docs/Remove-MyTaskCategory.md)
+ [Add-MyTaskCategory](docs/Add-MyTaskCategory.md)
+ [Get-MyTaskCategory](docs/Get-MyTaskCategory.md)
+ [Remove-MyTaskCategory](docs/Remove-MyTaskCategory.md)

Task information is stored in a text file in the $myTaskHome location.

## Basic Usage

Expand All @@ -130,13 +132,13 @@ You can use `Set-MyTask` to modify a task.
Get-MyTask Pluralsight | Set-Mytask -DueDate 3/1/2019
```

Because the task has a Progress property, you can use [Set-MyTask](./docs/Set-MyTask.md) to update that as well.
Because the task has a Progress property, you can use [Set-MyTask](docs/Set-MyTask.md) to update that as well.

```powershell
Set-Mytask "book review" -Progress 60
```

To view tasks you can use `Get-MyTask`. Normally, you will use [Get-MyTask](./docs/Get-MyTask.md) to display tasks, all, some or a single item:
To view tasks you can use `Get-MyTask`. Normally, you will use [Get-MyTask](docs/Get-MyTask.md) to display tasks, all, some or a single item:

```powershell
PS S:\> get-mytask -name MemoryTools
Expand All @@ -148,23 +150,33 @@ ID Name Description DueDate OverDue Category Progress

The default behavior is to display incomplete tasks due in the next 30 days. Look at the help for `Get-MyTask` for more information.

There is also a command called [Show-MyTask](./docs/Show-MyTask.md) which is really nothing more than a wrapper to `Get-MyTask`. The "Show" command will write output directly to the host. Incomplete tasks that are overdue will be displayed in red text. Tasks that will be due in 24 hours will be displayed in yellow. If you select all tasks then completed items will be displayed in green. This command may not work in the PowerShell ISE.
There is also a command called [Show-MyTask](docs/Show-MyTask.md) which is really nothing more than a wrapper to `Get-MyTask`. The "Show" command will write output directly to the host. Incomplete tasks that are overdue will be displayed in red text. Tasks that will be due in 24 hours will be displayed in yellow. If you select all tasks then completed items will be displayed in green. This command may not work as expected in the PowerShell ISE.

![show my tasks](./images/show-mytask-1.png)
![show my tasks](images/show-mytask-1.png)

When a task is finished you can mark it as complete.

```powershell
Complete-MyTask -name "order coffee"
```

The task will remain but be marked as 100% complete. You can still see the task when using the -All parameter with `Get-MyTask` or `Show-MyTask`. At some point you might want to remove completed tasks from the master XML file. You can use [Remove-MyTask](./docs/Remove-MyTask.md) to permanently delete them. Or use the `Archive-MyTask` command to move them to an archive xml file.
The task will remain but be marked as 100% complete. You can still see the task when using the -All parameter with `Get-MyTask` or `Show-MyTask`. At some point you might want to remove completed tasks from the master XML file. You can use [Remove-MyTask](docs/Remove-MyTask.md) to permanently delete them. Or use the `Archive-MyTask` command to move them to an archive xml file.

## Format Views

The module includes a format.ps1xml file that defines a default display when you run `Get-MyTask`. You will get a slightly different set of properties when you run `Get-MyTask | Format-List`. There is also a custom table view called Category which will create a table grouped by the Category property. You should sort the tasks first: `Get-MyTask | Sort-Object Category | Format-Table -view category`.
The module includes a format.ps1xml file that defines a default display when you run `Get-MyTask`. You will get a slightly different set of properties when you run `Get-MyTask | Format-List`. There is also a custom table view called Category which will create a table grouped by the Category property. You should sort the tasks first:

```powershell
Get-MyTask | Sort-Object Category | Format-Table -view category
```

Or you can use the DueDate table view - sort on DueDate

```powershell
Get-MyTask -days 180 | sort duedate | Format-table -view duedate
```

![formatted views](./images/show-mytask-2.png)
![formatted views](images/show-mytask-2.png)

## Archiving and Removing

Expand All @@ -174,13 +186,13 @@ Over time your task file might get quite large. Even though the default behavior
Get-Mytask -Completed | Archive-MyTask
```

There is an option to archive tasks when you run [Complete-MyTask](./docs/Complete-MyTask.md). Or you can completely delete a task with `Remove-MyTask`.
There is an option to archive tasks when you run [Complete-MyTask](docs/Complete-MyTask.md). Or you can completely delete a task with `Remove-MyTask`.

Use the `Get-myTaskArchive` to view archived tasks.

## Email Reminders

If you are running this module on Windows PowerShell that includes the PSScheduledJob module, you can create a scheduled PowerShell job that will send you a daily email with tasks that are due in 3 days or less. The default is a plain text message but you can also send it as HTML. Use the [Enable-EmailReminder](./docs/Enable-EmailReminder.md) command to set up the job.
If you are running this module on Windows PowerShell that includes the PSScheduledJob module, you can create a scheduled PowerShell job that will send you a daily email with tasks that are due in 3 days or less. The default is a plain text message but you can also send it as HTML. Use the [Enable-EmailReminder](docs/Enable-EmailReminder.md) command to set up the job.

You should read full help and examples for all commands as well as the [about_MyTasks](./docs/about_MyTasks.md) help file.

Expand All @@ -206,4 +218,4 @@ You should read full help and examples for all commands as well as the [about_My

Please post any issues, questions or feature requests in the [Issues](https://github.com/jdhitsolutions/MyTasks/issues) section.

*last updated 21 February 2019*
*last updated 9 March, 2019*
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log for MyTasks

## v2.2.0

+ Fixed bug where overdue tasks were not displaying in red
+ Added a Table view called DueDate
+ Minor help updates.
+ Minor updates to `README.md`

## v2.1.0

+ Renamed `Set-MyTaskPath` to `Set-MyTaskHome` and set original name as an alias. (Issue #38)
Expand Down
2 changes: 1 addition & 1 deletion docs/Get-MyTask.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ID Name Description DueDate OverDue Category
4 Apache Install Ubuntu 16 9/13/2017 False work 10
```

Get all active tasks due in the next 90 days
Get all active tasks due in the next 90 days.

### EXAMPLE 5

Expand Down
1 change: 1 addition & 0 deletions docs/about_MyTasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ The module includes a custom format type extension file which includes
several custom views. You can try commands like these:

Get-Mytask | Sort-Object Category | format-table -view Category
Get-MyTask -days 180 | sort duedate | Format-table -view duedate
Get-Mytask | format-list -view All

The second command is especially useful as it will display all properties,
Expand Down
1 change: 1 addition & 0 deletions en-US/about_mytasks.help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ LONG DESCRIPTION
several custom views. You can try commands like these:

Get-Mytask | Sort-object Category | format-table -view Category
Get-MyTask -days 180 | sort duedate | Format-table -view duedate
Get-Mytask | format-list -view All

The second command is especially useful as it will display all properties,
Expand Down

0 comments on commit 87c1f8a

Please sign in to comment.