Blame


1 18824b58 2008-08-03 rsc .TH SMUGFS 4
2 18824b58 2008-08-03 rsc .SH NAME
3 18824b58 2008-08-03 rsc smugfs \- file system access to SmugMug photo sharing
4 18824b58 2008-08-03 rsc .SH SYNOPSIS
5 18824b58 2008-08-03 rsc .B smugfs
6 18824b58 2008-08-03 rsc [
7 18824b58 2008-08-03 rsc .B -DFH
8 18824b58 2008-08-03 rsc ]
9 18824b58 2008-08-03 rsc [
10 18824b58 2008-08-03 rsc .B -k
11 18824b58 2008-08-03 rsc .I keypattern
12 18824b58 2008-08-03 rsc ]
13 18824b58 2008-08-03 rsc [
14 18824b58 2008-08-03 rsc .B -m
15 18824b58 2008-08-03 rsc .I mtpt
16 18824b58 2008-08-03 rsc ]
17 18824b58 2008-08-03 rsc [
18 18824b58 2008-08-03 rsc .B -s
19 18824b58 2008-08-03 rsc .I srvname
20 18824b58 2008-08-03 rsc ]
21 18824b58 2008-08-03 rsc .SH DESCRIPTION
22 18824b58 2008-08-03 rsc .I Smugfs
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 d32deab1 2020-08-16 rsc .MR factotum (4)
28 18824b58 2008-08-03 rsc using
29 18824b58 2008-08-03 rsc .B server=smugmug.com
30 18824b58 2008-08-03 rsc and
31 18824b58 2008-08-03 rsc .I keypattern
32 18824b58 2008-08-03 rsc (if any)
33 18824b58 2008-08-03 rsc as key criteria
34 18824b58 2008-08-03 rsc (see
35 d32deab1 2020-08-16 rsc .MR auth (3) ).
36 18824b58 2008-08-03 rsc Then
37 18824b58 2008-08-03 rsc .I smugfs
38 18824b58 2008-08-03 rsc serves a virtual directory tree mounted at
39 18824b58 2008-08-03 rsc .I mtpt
40 18824b58 2008-08-03 rsc (default
41 18824b58 2008-08-03 rsc .BR /n/smug )
42 18824b58 2008-08-03 rsc and posted at
43 18824b58 2008-08-03 rsc .I srvname ,
44 18824b58 2008-08-03 rsc if the
45 18824b58 2008-08-03 rsc .B -s
46 18824b58 2008-08-03 rsc option is given.
47 18824b58 2008-08-03 rsc .PP
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.
50 18824b58 2008-08-03 rsc For example,
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,
57 18824b58 2008-08-03 rsc and
58 18824b58 2008-08-03 rsc .B /n/smug/cmac/albums/Friends/2631/
59 18824b58 2008-08-03 rsc is an image directory.
60 18824b58 2008-08-03 rsc .PP
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.
63 18824b58 2008-08-03 rsc .ig
64 18824b58 2008-08-03 rsc Subcategories are inserted as
65 18824b58 2008-08-03 rsc an additional directory level between category
66 18824b58 2008-08-03 rsc and album.
67 18824b58 2008-08-03 rsc [Subcategories are not yet implemented.]
68 18824b58 2008-08-03 rsc ..
69 18824b58 2008-08-03 rsc .PP
70 18824b58 2008-08-03 rsc All directories contain a special control file named
71 18824b58 2008-08-03 rsc .BR ctl ;
72 18824b58 2008-08-03 rsc text commands written to
73 18824b58 2008-08-03 rsc .B ctl
74 18824b58 2008-08-03 rsc change
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
78 18824b58 2008-08-03 rsc interface.
79 18824b58 2008-08-03 rsc .PP
80 18824b58 2008-08-03 rsc .I Smugfs
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
83 18824b58 2008-08-03 rsc .I smugfs
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
87 18824b58 2008-08-03 rsc .B sync
88 18824b58 2008-08-03 rsc to a directory's
89 18824b58 2008-08-03 rsc .B ctl
90 18824b58 2008-08-03 rsc file causes
91 18824b58 2008-08-03 rsc .I smugfs
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
95 18824b58 2008-08-03 rsc .B sync
96 18824b58 2008-08-03 rsc to the root
97 18824b58 2008-08-03 rsc .B ctl
98 18824b58 2008-08-03 rsc file discards all of
99 18824b58 2008-08-03 rsc .I smugfs 's
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.
107 18824b58 2008-08-03 rsc .PP
108 18824b58 2008-08-03 rsc In addition to user directories, the root directory
109 18824b58 2008-08-03 rsc contains three special files:
110 18824b58 2008-08-03 rsc .BR ctl ,
111 18824b58 2008-08-03 rsc .BR rpclog ,
112 18824b58 2008-08-03 rsc and
113 18824b58 2008-08-03 rsc .BR uploads .
114 18824b58 2008-08-03 rsc Reading
115 18824b58 2008-08-03 rsc .B rpclog
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.
118 18824b58 2008-08-03 rsc The
119 18824b58 2008-08-03 rsc .B uploads
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.
127 18824b58 2008-08-03 rsc .PP
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.
133 18824b58 2008-08-03 rsc .PP
134 18824b58 2008-08-03 rsc User directories also contain a directory
135 18824b58 2008-08-03 rsc named
136 18824b58 2008-08-03 rsc .B albums
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.
141 18824b58 2008-08-03 rsc .PP
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.
147 18824b58 2008-08-03 rsc .ig
148 18824b58 2008-08-03 rsc .PP
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
155 18824b58 2008-08-03 rsc .I name
156 18824b58 2008-08-03 rsc to the category's
157 18824b58 2008-08-03 rsc .B ctl
158 18824b58 2008-08-03 rsc file.
159 18824b58 2008-08-03 rsc .PP
160 18824b58 2008-08-03 rsc Subcategories are identical to categories
161 18824b58 2008-08-03 rsc except that they cannot themselves contain subcategories.
162 18824b58 2008-08-03 rsc ..
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.
169 18824b58 2008-08-03 rsc .PP
170 18824b58 2008-08-03 rsc Album directories also contain three special files,
171 18824b58 2008-08-03 rsc .BR ctl ,
172 18824b58 2008-08-03 rsc .BR settings ,
173 18824b58 2008-08-03 rsc and
174 18824b58 2008-08-03 rsc .BR url .
175 18824b58 2008-08-03 rsc .PP
176 18824b58 2008-08-03 rsc The
177 18824b58 2008-08-03 rsc .B 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
185 18824b58 2008-08-03 rsc .B settings
186 18824b58 2008-08-03 rsc file.
187 18824b58 2008-08-03 rsc .PP
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.
192 18824b58 2008-08-03 rsc The
193 18824b58 2008-08-03 rsc .B uploads
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
196 18824b58 2008-08-03 rsc in
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 ,
204 18824b58 2008-08-03 rsc where
205 18824b58 2008-08-03 rsc .I nnnn
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.
209 18824b58 2008-08-03 rsc .PP
210 18824b58 2008-08-03 rsc The directory contains a
211 18824b58 2008-08-03 rsc .B settings
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;
214 18824b58 2008-08-03 rsc and a
215 18824b58 2008-08-03 rsc .B url
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
219 18824b58 2008-08-03 rsc .LP
220 18824b58 2008-08-03 rsc Mount
221 18824b58 2008-08-03 rsc .I smugfs
222 18824b58 2008-08-03 rsc on
223 18824b58 2008-08-03 rsc .BR /n/smug ;
224 18824b58 2008-08-03 rsc the current user must have write access to
225 18824b58 2008-08-03 rsc .B /n/smug
226 18824b58 2008-08-03 rsc and
227 18824b58 2008-08-03 rsc .BR /dev/fuse .
228 18824b58 2008-08-03 rsc .IP
229 18824b58 2008-08-03 rsc .EX
230 18824b58 2008-08-03 rsc % smugfs
231 18824b58 2008-08-03 rsc .EE
232 18824b58 2008-08-03 rsc Watch API calls as they execute:
233 18824b58 2008-08-03 rsc .IP
234 18824b58 2008-08-03 rsc .EX
235 18824b58 2008-08-03 rsc % cat /n/smug/rpclog &
236 18824b58 2008-08-03 rsc .EE
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:
239 18824b58 2008-08-03 rsc .IP
240 18824b58 2008-08-03 rsc .EX
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
243 18824b58 2008-08-03 rsc .EE
244 18824b58 2008-08-03 rsc .LP
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:
247 18824b58 2008-08-03 rsc .IP
248 18824b58 2008-08-03 rsc .EX
249 18824b58 2008-08-03 rsc % while(test -s /n/smug/uploads) sleep 60
250 18824b58 2008-08-03 rsc .EE
251 18824b58 2008-08-03 rsc .LP
252 18824b58 2008-08-03 rsc Make the album publicly viewable and share it.
253 18824b58 2008-08-03 rsc .IP
254 18824b58 2008-08-03 rsc .EX
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
257 18824b58 2008-08-03 rsc .EE
258 18824b58 2008-08-03 rsc .SH SOURCE
259 18824b58 2008-08-03 rsc .B \*9/src/cmd/smugfs
260 18824b58 2008-08-03 rsc .SH SEE ALSO
261 18824b58 2008-08-03 rsc SmugMug,
262 18824b58 2008-08-03 rsc .HR http://smugmug.com/
263 18824b58 2008-08-03 rsc .SH BUGS
264 18824b58 2008-08-03 rsc .PP
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
268 d32deab1 2020-08-16 rsc .MR mv (1)
269 18824b58 2008-08-03 rsc will resolve the problem.
270 18824b58 2008-08-03 rsc .PP
271 18824b58 2008-08-03 rsc Boolean values appear as
272 18824b58 2008-08-03 rsc .B true
273 18824b58 2008-08-03 rsc and
274 18824b58 2008-08-03 rsc .B false
275 18824b58 2008-08-03 rsc in settings files but must be changed using
276 18824b58 2008-08-03 rsc .B 1
277 18824b58 2008-08-03 rsc and
278 18824b58 2008-08-03 rsc .BR 0 .