GithubHelp home page GithubHelp logo

glyphobet / fragments Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 1.0 493 KB

tool for diff-based templating / fragmentation control

Home Page: http://glyphobet.github.io/fragments/

License: BSD 3-Clause "New" or "Revised" License

Shell 0.31% Python 99.69%

fragments's People

Contributors

glyphobet avatar rcohen2000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

uikit0

fragments's Issues

include git-hook for auto-committing _fragments

Include a git-hook for automatically adding everything in _fragments/ directory

find . -name '_fragments' | xargs git add

The above command does not handle files renamed in fragments very well. Make sure that works too.

non-ascii changed line causes diff to crash

A non-ascii changed line causes fragments diff to crash with:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/matt/local/src/fragments/fragments/__main__.py", line 8, in <module>
    _main()
  File "/Users/matt/local/src/fragments/fragments/commands.py", line 412, in _main
    print(str(l))
  File "/Users/matt/local/src/fragments/fragments/color.py", line 25, in __str__
    return '\033[%sm\033[%sm%s\033[0m' % (self.weight, self.color, super(ColoredString, self).__str__())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in position 35: ordinal not in range(128)

XML/HTML diff mode

Need XML/HTML diff mode

When I fork based on

<h3>Foo</h3>

and

<h3>Bar</h3>

I want

<h3></h3>

instead of a blank line.

support directory expansion

fragments apply foo/bar/ should apply to all files under that path.
fragments mv foo/file.ext bar/ should expand to fragments mv foo/file.ext bar/file.ext

create, rename, create another with the original name

  1. follow a file named foo.html, it gets a key foo.html in config.json with a value of a hash of foo.html
  2. move foo.html to bar.html, it is now stored under key bar.html in config.json with a value of a hash of foo.html
  3. follow a new file named foo.html, it gets a key foo.html' inconfig.jsonwith the same value as the keybar.html` has.

Now those files are broken because there are two keys pointing at the same value, and therefore the same file on disk.

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.