Giter Club home page Giter Club logo

updatedates's Introduction

UpdateDates

I always forget to update the date field when I make edits to Microsoft documentation, and I wanted a way to have this done automatically whenever I add a file to a commit, so I wrote this program that updates the date field on any changed files to today's date.

Unfortunately you'll have to build the project on your own machine and create the executable since the gitignore combs that out. But once you do, you can call the program from the command line.

You can add a PowerShell function to your profile.ps1 file (usually in C:\Users\<username>\Documents\WindowsPowerShell) that both updates the dates and adds the files in one step:

function ud {
    C:\Path\To\Executable
    Write-Host "Adding files..."
    git add .
    Write-Host "Done!"
}

Now whenever you make changes to a file and are ready to commit, simply call ud instead of git add. Of course, instead of having to remember to update the dates manually, you have to remember to run ud, but it saves time when you have a bunch of files that have been changed.

I'm bad at organization so there are three separate projects in here. The one you probably want is UpdateDates, but I'll explain them all just in case something else fits your needs:

  • RemoveMetadata: Removes the "ms.prod" and "ms.technology" metadata from all files in the given folder. I think this was for some cleanup task a while back. Usage: RemoveMetadata <path>
  • UpdateDate: Looks through the files you have changed but not yet added in git, updates their dates, and adds them in git. Usage: UpdateDate
  • UpdateDateFromFolder: Updates the dates of all the files in the given folder. Usage: UpdateDateFromFolder <path>

updatedates's People

Contributors

eliotcowley avatar

Watchers

 avatar

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.