Coder Social home page Coder Social logo

ajunlonglive / osagitfilter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doekman/osagitfilter

0.0 2.0 0.0 100 KB

Filter to put OSA languages (AppleScript, JavaScript) into git, as if they where plain text-files

License: MIT License

AppleScript 5.92% Shell 93.66% JavaScript 0.42%

osagitfilter's Introduction

osagitfilter

Filter to put OSA languages into a git-repository. So you can put your .scpt-file (AppleScript, JavaScript) into your git-repository, and get full textual diff support.

Installation

Either clone this repository, or download the latest release and unzip it to a folder where you want to install it.

Configure the filter by running the following command:

./setup.sh configure

For every reporistory you want to use it, put the line *.scpt filter=osa in the gitattributes of your repository. Do this by running the command below in the root of your repository:

echo "*.scpt filter=osa" >> .gitattributes

Extra's

If you want to add your own git configuration, use the following configure command:

./setup.sh configure --no-git

To reset the configuration, run this command:

./setup.sh reset

If you have trouble with the script, switch on logging with:

./setup.sh configure --git-log

Logging can be found in ~/Library/Logs/Catsdeep/osagitfilter.log and can be easy inspected with Console.app.

Some git-clients, like GitHub Desktop, can be quite chatty so log files grow quite fast. With the following command you can create a new log file, while preserving the old ones:

./setup.sh rotate

Default, it prevents from accidently committing AppleScript files with Debugging Mode (from AppleScript Debugger) switched on. Run osagitfilter --help to see more options.

I've setup a demo repository with different .scpt-files.

Problems

If you want to (re-)apply osagitfilter to a repository (for example, if you already added your binary .scpt file to git, but want to use osagitfilter), execute the following statement:

git add --renormalize .

Credits

Based on this answer by Daniel Trebbien on stackoverflow and help from guys on the Script Debugger Forum.

osagitfilter's People

Contributors

doekman avatar

Watchers

James Cloos 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.