GithubHelp home page GithubHelp logo

moralcode / logchange Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 4 KB

a simple interactive bash script to assist with recording information about major changes made to your system for easier reinstalls and searching of repeat issues and their solutions.

License: MIT License

Shell 100.00%
scripts-bash

logchange's Introduction

logchange

a simple interactive bash script to assist with recording information about major changes made to your system for easier reinstalls and searching of repeat issues and their solutions.

Usage

Logging a change

To use this script to log a new change, type logchange into your terminal to activate the script.

Once activated, the script will interactively ask you a series of simple questions:

Question Expected Input Purpose
Is this a [s]ystem change or a [U]ser change? s, u or enter to accept the default of U (case insensitive) This records whether this change is user-level (i.e. home-folder configs) or system level (i.1. /etc/ configs, sudo apt install, etc.)
What piece of software does this change affect? (i.e. Firefox) Free Response, defaults to the empty string Provides a place to record whether this affects a particular piece of software
What/Where/Why? Free Response, defaults to the empty string provides a place to explain the problem being solved and include potential keywords for later searching
Is there a link to go with this change? Free Response, defaults to the empty string Provides a place to include a link to stackoverflow or any site to record where you found the solution to the problem in case its needed later

Log file format

Your answers to the above questions will be appended to the changelog file in one of the following formats:

System: [D System] M <L>

User: [D User] { A }: M <L>

where the capital letters serve as placeholders for:

  • D - the datetime at which this entry was made
  • A - the name of the affected application as entered
  • M - the message explaining the issue as entered
  • L - the link provided (if any)

Help Text

logchange.sh [[-h|--help]|[--oops|--undo]|[ --show|--list]|--open] -- a simple interactive bash script to assist with recording information about major changes made to your system.

where:
    -h|--help  show this help text
    --oops|--undo  removes the last line added to the changelog after a confirmation prompt
    --show|--list  output the contents of the changelog file using the cat utility
    --open  open the changelog file in the kate text editor

Setup

To set up this script, place the logchange.sh script somewhere on your system where the path is not likely to change. Then, in your favorite startup location of choice (maybe .profile is a safe default? not sure which one is best for what), paste the following lines and edit as appropriate (none have trailing slashes):

export CHANGELOG_DIR="path/to/where/you/want/the/changelog/file"
alias logchange=/path/to/logchange.sh
alias changelog='logchange --show'

logchange's People

Contributors

moralcode avatar

Watchers

 avatar  avatar  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.