3 18824b58 2008-08-03 rsc smugfs \- file system access to SmugMug photo sharing
11 18824b58 2008-08-03 rsc .I keypattern
21 18824b58 2008-08-03 rsc .SH DESCRIPTION
23 18824b58 2008-08-03 rsc is a user-level file system that provides access to images
24 18824b58 2008-08-03 rsc stored on the SmugMug photo sharing service.
25 18824b58 2008-08-03 rsc It logs in after
26 18824b58 2008-08-03 rsc obtaining a password from
27 18824b58 2008-08-03 rsc .IR factotum (4)
29 18824b58 2008-08-03 rsc .B server=smugmug.com
31 18824b58 2008-08-03 rsc .I keypattern
33 18824b58 2008-08-03 rsc as key criteria
35 18824b58 2008-08-03 rsc .IR auth (3)).
38 18824b58 2008-08-03 rsc serves a virtual directory tree mounted at
41 18824b58 2008-08-03 rsc .BR /n/smug )
42 18824b58 2008-08-03 rsc and posted at
46 18824b58 2008-08-03 rsc option is given.
48 18824b58 2008-08-03 rsc The directory tree is arranged in five levels:
49 18824b58 2008-08-03 rsc root, user, category, album, and image.
51 18824b58 2008-08-03 rsc .B /n/smug/cmac/
52 18824b58 2008-08-03 rsc is a user directory,
53 18824b58 2008-08-03 rsc .B /n/smug/cmac/People/
54 18824b58 2008-08-03 rsc is a category directory,
55 18824b58 2008-08-03 rsc .B /n/smug/cmac/People/Friends/
56 18824b58 2008-08-03 rsc is an album directory,
58 18824b58 2008-08-03 rsc .B /n/smug/cmac/albums/Friends/2631/
59 18824b58 2008-08-03 rsc is an image directory.
61 18824b58 2008-08-03 rsc SmugMug allows fine-grained classification
62 18824b58 2008-08-03 rsc via subcategories, but subcategories are not yet implemented.
64 18824b58 2008-08-03 rsc Subcategories are inserted as
65 18824b58 2008-08-03 rsc an additional directory level between category
67 18824b58 2008-08-03 rsc [Subcategories are not yet implemented.]
70 18824b58 2008-08-03 rsc All directories contain a special control file named
72 18824b58 2008-08-03 rsc text commands written to
75 18824b58 2008-08-03 rsc .IR smugfs 's
76 18824b58 2008-08-03 rsc behavior or implement functionality
77 18824b58 2008-08-03 rsc that does not fit nicely into the file system
81 18824b58 2008-08-03 rsc caches information about users, categories, albums,
82 18824b58 2008-08-03 rsc and images. If changes are made outside of
84 18824b58 2008-08-03 rsc (for example, using a web browser),
85 18824b58 2008-08-03 rsc the cache may need to be discarded.
86 18824b58 2008-08-03 rsc Writing the string
88 18824b58 2008-08-03 rsc to a directory's
92 18824b58 2008-08-03 rsc to discard all cached information used to
93 18824b58 2008-08-03 rsc present that directory and its children.
94 18824b58 2008-08-03 rsc Thus, writing
98 18824b58 2008-08-03 rsc file discards all of
100 18824b58 2008-08-03 rsc cached information.
101 18824b58 2008-08-03 rsc .SS "Root directory"
102 18824b58 2008-08-03 rsc The root directory contains directories
103 18824b58 2008-08-03 rsc named after users.
104 18824b58 2008-08-03 rsc By default, it contains only a directory for
105 18824b58 2008-08-03 rsc the logged-in user, but other directories will
106 18824b58 2008-08-03 rsc be created as needed to satisfy directory lookups.
108 18824b58 2008-08-03 rsc In addition to user directories, the root directory
109 18824b58 2008-08-03 rsc contains three special files:
111 18824b58 2008-08-03 rsc .BR rpclog ,
113 18824b58 2008-08-03 rsc .BR uploads .
116 18824b58 2008-08-03 rsc returns a list of recent RPCs issued to the SmugMug API server.
117 18824b58 2008-08-03 rsc Reads at the end of the file block until a new RPC is issued.
120 18824b58 2008-08-03 rsc file lists the file upload queue (q.v.).
121 18824b58 2008-08-03 rsc .SS "User directories"
122 18824b58 2008-08-03 rsc User directories contain category directories
123 18824b58 2008-08-03 rsc named after the categories.
124 18824b58 2008-08-03 rsc SmugMug pre-defines a variety of categories,
125 18824b58 2008-08-03 rsc so it is common to have many categories that
126 18824b58 2008-08-03 rsc do not contain albums.
128 18824b58 2008-08-03 rsc In a user directory, creating a new directory
129 18824b58 2008-08-03 rsc creates a new category on SmugMug.
130 18824b58 2008-08-03 rsc Similarly, renaming or removing a category
131 18824b58 2008-08-03 rsc directory renames or removes the category on SmugMug.
132 18824b58 2008-08-03 rsc Categories cannot be removed if they contain albums.
134 18824b58 2008-08-03 rsc User directories also contain a directory
137 18824b58 2008-08-03 rsc that itself contains all of that user's albums.
138 18824b58 2008-08-03 rsc .SS "Category directories"
139 18824b58 2008-08-03 rsc Each category directory contains album directories
140 18824b58 2008-08-03 rsc named using the album's title.
142 18824b58 2008-08-03 rsc In a category directory, creating a new directory
143 18824b58 2008-08-03 rsc creates a new album on SmugMug.
144 18824b58 2008-08-03 rsc Similarly, renaming or removing an album directory
145 18824b58 2008-08-03 rsc renames or removes the album on SmugMug.
146 18824b58 2008-08-03 rsc Albums cannot be removed if they contain images.
149 18824b58 2008-08-03 rsc Category directories might also contain subcategory directories.
150 18824b58 2008-08-03 rsc Like albums, subcategories can be renamed and removed (when empty).
151 18824b58 2008-08-03 rsc Unlike albums, subcategories cannot be created via ordinary
152 18824b58 2008-08-03 rsc file system operations.
153 18824b58 2008-08-03 rsc Instead, write the command
154 18824b58 2008-08-03 rsc .B subcategory
156 18824b58 2008-08-03 rsc to the category's
160 18824b58 2008-08-03 rsc Subcategories are identical to categories
161 18824b58 2008-08-03 rsc except that they cannot themselves contain subcategories.
163 18824b58 2008-08-03 rsc .SS "Album directories"
164 18824b58 2008-08-03 rsc Each album directory contains image directories
165 18824b58 2008-08-03 rsc named using the image's decimal SmugMug ID.
166 18824b58 2008-08-03 rsc Image directories cannot be created or renamed,
167 18824b58 2008-08-03 rsc but they can be removed. Removing an image directory
168 18824b58 2008-08-03 rsc removes the image from the album on SmugMug.
170 18824b58 2008-08-03 rsc Album directories also contain three special files,
172 18824b58 2008-08-03 rsc .BR settings ,
178 18824b58 2008-08-03 rsc file contains the album settings in textual form,
179 18824b58 2008-08-03 rsc one setting per line.
180 18824b58 2008-08-03 rsc Each line represents a single setting and is formatted
181 18824b58 2008-08-03 rsc as an alphabetic setting name followed by a single tab
182 18824b58 2008-08-03 rsc followed by the value.
183 18824b58 2008-08-03 rsc Many settings can be changed by writing new setting lines,
184 18824b58 2008-08-03 rsc in the same format, to the
188 18824b58 2008-08-03 rsc Copying a file into the album directory queues it for
189 18824b58 2008-08-03 rsc uploading to SmugMug to be added to the album.
190 18824b58 2008-08-03 rsc Files disappear from the album directory once they
191 18824b58 2008-08-03 rsc have finished uploading, replaced by new image directories.
194 18824b58 2008-08-03 rsc file in the root directory lists all pending uploads,
195 18824b58 2008-08-03 rsc which are stored temporarily
197 18824b58 2008-08-03 rsc .BR /var/tmp .
198 18824b58 2008-08-03 rsc .SS "Image directories"
199 18824b58 2008-08-03 rsc Each image directory contains an image file, named
200 18824b58 2008-08-03 rsc with its original name, if available.
201 18824b58 2008-08-03 rsc If the image belongs to another user, SmugMug does not
202 18824b58 2008-08-03 rsc expose the original name, so the file is named
203 18824b58 2008-08-03 rsc .RB \fInnnn\fP .jpg ,
206 18824b58 2008-08-03 rsc is the SmugMug image ID number.
207 18824b58 2008-08-03 rsc The file content is the original image
208 18824b58 2008-08-03 rsc or else the largest image available.
210 18824b58 2008-08-03 rsc The directory contains a
212 18824b58 2008-08-03 rsc file holding per-image settings, similar to the
213 18824b58 2008-08-03 rsc file in the album directory;
216 18824b58 2008-08-03 rsc file, containing URLs to the various sized images
217 18824b58 2008-08-03 rsc on the SmugMug server.
218 18824b58 2008-08-03 rsc .SH EXAMPLES
223 18824b58 2008-08-03 rsc .BR /n/smug ;
224 18824b58 2008-08-03 rsc the current user must have write access to
227 18824b58 2008-08-03 rsc .BR /dev/fuse .
232 18824b58 2008-08-03 rsc Watch API calls as they execute:
235 18824b58 2008-08-03 rsc % cat /n/smug/rpclog &
237 18824b58 2008-08-03 rsc Create a new album in the Vacation category
238 18824b58 2008-08-03 rsc and fill it with photos:
241 18824b58 2008-08-03 rsc % mkdir /n/smug/you/Vacation/Summer
242 18824b58 2008-08-03 rsc % cp *.jpg /n/smug/you/Vacation/Summer
245 18824b58 2008-08-03 rsc The photos are now uploading in the background.
246 18824b58 2008-08-03 rsc Wait for the uploads to finish:
249 18824b58 2008-08-03 rsc % while(test -s /n/smug/uploads) sleep 60
252 18824b58 2008-08-03 rsc Make the album publicly viewable and share it.
255 18824b58 2008-08-03 rsc % echo public 1 >/n/smug/you/Vacation/Summer/settings
256 18824b58 2008-08-03 rsc % cat /n/smug/you/Vacation/Summer/url | mail friends
259 18824b58 2008-08-03 rsc .B \*9/src/cmd/smugfs
260 18824b58 2008-08-03 rsc .SH SEE ALSO
262 18824b58 2008-08-03 rsc .HR http://smugmug.com/
265 18824b58 2008-08-03 rsc If multiple categories or albums have the same name,
266 18824b58 2008-08-03 rsc only one will be accessible via the file system interface.
267 b546bd6e 2017-07-16 rsc Renaming the accessible one via Unix's
269 18824b58 2008-08-03 rsc will resolve the problem.
271 18824b58 2008-08-03 rsc Boolean values appear as
275 18824b58 2008-08-03 rsc in settings files but must be changed using