categories, subcategories, and albums OH MY!

Now that I have mkdir partially working, I need to figure out the use case for it. SmugMug has the notion of categories and albums. Here is how I plan on making it work. Since categories can contain subcategories but albums can not, I will make the categories the top level tree of directories with the leaf directory becomes an album.

Let’s walk through an example. Let’s assume you mount smugmug in /mnt/smugmug. If you want to create a “Samuel Birthday 2007” album in the Children category and in the Birthday subcategory you would do the following:
mkdir -p "/mnt/smugmug/Children/Birthday/Samuel Birthday 2007"
at that point if the categories don’t exist they will be created as will the album.
The one edge case I see here is if you want a Birthday album under the Children category. Should I allow directories to have both? maybe I can store metadata about them somewhere. For now, I’ll leave that use case out until I see a good way of handling it.

Advertisements

2 thoughts on “categories, subcategories, and albums OH MY!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s