Giter Club home page Giter Club logo

tagsnag's Introduction

Tagsnag

Tagsnag

The idea behind Tagsnag is to provide a quick & easy to use cli-tool to extract data for comparison from a similar version over multiple repositories. It was written with educational use in mind: Imagine n groups of students handing in assignments via n Git repositories. The assignments are tagged rather similary and follow the same structure roughly.

Installation

Install using pip:

$ pip install Tagsnag

Manual Installation

Tagsnag uses Python 3.7 and requires Gitpython to be installed. You can install it using the provided Makefile:

$ make init

Or manually using pip:

$ pip install gitpython

Run

To run tagsnag over all repositories in a directory enter the directory via shell. The whole set of commands can be found by calling --help.

Overview

Flag Description
-l, --log Create a logfile.
-p, --prune Read Git manual. May come in handy if tags are replaced a lot.
-s, --autostash Instead of skipping the untidy repository, stash all changes.
-u, --update Run git checkout master && git pull origin master on all repositories.
-v, --verbose Additional logging.
Modes Necessary Arguments
Extract File tagsnag --tag=<tag> --filename=<name> --extension=<type>
Extract Dir tagsnag --tag=<tag> --directory=<name>
Extract via XML (Deprecated) tagsnag --xml=<path>
--destination=<name> Optional: Name created destination folder

Updating repositories

Run git checkout master && git pull origin master on all repositories:

$ tagsnag --update

File extraction

$ tagsnag --tag=<tag>            \
--filename=<filename>            \
--extension=<filetype>           \
--destination=<destination_path>

The following sample will fuzzy search for a tag containing 1.0, check it out and search for a file of type .md containing the string readme in its name. This file will then be copied into the destination folder and be renamed to <repository_name>.md:

$ tagsnag                   \
--tag=1.0                   \
--filename=readme           \
--extension=md              \
--destination=./ReadmeFiles

Directory extraction

Instead of a filename, you can provide a directory name to extract. Tagsnag will copy the first directory it finds matching the name starting from root.

$ tagsnag --tag=<tag>              \
--directory=<directory_name>     \
--destination=<destination_path>

Run with XML file

  • For more configurability you can put an xml file into the folder containing the repos and run it:
$ tagsnag --xml=<path/of/xml_file>

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Support

The framework and code are provided as-is, but if you need help or have suggestions, you can contact me anytime at [email protected].

I'd like to hear from you

If you have got any suggestions, please feel free to share them with me. :)

tagsnag's People

Contributors

t89 avatar

Watchers

 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.