<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
<title>Tyler Cipriani: pages tagged git-annex</title>
<link href="https://tylercipriani.com/tags/git-annex/"/>
<link href="https://tylercipriani.com/tags/git-annex/index.atom" rel="self" type="application/atom+xml"/>
<author>

<name>Tyler Cipriani</name>

</author>




<id>https://tylercipriani.com/tags/git-annex/</id>

<subtitle type="html">Tyler Cipriani</subtitle>
<generator uri="http://ikiwiki.info/">ikiwiki</generator>
<updated>2017-10-12T03:25:12Z</updated>
<entry>
	<title>Git Annex Metadata Filtered Views</title>

	<id>https://tylercipriani.com/blog/2016/09/28/git-annex-metadata-filtered-views/</id>

	<link href="https://tylercipriani.com/blog/2016/09/28/git-annex-metadata-filtered-views/"/>

	<author><name>Tyler Cipriani</name></author>


	<rights type="html" xml:lang="en">

		Creative Commons Attribution-ShareAlike License
		Copyright © 2017 Tyler Cipriani

	</rights>



	<category term="git" />

	<category term="git-annex" />

	<category term="til" />


	<updated>2017-10-12T03:25:12Z</updated>
	<published>2016-09-29T03:30:55Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;Git annex goes mindbogglingly deep.&lt;/p&gt;
&lt;p&gt;I use git annex to manage my photos – I have tons of RAW photos in &lt;code&gt;~/Pictures&lt;/code&gt; that are backed-up to a few git annex special remotes.&lt;/p&gt;
&lt;p&gt;Whenever I&#39;m done editing a set of raw files I go through this song and dance:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb1&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; raw&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex add&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex copy --to=s3&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex copy --to=nas&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; commit -m &lt;span class=&quot;st&quot;&gt;&amp;#39;Added a bunch of files to s3&amp;#39;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; push origin master&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; push origin git-annex&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb1-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex drop&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And magically my raw files are available on s3 and my home NAS.&lt;/p&gt;
&lt;p&gt;If I jump over to a different machine I can run:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb2&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ~/Pictures&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; fetch&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; rebase&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb2-4&quot; title=&quot;4&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex get [new-raw-file]&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now that raw file is available on my new machine, I can open it in Darktable, I can do whatever I want to it: it&#39;s just a file.&lt;/p&gt;
&lt;p&gt;This is a pretty powerful extension of git.&lt;/p&gt;
&lt;p&gt;While I was reading the &lt;a href=&quot;https://git-annex.branchable.com/internals/&quot;&gt;git annex internals&lt;/a&gt; page today I stumbled across an even more powerful feature: metadata. You can store and retrieve arbitrary metadata about any git annex file. For instance, if I wanted to store EXIF info for a particular file, I could do:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb3&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex metadata 20140118-BlazeyAndTyler.jpg --set exif=&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;va&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;exiftool&lt;/span&gt; -S \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-2&quot; title=&quot;2&quot;&gt;  -filename \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-3&quot; title=&quot;3&quot;&gt;  -filetypeextensions \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-4&quot; title=&quot;4&quot;&gt;  -make \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-5&quot; title=&quot;5&quot;&gt;  -model \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-6&quot; title=&quot;6&quot;&gt;  -lensid \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-7&quot; title=&quot;7&quot;&gt;  -focallength \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-8&quot; title=&quot;8&quot;&gt;  -fnumber \&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb3-9&quot; title=&quot;9&quot;&gt;  -iso 20140118-BlazeyAndTyler.jpg&lt;span class=&quot;va&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;st&quot;&gt;&amp;quot;&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And I can drop that file and still retrieve the EXIF data&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex drop 20140118-BlazeyAndTyler.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;drop&lt;/span&gt; 20140118-BlazeyAndTyler.jpg (checking tylercipriani-raw...) &lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;checking&lt;/span&gt; tylercipriani-raw...&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;checking&lt;/span&gt; tylercipriani-raw...&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ex&quot;&gt;ok&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;recording&lt;/span&gt; state in git...&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-4&quot; title=&quot;4&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex metadata --get exif !$&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-5&quot; title=&quot;5&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex metadata --get exif 20140118-BlazeyAndTyler.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-6&quot; title=&quot;6&quot;&gt;&lt;span class=&quot;ex&quot;&gt;FileName&lt;/span&gt;: 20140118-BlazeyAndTyler.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Make&lt;/span&gt;: SAMSUNG&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Model&lt;/span&gt;: SPH-L720&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-9&quot; title=&quot;9&quot;&gt;&lt;span class=&quot;ex&quot;&gt;FocalLength&lt;/span&gt;: 4.2 mm&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;ex&quot;&gt;FNumber&lt;/span&gt;: 2.2&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-11&quot; title=&quot;11&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ISO&lt;/span&gt;: 125&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is pretty neat, but it can also be achieved with &lt;a href=&quot;https://tylercipriani.com/blog/2016/08/26/abusing-git-notes/&quot;&gt;git notes&lt;/a&gt; so it&#39;s nothing too spectacular.&lt;/p&gt;
&lt;p&gt;But git annex metadata doesn&#39;t quite stop there.&lt;/p&gt;
&lt;section id=&quot;random-background&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Random background &lt;a href=&quot;https://tylercipriani.com/tags/git-annex/#random-background&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;My picture directory is laid out like this:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb5&quot;&gt;&lt;pre class=&quot;sourceCode txt&quot;&gt;&lt;code class=&quot;sourceCode default&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-1&quot; title=&quot;1&quot;&gt;Pictures/&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-2&quot; title=&quot;2&quot;&gt;└── 2015&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-3&quot; title=&quot;3&quot;&gt;    └── 2015-08-14_Project-name&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-4&quot; title=&quot;4&quot;&gt;        ├── bin&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-5&quot; title=&quot;5&quot;&gt;        │   └── convert-and-resize.sh&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-6&quot; title=&quot;6&quot;&gt;        ├── edit&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-7&quot; title=&quot;7&quot;&gt;        │   ├── 2015-08-14_Project-name_00001.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-8&quot; title=&quot;8&quot;&gt;        │   └── 2015-08-14_Project-name_00002.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-9&quot; title=&quot;9&quot;&gt;        └── raw&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb5-10&quot; title=&quot;10&quot;&gt;            └── 2015-08-14_Project-name_00001.NEF&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I have directories for each year, under those directories I create directories that are prefixed with the &lt;a href=&quot;https://xkcd.com/1179/&quot;&gt;ISO 8601&lt;/a&gt; import date for the photo, some memorable project name (like &lt;code&gt;mom-birthday&lt;/code&gt; or &lt;code&gt;rmnp-hike&lt;/code&gt;). Inside that directory I have 2 directories: &lt;code&gt;raw&lt;/code&gt; and &lt;code&gt;edit&lt;/code&gt;. Inside each one of those directories, I have photos that are named with ISO 8601 import date, project name, and 5-digit import number and a file extension – raw files go in &lt;code&gt;raw&lt;/code&gt; and edited/finished files &lt;code&gt;edit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I got this system from &lt;a href=&quot;http://www.rileybrandt.com/lessons/&quot;&gt;Riley Brandt&lt;/a&gt; (I can&#39;t recommend the Open Source Photography Course enough – it&#39;s amazing!) and it&#39;s served me well. I can find stuff! But git annex really expands the possibilities of this system.&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;fictional-real-world-totally-real-actually-happening-scenario&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Fictional, real-world, totally real actually happening scenario &lt;a href=&quot;https://tylercipriani.com/tags/git-annex/#fictional-real-world-totally-real-actually-happening-scenario&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I go to Rocky Mountain National Park (RMNP) multiple times per year. I&#39;ve taken a lot of photos there. If I take a trip there in October I will generally import those photos in October and create &lt;code&gt;2015/2015-10-05_RMNP-hike/{raw,edit}&lt;/code&gt;, and then if I go there again next March I&#39;d create &lt;code&gt;2016/2016-03-21_RMNP-daytrip-with-blazey/{raw,edit}&lt;/code&gt;. So if I want to preview my RMNP edited photos from October I&#39;d go:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb6&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-1&quot; title=&quot;1&quot;&gt;&lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; 2015/2015-10-05_RMNP-hike/edit&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex get&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb6-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;geeqie&lt;/span&gt; .&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;But what happens if I want to see all the photos I&#39;ve ever taken in RMNP? I could probably cook up some script to do this. Off the top of my head I could do something like &lt;code&gt;find . -iname &#39;*rmnp*&#39; -type l&lt;/code&gt;, but that would undoubtedly miss some files from a project in RMNP that I didn&#39;t name with the string &lt;code&gt;rmnp&lt;/code&gt;. Git annex gives me a different option: metadata tags.&lt;/p&gt;
&lt;/section&gt;
&lt;section id=&quot;metadata-tags&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Metadata Tags &lt;a href=&quot;https://tylercipriani.com/tags/git-annex/#metadata-tags&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Git annex supports a special type of short metadata – &lt;code&gt;--tag&lt;/code&gt;. With &lt;code&gt;--tag&lt;/code&gt;, you can tag individual files in your repo.&lt;/p&gt;
&lt;p&gt;The WMF reading team offsite in 2016 was partially in RMNP, but I didn&#39;t name any photos &lt;code&gt;RMNP&lt;/code&gt; because that wasn&#39;t the most memorable bit of information about those photos (&lt;code&gt;reading-team-offsite&lt;/code&gt; seemed like a better project name) nor did &lt;code&gt;RMNP&lt;/code&gt; represent all the photos from the offsite. I should tag a few of those photos &lt;code&gt;rmnp&lt;/code&gt; with git annex:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb7&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-1&quot; title=&quot;1&quot;&gt;$ &lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; ./2016/2016-05-01_wikimedia-reading-offsite/edit/&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-2&quot; title=&quot;2&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex metadata --tag rmnp Elk.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;metadata&lt;/span&gt; Elk.jpg &lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-4&quot; title=&quot;4&quot;&gt;  &lt;span class=&quot;va&quot;&gt;lastchanged=&lt;/span&gt;2016-09-29&lt;span class=&quot;ex&quot;&gt;@04-14-44&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-5&quot; title=&quot;5&quot;&gt;  &lt;span class=&quot;va&quot;&gt;tag=&lt;/span&gt;rmnp&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-6&quot; title=&quot;6&quot;&gt;  &lt;span class=&quot;ex&quot;&gt;tag-lastchanged&lt;/span&gt;=2016-09-29@04-14-44&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ok&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;recording&lt;/span&gt; state in git...&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-9&quot; title=&quot;9&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex metadata --tag rmnp Reading&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;folks&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;bing&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;higher&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;up&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;than&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;it&lt;span class=&quot;dt&quot;&gt;\ &lt;/span&gt;looks.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-10&quot; title=&quot;10&quot;&gt;&lt;span class=&quot;ex&quot;&gt;metadata&lt;/span&gt; Reading folks bing higher up than it looks.jpg &lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-11&quot; title=&quot;11&quot;&gt;  &lt;span class=&quot;va&quot;&gt;lastchanged=&lt;/span&gt;2016-09-29&lt;span class=&quot;ex&quot;&gt;@04-14-57&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-12&quot; title=&quot;12&quot;&gt;  &lt;span class=&quot;va&quot;&gt;tag=&lt;/span&gt;rmnp&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-13&quot; title=&quot;13&quot;&gt;  &lt;span class=&quot;ex&quot;&gt;tag-lastchanged&lt;/span&gt;=2016-09-29@04-14-57&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-14&quot; title=&quot;14&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ok&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb7-15&quot; title=&quot;15&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;recording&lt;/span&gt; state in git...&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Also, when my old roommate came to town we went to RMNP, but I tagged those photos &lt;code&gt;cody-family-adventure-time&lt;/code&gt;. So let&#39;s tag a few of those &lt;code&gt;rmnp&lt;/code&gt;, too:&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb8&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-1&quot; title=&quot;1&quot;&gt;$ &lt;span class=&quot;bu&quot;&gt;cd&lt;/span&gt; 2015/2016-01-25_cody-family-adventuretime/edit&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-2&quot; title=&quot;2&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex metadata --tag rmnp alberta-falls.jpg&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-3&quot; title=&quot;3&quot;&gt;&lt;span class=&quot;ex&quot;&gt;metadata&lt;/span&gt; alberta-falls.jpg &lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-4&quot; title=&quot;4&quot;&gt;  &lt;span class=&quot;va&quot;&gt;lastchanged=&lt;/span&gt;2016-09-29&lt;span class=&quot;ex&quot;&gt;@04-17-48&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-5&quot; title=&quot;5&quot;&gt;  &lt;span class=&quot;va&quot;&gt;tag=&lt;/span&gt;rmnp&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-6&quot; title=&quot;6&quot;&gt;  &lt;span class=&quot;ex&quot;&gt;tag-lastchanged&lt;/span&gt;=2016-09-29@04-17-48&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-7&quot; title=&quot;7&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ok&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb8-8&quot; title=&quot;8&quot;&gt;&lt;span class=&quot;kw&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ex&quot;&gt;recording&lt;/span&gt; state in git...&lt;span class=&quot;kw&quot;&gt;)&lt;/span&gt;&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id=&quot;metadata-views&quot; class=&quot;level2&quot;&gt;
&lt;h2&gt;Metadata views &lt;a href=&quot;https://tylercipriani.com/tags/git-annex/#metadata-views&quot;&gt;¶&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now the thing that was really surprising to me, you can filter the whole pictures directory based on a particular tag with git annex by using a &lt;a href=&quot;https://git-annex.branchable.com/tips/metadata_driven_views/&quot;&gt;metadata driven view&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;sourceCode&quot; id=&quot;cb9&quot; data-org-language=&quot;sh&quot;&gt;&lt;pre class=&quot;sourceCode bash&quot;&gt;&lt;code class=&quot;sourceCode bash&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-1&quot; title=&quot;1&quot;&gt;$ &lt;span class=&quot;ex&quot;&gt;tree&lt;/span&gt; -d -L 1&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-2&quot; title=&quot;2&quot;&gt;&lt;span class=&quot;ex&quot;&gt;.&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-3&quot; title=&quot;3&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;2011&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-4&quot; title=&quot;4&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;2012&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-5&quot; title=&quot;5&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;2013&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-6&quot; title=&quot;6&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;2014&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-7&quot; title=&quot;7&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;2015&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-8&quot; title=&quot;8&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;2016&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-9&quot; title=&quot;9&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;instagram&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-10&quot; title=&quot;10&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;lib&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-11&quot; title=&quot;11&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;lossy&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-12&quot; title=&quot;12&quot;&gt;├── &lt;span class=&quot;ex&quot;&gt;nasa&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-13&quot; title=&quot;13&quot;&gt;└── &lt;span class=&quot;ex&quot;&gt;Webcam&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-14&quot; title=&quot;14&quot;&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-15&quot; title=&quot;15&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;git&lt;/span&gt; annex view tag=rmnp&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-16&quot; title=&quot;16&quot;&gt;&lt;span class=&quot;ex&quot;&gt;view&lt;/span&gt;  (searching...) &lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-17&quot; title=&quot;17&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Switched&lt;/span&gt; to branch &lt;span class=&quot;st&quot;&gt;&amp;#39;views/(tag=rmnp)&amp;#39;&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-18&quot; title=&quot;18&quot;&gt;&lt;span class=&quot;ex&quot;&gt;ok&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-19&quot; title=&quot;19&quot;&gt;$ &lt;span class=&quot;fu&quot;&gt;ls&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-20&quot; title=&quot;20&quot;&gt;&lt;span class=&quot;ex&quot;&gt;alberta-falls_%2015%2016-01-25_cody-family-adventuretime%edit%.jpg&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-21&quot; title=&quot;21&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Elk_%2016%2016-05-01_wikimedia-reading-offsite%edit%.jpg&lt;/span&gt;&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb9-22&quot; title=&quot;22&quot;&gt;&lt;span class=&quot;ex&quot;&gt;Reading&lt;/span&gt; folks bing higher up than it looks_%2016%2016-05-01_wikimedia-reading-offsite%edit%.jpg&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I can even filter this view using other tags with &lt;code&gt;git annex vfilter tag=whatever&lt;/code&gt;. And I can continue to edit, refine, and work with the photo files from there.&lt;/p&gt;
&lt;p&gt;This feature absolutely blew my mind – I dropped what I was doing to write this – I&#39;m trying to think of a good way to work it into my photo workflow &lt;img src=&quot;https://tylercipriani.com/smileys/smile.png&quot; alt=&quot;:)&quot; /&gt;&lt;/p&gt;
&lt;/section&gt;

	</content>


	<link rel="comments" href="//tylercipriani.com/blog/2016/09/28/git-annex-metadata-filtered-views/#comments" type="text/html" />


	<link rel="comments" href="//tylercipriani.com/blog/2016/09/28/git-annex-metadata-filtered-views/comments.atom" type="application/atom+xml" />

</entry>

</feed>
