Importing

Subversion Part 2: Setting Up A Repository And Importing A Project

subversion_logo
The repository called Random Wok Repository I set up in Documents/Progging/Repositories needs some internal structure. That's because I am going to have it contain virtual folders called trunk, releases, and branches (I prefer releases over tags).

In the original Random Wok project folder I create the new structure: trunk, branches, releases. And then copy the current contents into trunk and delete the Build folder.
svn9
Now I am ready to do the import. I need to do this from the command line. First I change my working directory to the changing to the original project folder (yellow in my diagrams) and then import using svn import. I have to give a check-in message with -m or else svn complains with an error (no editor set up). The dot in the svn import line below references the current directory. The repository is defined with a URL that starts with file:///:
svn8
Now the structure looks like this:
svn3
Everything below Random Wok/ in red is in the repository and so the folders shown are virtual folders. They can be referenced with URLs passed to svn that start with file:/// by including the path to the repository and then the path inside the repository.

Now revision 1 is in the repository I can use a utility called svnX to inspect it. I no longer need the Terminal window open. svnX will not recognise an empty repository, so up until now I could not use it. I download snvX from Apple and install it. Svnx is a GUI front end to svn.

The prefs are already set up for me:
svn7
In the Repositories panel I add a new repository pressing +, giving the repository a name, and dragging the Random Wok Repository folder onto the Path field. Now svnX knows where the repository is:
svn10
I double-click on the repository to open it in svnX and look at the contents:
svn11
The lower part is a folder browser that shows the structure of the revision select in the pane above. I can see the import message and a list of revisions with just one revision in it. The svn mkdir button is used to make more virtual folders in the repository and svn copy and svn move button copy and move virtual folder trees in the repository.

I no longer need the original project file, so I can archive it to a ZIP file to get it out of the way:
svn4
In its current state I cannot use my project. It is inside the repository and inaccessible to XCode and other tools. So the next step is to check out a copy.

The other parts of this series can be found via the Cocoa page.
|

Aperture: Is There Any Way To Stop Aperture Importing The Same Image More Than Once?

qandasmall
I have found your Aperture articles to be very useful, thanks for taking the time to post them. Quick question for you about your advanced importing article. When you did the following: 'In this case I have elected to copy the master files into a folder called Dogs' Is there any way to tell Aperture to ignore duplicate images and only import/copy the new ones to the 'Dogs' folder? This was a handy feature that Canon's CameraWindow provided and I got into the habit of using it (I don't always delete all the images from my photo card after an import).

Aperture does not ignore duplicates when they are imported, as you and many others have discovered. Certainly this is a feature of iView and many other image cataloging applications. Why not Aperture as well?

It's simply that Aperture is not an image cataloging application: it's an image library application. It includes cataloging features, (including a catalog) as all libraries do, but there is more to it that that. The difference is that a catalog tells you where something is while a library stores it for you as well. It gets confusing when referenced image masters are involved. The addition of referenced masters makes Aperture look just like a cataloging application in some ways. But really referenced masters are a part of the library just as much as managed masters are. It is only their storage that is different.

Having said that, I do agree that having an "ignore already imported images" button on the import pane would be very useful. I just don't see how it could be reliably implemented. How does Aperture know that the image has already been imported? If it gets it wrong, you will lose images and be much madder than a few duplicates could ever make you.
|

Importing 16:9 Movies From Final Cut Express to iDVD

anamorphicizer
Here is a problem that I ran into a while back. Exporting anamorphic (16:9) movies from Final Cut Express HD to iDVD does not work: iDVD does not know that they are anamorphic and so displays them as 4:3 movies, stretching them vertically. This problem does not occur with the Canon S3 video AVI format because the pixels are square -- nothing is stretched for display.

However for DV shot in anamorphic mode, as I do for all my movies shot with a regular DV video camera, this is a problem. The solution is to export the video as a reference Quicktime move from Final Cut Express HD with all the markers exactly as you would normally do, and then run Anamorphicizer on it. This utility sets a flag in the exported movie that is recognized by iDVD. iDVD then does the right thing and the move is burned to DVD with the correct aspect ratio settings. [Update: as was pointed out by a reader, you need Quicktime Pro to do this].

The movie exported from Final Cut Express HD will usually be a reference movie. Here is mine:
anamorphicizer2
It shows up in the Finder with this information:
anamorphicizer3
To get Anamorphiciser to process it, I drag and drop the icon onto the Anamorphicizer icon. Anamorphicizer will open the movie and display color bars for a short time, then display a dialog:
anamorphicizer4
The movie will be opened at the first frame and the name changed to Shell.mov. I click OK to dismiss the dialog box and then from the menu bar, select File > Save As... The dialog displayed is a little odd:
anamorphicizer5
The folder it shows is called Resources and it already contains some items don't look like anything I have created. This happens because the utility is actually showing me the Resources folder inside the application. I don't want to save my movie here! So I change the folder to a more sensible location, give the movie a name that indicates that it is wide now, and set the selection to save as a reference movie:
anamorphicizer6
Hit Save and I am done. The icon has changed to a Quicktime icon:
anamorphicizer7
But that makes no difference to iDVD. Drag that onto iDVD.

You can download Anamorphicizer from this page. There are two versions: one for Quicktime previous to 7 and one for Quicktime 7.
|

iView to Aperture Workflow -- Part 2: Importing

Following preparation, the next step in moving my old photos from iView to Aperture is importing. There are two things to import: the images and the metadata.

Import Images
At the end of this process my Aperture library will contain managed images. But initially I import all of them by reference into the projects I prepared. The reason for this will become clear. I import entire folder hierarchies at once by using File > Import > Folders Into A Project. This puts all of the images from the folder hierarchy into a project and creates a hierarchy of brown folders and albums that matches the folder organization. In this way I still have my old hierarchy represented but can archive it without manual blue folder work and lots of separate imports. Of course I can throw away the albums if I wish: I may not want to have any remnants of my old folder structure remain in Aperture.

When importing I use a rename setting called Version Dash Date. That takes the version name and adds the image date. I leave the images in their current location. So on the import dialog, the settings look like this:
iview201
I don't have to wait for the imports to complete. Aperture will queue imports and automatically go through all of the ones I have set up:
import1
Then when my imports are all complete, I wait for all the thumbnails to build -- just to be sure nothing odd happens -- and check the projects over to make sure they look right.

All of the images so for imported have been referenced, but the next step changes that. For each project in the blue folder I created (called iView) I consolidate the masters with the Move option selected. File > Consolidate Masters for Project brings up this dialog that confirms my selection:
iview202
This step moves the referenced masters into my Aperture library, so leaving the original folders empty. But are they empty? If they are not then there has been a problem and I need to go sort it out. Possible reasons for the folders not being empty include bad image files, images files in formats that Aperture will not import, text and other foreign files, and permissions problems.

Any easy way to do this check is to display the top-level folder in list view in the Finder, select everything with command A, and then press option command right-arrow. That opens all the folders recursively and shows their contents. Close them all up again with option command left-arrow.

I deal with anything that has not been consolidated, and get all the remaining images into the library or trash them if they are corrupt.

Once consolidated, I mark all the images with a new keyword notreviewed using the keyword HUD. I'm not sure I will need it, but this is the last opportunity to have a way of automatically tying together all of the images I have removed from my old folder structure.

Import Metadata
Now I break out Annoture. The version I am using is 1.0.2. Annoture processes all of the metadata for the images in a project by scanning the iView catalog for the file names of those images, retrieving the metadata, and adding it to the Aperture database.

Here are the preferences I use for Annoture:
iview203
By ignoring file extensions I can have Annoture copy metadata from old files that had no extension but were corrected to have an extension before they were added to Aperture. Comparing capture dates allows images in the iView catalog that have the same name to be distinguished. Without that metadata from the first image found rather than the correct image will be transferred.

I set up the main window like this:
iview204
Each time I run Annoture I select the appropriate project in the pop-up. I have to make sure that all of my projects have different names, because it is not possible to distinguish identically-named projects here.

Important: Annoture transfers metadata for each image in the selected Aperture project by examining the current selection displayed by iView. It is important to know this, because if I have a subset of my thumbnails displayed in iView when I run Annoture two things will happen: 1) it will run faster because it has fewer images to scan, and 2) there will be some images that do not have their metadata transferred.

I can use this behavior to my advantage. Since my old images are organized into folders by year or month, I set up the Aperture projects that way. By filtering the iView display by using the Catalog Folder pane:
iview205
I can limit the number of images that Annoture has to search and speed it up dramatically. Instead of searching 10,000 images, iView will only search a few hundred. That drops the processing time from 15 seconds per image down to less than one.

Since I tagged all of the images in my iView catalog with iviewimport, any of the imported images in my Aperture that were not successfully processed by Annoture lack the iviewimport keyword. So after copying the metadata for each project I run a filter that looks for all images without iviewimport in the IPTC keyword field:
iview206
Now I can examine those images and figure out why they could not be found in the iView catalog. The usual reason is that the image was never put into the iView catalog and hence has no metadata. In other cases the iView thumbnail was incorrect and somehow had become attached to a different image.

Import is now done. Next is the final step: reorganization.
|

Aperture: Undoing Imports

Several times I have imported images into the library when I intended to leave them where they were and reference them. The import pane has a Store Files popup:
unimport1
but it is easy to forget to set this before every import and there is no option to make a default. I suspect that at least in Aperture 1.5.1 this control is unpredictable.

If I imported the images and still have the originals where they were, then this is easy to fix. I just click on the project I imported into and filter by import session:
unimport2
By filtering down to just the erroneously imported images I can select and delete them. Since my originals are still on the hard drive I just redo the import, this time making the correct selections.

If I imported the images but have already deleted them, then the only copies live in the library and I have to get them out. By finding the images with a filter as above I can relocate the masters out of the library and back to where I want them. Selecting the images and using File > Relocate Masters allows me to select the relocation location by folder format and file name:
unimport3
The only hitch is that if I imported a hierarchy using Files > Import > Folders Into A Project, I may not be able to use the file folder presets on the relocate dialog to create the same folder hierarchy that they originally came from. The good news is that the Aperture library tracks these file movements and so once the relocation is complete there is nothing else to do: no need to reimport anything.

A way to avoid this problem entirely with referenced masters is to always import into the Aperture library and then always relocate later. I recommend that workflow because it means that all of the referenced masters are in locations created by Aperture and so can be put back there should the need arise.
|

Aperture: How Do I Reset The Numbering Of Images Imported Into A New Project?

qandasmall
My case: I am a theater photographer. I take hundreds of photo from each performance in many different CF disks. For each show, I make one project in Aperture. I assign a name for each project and when I import the photos I give a custom name for my Master files with counter. for the first project, everything is all right. I get counters started with 1 and goes on. But the problem starts when I want to import photos for the second Project. here I want my master files have a new custom name with new counters. I get the new custom name but the counter does not start from 1. It starts with the next figure that last project's photo. Please advise. How can I have different projects with different counters. Have this in mind that each of my projects have more that 1000 picture in it.

You can do this by using a counter on import and resetting its value each time you create a new project. Aperture does not have counters that are tied to the projects, so this is the only way to achieve what you are trying to do.

On the import pane is an area where the name can be modified as it is imported:
count2
At the bottom of the pop-up for the Version Name is an option to edit the presets. That brings up a dialog that allows you to construct the presets out of various elements:
count3
Among the choices are three different counters that can be added to file names when images are imported: a sequence number, an index number, or a counter.

A sequence number is expressed as index of total like "5 of 86". It starts at one and increases for each image imported. Each import resets the sequence number.

An index number starts at 1 and increases for each image imported. Each import resets the index number.

A counter initially starts at 1 and does not get reset by each import. So each image gets a different number irrespective of how or when it was imported.

As can be seen above, the dialog gives the opportunity to set the starting value of the counter to any number, so this is how it can be reset for a new project. It also allows going back to an old project and adding more images: set the counter starting value to one greater than the highest-numbered image in that project. It would be nice if Aperture offered a project-based counter, but so far it does not.
|

Aperture: Recovering From Importing Images With No Extension

I have diagnosed the cause of the problem I discovered yesterday. It has nothing to do with write-only files (although those will cause other problems and that is a bug that should be fixed): it is the fact that the image files have no extension. I got into this mess by importing the images by reference and leaving them were they were and then consolidating them and selecting the Move option.

To recover:

1. Open the Aperture library package with control click and select Show Package Contents

2. Find the affected project, open that package, and drill down to the individual image folders

3. Open the folder for an affected image and look for the file ending in .apfile. Open that with an XML editor or a text editor. Here is one:
bug1
Notice that the extension field is blank. And the imagepath and name fields have the file name without an extension.

4. Change those to the filename with the correct extension.

5. Change the item called extension from blank to JPG or whatever the extension should be. I used upper case because that is what Aperture uses.

6. Save and close

Here is my example fixed:
bug2
7. Rename the original file in the image folder by adding the correct extension (.jpg in my case)

8. Repeat for all affected images

9. Find the Aperture application icon and command option double click. Aperture will launch and ask you if you want to rebuild the library. Click Now and it will do its work. Not rebuilding the library will not do any harm, but if you don't rebuild it then the database is out of sync with the apfiles and the broken images will still be broken.

This seems to fix the problem for me, but I have simply replaced my library and files with back up copies now.
|

Aperture 1.5: Advanced Photo Import and Metadata Presets

Importing images in Aperture 1.5 is much more interesting than in 1.1. As well as dragging images and folders into the library to create managed masters, you can now rename masters on import and decide whether you want your master images to be managed or referenced. The addition of metadata presets provides the option of adding personal standard metadata to all imported images.

Importing Images From A Single Folder


To import images from a single folder (such as a camera card) I press command I to bring up the import images dialog. I navigate to my images using the browser at the top and then check all the options. Here is the interesting part of the dialog:
imp1
In this case I have elected to copy the master files into a folder called Dogs. The default is the Pictures folder in my Home folder, but I added this new folder on my disk and selected it with the Store Files pop-up. This will import the files as referenced masters and copy them to this folder, effectively doing a Relocate with copy for me after the import. The other options for the Store Files pop-up are In The Aperture Library which makes them managed and In Their Current Location which makes them referenced but does not move them.

By selecting a naming scheme for the Version name, I can change how the versions are named as they are imported. Checking the Apply to Master Filename makes this scheme do just that. My standard renaming system is shown above. I call it Version dash date because it adds the current date to the version name. This guarantees that I will get unique names when my camera counter rolls over (as it has already done).

Adding metadata can be done here as well, but I rarely do this. I prefer to import into a new project and then manipulate the metadata. On a small screen it can be hard to get to the fields, but tabbing between them works even if the scroll bar is hidden. The example above has a custom metadata field Retouch that I added in the metadata inspector panel.

On the top right of the dialog a panel shows how things will change for the selected image:
imp2
I normally elect to show an alert because I want to unmount the card. If I don't select this, then the card remains mounted and it is too easy to forget, yank it out of the reader, and then have to deal with a confused USB tree.

A nice touch is that I can also show the images in the list view:
imp3

This can be useful for sorting on camera model or other metadata that is not available from the grid view.

Adding Standard Metadata On Import


Now that Aperture supports metadata presets it is possible to use one to add standard metadata as part of the import process. But to do that you must have set one up beforehand. You cannot set up a metadata preset by going to Aperture > Presets as you would for all the other presets, but instead have to go through several steps, starting with the metadata pane (control D) in the main Aperture window.

I will set up a special metadata view that includes just the fields I want to have applied during import. I do this by clicking on the cog top right of the metadata pane and selecting New View:
imp14
and name it something memorable:
imp15
All this does is set up a name for a collection of fields. Next I have to select the fields I want, and then I can fill those fields with the information I want to stamp on each image as it is imported.

Now the metadata pane shows my new view, empty of fields:
imp16
I select the fields I want by clicking on the buttons at the bottom and then clicking the checkboxes:
imp17
To get the Keywords field added I had to select Keywords at the bottom and the check the Include In Summary box. Not obvious at all. The fields can be dragged to rearrange them. Now I have defined the fields I want to add during import, the next step is to define the values I want to put in those and save them as presets.

I click on an image (any image) and duplicate the version. This gives me a scratch image I can mess with and then throw away. I fill in the preset values I want for my imports:
imp18
And save this as a named metadata preset:
imp19
Giving it a descriptive name:
imp20
I can repeat this to set up several other presets with different preset values. When done I delete the temporary version. Presets can also be managed from the metadata pane via the metadata pane. Click on the cog top right to manage presets:
imp22
The import and export buttons use XML plists which look like this in an XML editor:
imp21
Now my presets are ready to be used. To add this preset metadata to my imported images I select the preset in the import dialog:
imp23
Now what is odd here is that I can only choose to add or not add from the preset values. There is no way to have a field that is manually filled in and no way to override what is preset. The City field I included in the Import metadata view will have to be filled in by hand later. There really should be two pop-ups here: one for metadata views that can be filled in by hand and one for preset values that are automatically populated. As it is I have to chose one or the other and cannot have both.

Handling Keywords Added During Import


Adding metadata on import can be a time-saver, both in terms of saving time not having to do it later and in not having to deal with the consequences of forgetting to doing it later. But for keywords, it can be less advantageous because there is no way to add keyword hierarchies during import, only individual keywords. So it is necessary to go through some extra steps later.

Here I am adding some keywords to my imported photos:
imp4
After the import is complete, since my Keyword HUD is locked (it is good to keep it that way) the keywords don't get thrown in with my existing ones. Instead I get this section at the bottom:
imp5
This is not what I really want. I have an existing keyword hierarchy that includes Events > Halloween that these images should belong to.

First I correct the capitalization (halloween to Halloween) and accept the dialog that tells me I am changing this name on a bunch of images. This makes the keyword in the Imported Keyword list identical to the one in the Events list and updates all the images that have the keyword. Then I drag the Halloween keyword in Imported Keywords to my Events keyword, the parent of my real Halloween keyword. This dialog asks if I want to merge:
imp6
Yes I do. Now all of my imported images are keyworded as Events > Halloween. Repeat for all the other keywords. Really it would have been easier to just filter by import session, hit command A, command click on the keywords I want to select them, and then drag them to the images.

Importing A Folder Hierarchy


Another way of importing is to grab a whole hierarchy of folders and image files at once. Here are the images I want to import, all arranged in a hierarchy that I want to maintain in the library:
imp7
To do this, I select the library or an existing project and use File > Import > Folders Into A Project. A file selection dialog opens with some familiar options:
imp8
Here I have selected a folder called New Files as a destination for the masters and elected to copy the files in. The masters will be referenced by Aperture. I also chose a particular naming system called Custom Name with Count and decided not to rename my masters. After the import is complete, this is what is in the library:
imp11
The original folder hierarchy has been maintained by the project, the brown folder, and the albums. All the images are in the project and they reference the master files. Because I selected Halloween as the custom name and numbered subfolders for each image and told Aperture to copy my masters to a folder called New Files, Aperture has done all of that for me as part of the import:
imp10
Notice that the master file organization on disk is nothing like the organization inside Aperture. The two are disconnected. If I decide I don't like this particular way of storing my masters I can change it at any time by simply relocating them with Aperture's Relocate Master function.
|

Aperture 1.5: Keyword Import Gotchas

If you import keywords from a text file be aware of a couple of things.

1. The file must have a .txt extension, or Aperture will not let you open it. Easy to fix.

2. Make sure that the text file has Unix line endings (line feeds -- hex 0A). Not quite so easy to fix.

DOS line endings (line feed, carriage return -- hex 0D 0A) will seem to work, but will actually create keywords with carriage returns on the end and confuse you like crazy later on.

MacOS 9 line endings (carriage return -- hex 0D) will import only the first word in the file. But repeated imports of the same list will keep adding more and more copies of the same first keyword to the HUD.

You can easily check and clean your file if you suspect a problem. Get a copy of TextWrangler and open the file containing the keywords. Click on the document icon at the top of the window:
kend1
And if Unix is not selected, select it and save the file. That's it. You can also use TextWrangler to view invisible characters, indent whole blocks of text, clean up bad characters, and dump the file in hex.
|

Importing and Exporting Aperture Keywords

Aperture keywords can be imported and exported, but it is not obvious how to do this. There are no menu items anywhere to be found, and there is nothing on the inspector panel of the Aperture main window. Instead, bring up the keyword HUD (shift H) and all is revealed:
kwd1
There, at the bottom of the window are the Import... and Export... buttons. When you export, you'll get a plain text file containing the keywords and tab characters, so make sure whatever editor you use can display tabs correctly. Don't convert tabs to spaces or allow tabs added to the file to be expressed as spaces. The best kind of editor for this is something like SubEthaEdit, or TextWrangler.

Here is TextWrangler's display of part of the file with invisibles turned on so you can see the tabs and newlines:
kwd4
The tabs are used to indent the text to match the indenting of the keyword hierarchy. TextWrangler will let you move whole blocks of text left and right, subtracting or adding tabs as needed, so this is a very fast way to make large changes to your keyword list. When you are done editing, import the keyword list back into Aperture. The list you import will replace the current list, but none of the keywords already attached to images will be modified.

The other list that can be exported and imported is the metadata button list that appears at the bottom of the Aperture window:
kwd5
Again, there is no way to do anything with this information through the menus. Instead you access it through the pop-up:
kwd6
And the following window gives you the import and export buttons:
kwd2
What you are importing and exporting here is more complex than just a list of keywords. Each button set shown on the left pan consists of a list of keywords shown in the middle pane. Each of those has a hierarchy associated with it from the keyword library shown on the right pane.

When you export the button sets you get a plist file instead of a plain text file. TextWrangler shows it like this:
kwd7
Again there are a lot of tabs in the file, but this time they are cosmetic. The structure is encoded in the bracketed items: this is an XML file. It's tough to edit this by hand without making mistakes, so you really need an XML editor to do the job. Apple supplies a plist editor (called Property List Editor) with their developer tools that shows a display like this:
kwd3
Here you can see the nine button sets I have defined and a list of preset keywords that the Actions set defines. On the highlighted line you can see the hierarchy of the keyword I have used (Bombers gallery): it is in Actions > Publish.

Having edited the button sets you can import the new sets into Aperture with the Import button. I have not actually tried this yet. I'm waiting for Aperture to have better and more consistent keyword support, especially for hierarchies before I do anything too complex.
|

iPhoto and Aperture

MacOSXHints has a hint on moving images from Aperture to iPhoto. There is also a $15 utility that does the same thing. Since I use iPhoto for almost nothing, I have not tried either of these.
|

Importing A Hierarchy Into Aperture

A more efficient way of getting a lot of images into Aperture than using the Import dialog is to simply drag the folder in. My example photos are in a folder called Photos and open up to a complete hierarchy that looks like this:
win2
Dragging and dropping into the project pane, or onto the Library results in this:
drag
Now all the hierarchy of the folder structure is maintained and Albums automatically created. In each Brown Folder there is an initial Album that contains the images that were not in any sub-folder, for example Images from: Animals. Exactly the same result can be achieved by using the menu item File -> Import -> Folders Into A Project.

if you want to add more images to that Project by dragging, then it is easily done. If a folder called More Photos that contains four images is dragged onto the Photos project then this results:
more
Notice the new album called More Photos and the increased count of images in the Photos project. Dragging a folder to an existing project does not create a new project with the top-level folder name, just an Album. The disadvantage with this way of importing is that the Project can be huge. So the best way to import an existing library is probably to drill down to a lower level in the folder hierarchy and drag those into separate Projects, then organize the projects with Blue Folders.

On top of this, because the folders (both types) can hold Albums, Galleries, and Light Tables from anywhere, you can create these wherever they make sense. And images from one Project can be shown in any Album, Gallery or Light Table.
|
The Bagelturf site welcomes Donations of any size