Code Monkey home page Code Monkey logo

psproductivitytools's Introduction

Introduction

The PSProductivityTools PowerShell module contains commands for productivity tools & topics such as time management.

Installation

The module is published to the PowerShell Gallery, which means you can install it using the following command from the PowerShellGet module:

Install-Module -Name PSProductivityTools

or the following if you want it installed the current users profile ($env:userprofile\Documents\WindowsPowerShell\Modules) rather than the system wide location ($env:programfiles\WindowsPowerShell\Modules):

Install-Module -Name PSProductivityTools -Scope CurrentUser

When a new version is released with bug fixes or new functionality you can update to the latest version simply by typing the following command:

Update-Module -Name PSProductivityTools

PowerShellGet is included by default in PowerShell V5, and available downlevel for PowerShell 3.0 and 4.0.

If you want to install the module without leveraging PowerShellGet, you can either clone the Git-repository or download this ZIP-file and place the contains in one of the following locations:

  • $env:userprofile\Documents\WindowsPowerShell\Modules\PSProductivityTools
  • $env:programfiles\WindowsPowerShell\Modules\PSProductivityTools

Requirements

  • PowerShell 4.0 or later on the computer the module is installed on

Optional requirements

Usage

After installation, you can view available commands by using Get-Command: Get-Command -Module PSProductivityTools

The module currently contains the following functions:

  • Publish-SfBContactInformation - Publish-SfBContactInformation is a PowerShell function to configure a set of availability settings in the Skype for Business client.
  • Start-Pomodoro - Initiates a new Pomodoro sprint and supports several actions such as configuring availability in Skype for Business, enable presentation mode, start music and trigger custom tasks using IFTT such as muting/unmuting a mobile device.

Read more about getting started here: https://msunified.net/2017/08/23/set-yourself-unavailable-with-this-open-source-powershell-based-pomodoro-timer/ And here: http://www.powershell.no/productivity/2017/08/24/introducing-psproductivitytools.html

Planned features and todo-list

  • Add Pester tests
  • Add help

Contributors

Jan Egil Ring - author Ståle Hansen - author

Everyone is welcome to assist by forking the project and submitting pull requests with proposed fixes and enhancements.

psproductivitytools's People

Contributors

brianclinkenbeard avatar janegilring avatar stalehansen avatar

Stargazers

 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

psproductivitytools's Issues

Error when executing two times

Hi
I,m trying your script and be impressed. Nice idea.

When i start Skype for Business 2015 and execute

Start-Pomodoro -Minutes 1 -EndPersonalNote "Testing...

everything works fine. Great, thanks a lot.

C:\Users\myuser> Start-Pomodoro -Minutes 1 -EndPersonalNote "Testing...
WARNING: Skype for Business client is not running or signed in, no action was performed
Updated Skype for Business client status to custom activity 1 (Pomodoro Sprint) and personal note: Getting stuff done, will be available at 09:49

But the second time it failes and unfortunatly I cant find the issue.


C:\Users\myuser> Start-Pomodoro -Minutes 1 -EndPersonalNote "Testing..."

Exception calling "BeginPublishContactInformation" with "3" argument(s): ""
At C:\Users\myuser\Documents\WindowsPowerShell\Modules\PSProductivityTools\Functions\Publish-SfBContactInformation.ps1:
115 char:13
+             $Publish = $Self.BeginPublishContactInformation($ContactI ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ItemNotFoundException

Exception calling "EndPublishContactInformation" with "1" argument(s): "Invalid asyncResult"
At C:\Users\myuser\Documents\WindowsPowerShell\Modules\PSProductivityTools\Functions\Publish-SfBContactInformation.ps1:
116 char:13
+             $self.EndPublishContactInformation($Publish)
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException



Updated Skype for Business client status to custom activity 1 (Pomodoro Sprint) and personal note: Getting stuff done, will be available at 09:45
Pomodoro sprint session ended, set status: Available and personal note: Testing...
C:\Users\myuser>

Do you have any hint where the problem could be?

TIA Ivo

Add support for launching Spotify

Add support for launcing Spotify in the same parameter set as -StartMusic, for example like this:
Start-Process ‘spotify:user:johanbrook:playlist:2mtlhuFVOFMn6Ho3JmrLc2’

Idea provided in this blog comment.

Please handle user ending script (Ctrl+C)

I think it would be great, if for any reason the user had to abort the Pomodoro script in PowerShell (e.g. clicking Ctrl+C), that you could handle reverting all of the settings that were changed. For example, I found this blog post about how to handle that: http://sushihangover.blogspot.com/2012/03/powershell-using-try-finally-block-to.html.

I also thought, since most Gets have a related Set and most Starts have a related Stop, that it would be cool if there were a Stop-Pomodoro cmdlet that would also reset all settings back to Available/Disturb-able.

Thanks! Great tool, btw.

Exception calling "BeginPublishContactInformation" with "3" argument(s)

Hello,

I tried using the module
Publish-SfBContactInformation -CustomActivityId 5 -Availability Away -PersonalNote "Getting Coffee" -Location "@Kitchen"

unfortunately it fails with the following error:

PS C:\Users\MyUser> Publish-SfBContactInformation -CustomActivityId 4 -Availability Away -PersonalNote "Getting Coffee" -Location "The Kitchen"
MethodInvocationException: C:\Users\MyUser\Documents\PowerShell\Modules\PSProductivityTools\0.7\Functions\Publish-SfBContactInformation.ps1:132
Line |
 132 |              $Publish = $Self.BeginPublishContactInformation($ContactI …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "BeginPublishContactInformation" with "3" argument(s): ""

MethodInvocationException: C:\Users\MyUser\Documents\PowerShell\Modules\PSProductivityTools\0.7\Functions\Publish-SfBContactInformation.ps1:134
Line |
 134 |              $Self.EndPublishContactInformation($Publish)
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "EndPublishContactInformation" with "1" argument(s): "Invalid asyncResult"

I have Office Professional 2016 32-bit on Windows 10 Pro 64-bit
I have also installed the necessary SDK: lyncsdk86.msi

Unfortunately I do not know how to fix this. Must the id exist in the CustomPreference.xml?

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.