Commit graph

26 commits

Author SHA1 Message Date
https://www.google.com/accounts/o8/id?id=AItOawmH7o6q2l99M-PQolOfbR3_i5B_jtTIcAE
d3aa8223b0 mark annex.genmetadata as code. 2014-09-12 19:53:33 +00:00
Joey Hess
d0fce426c4 pre-commit-annex hook script to automatically extract metadata from lots of types of files
Using the extract(1) program to do the heavy lifting.

Decided to make git-annex run pre-commit-annex when committing. Since
git-annex pre-commit also runs it, it'll be run when git commit is run too,
via the pre-commit hook. This basically gives back the pre-commit hook
that git-annex took away. The implementation avoids repeatedly looking
for the hook script when the assistant is running and committing
repeatedly; only checks if the hook is available once.

To make the script simpler, made git-annex metadata -s field?=value
only set a field when it's not already got a value.

This commit was sponsored by bak.
2014-03-02 20:11:58 -04:00
Joey Hess
34059c09e2 update 2014-03-02 16:27:04 -04:00
Joey Hess
06e39e6a79 update 2014-03-02 15:53:31 -04:00
Joey Hess
06e9080f01 metadata: FIeld names are now case insensative. 2014-02-25 18:45:09 -04:00
Joey Hess
0506764fc3 update 2014-02-24 14:45:19 -04:00
Joey Hess
a26ae550a5 more todos 2014-02-23 00:25:35 -04:00
Joey Hess
7498c5dd96 annex.genmetadata can be set to make git-annex automatically set metadata (year and month) when adding files 2014-02-23 00:08:29 -04:00
Joey Hess
c6fae24f7c etoolong 2014-02-22 16:37:13 -04:00
Joey Hess
079b35a1a8 views: add automatically constructed file location metadata
When constructing views, metadata is available about the location of the
file in the view's reference branch. Allows incorporating parts of the
directory hierarchy in a view.

For example `git annex view tag=* podcasts/=*` makes a view in the form
tag/showname.

Performance impact: I benchmarked git annex view tag=* in the conference
proceedings repo to take 6.459s before this change, and 6.544s after.

FWIW, I considered making the syntax for this be podcasts/*, which might
be easier for the user to learn. However, I think it's not as good:

* The user has to then juggle two different syntaxes, and podcasts/* will
  be expanded by the shell so they also need to quote it, while podcasts/=*
  is unlikely to be expanded by the shell.
* It would allow for things like podcasts/*/* and *.mp3 which do not
  map well into views.

This commit was sponsored by Aurélien Pinceaux.
2014-02-22 16:27:53 -04:00
Joey Hess
19faebd962 better syntax for directory metadata 2014-02-20 16:36:30 -04:00
Joey Hess
bbb7440162
better proposed syntax for filename derived metadata 2014-02-20 13:04:57 -04:00
Joey Hess
c7489ad4e2
todo: metadata derived from master branch filename 2014-02-20 13:00:05 -04:00
Joey Hess
2f52fa60d1 todo: git annex add while on view, what to do? 2014-02-20 12:37:28 -04:00
Joey Hess
19bec37590 todo: assistant support 2014-02-20 12:34:11 -04:00
Joey Hess
0dba83aa87
update 2014-02-19 17:50:30 -04:00
Joey Hess
67fd06af76 add git annex view command
(And a vpop command, which is still a bit buggy.)

Still need to do vadd and vrm, though this also adds their documentation.

Currently not very happy with the view log data serialization. I had to
lose the TDFA regexps temporarily, so I can have Read/Show instances of
View. I expect the view log format will change in some incompatable way
later, probably adding last known refs for the parent branch to View
or something like that.

Anyway, it basically works, although it's a bit slow looking up the
metadata. The actual git branch construction is about as fast as it can be
using the current git plumbing.

This commit was sponsored by Peter Hogg.
2014-02-18 18:22:20 -04:00
Joey Hess
7a0b485c4d
reference branch 2014-02-13 11:39:03 -04:00
Joey Hess
9f7e76130e add metadata command to get/set metadata
Adds metadata log, and command.

Note that unsetting field values seems to currently be broken.
And in general this has had all of 2 minutes worth of testing.

This commit was sponsored by Julien Lefrique.
2014-02-12 21:30:33 -04:00
Joey Hess
1b79d18a40 data types and serialization for metadata
A very haskell commit! Just data types, instances to serialize the metadata
to a nice format, and QuickCheck tests.

This commit was sponsored by Andreas Leha.
2014-02-12 17:57:32 -04:00
Joey Hess
b7ffe599e8
unify fields and tags 2014-02-11 16:27:27 -04:00
Joey Hess
8108efbe9f typo 2014-02-11 11:47:45 -04:00
Joey Hess
94145e8f73
cleanup 2014-02-11 11:40:49 -04:00
Joey Hess
2e5c33883d
correction 2014-02-11 11:40:09 -04:00
Joey Hess
aa06e913e5
every idea that came to me in my sleep. there were rather a lot of them 2014-02-11 11:37:53 -04:00
Joey Hess
5e8dee6cb0 interesting new design just gelled.. almost 2014-02-11 10:48:52 -04:00