comparison danboorufs.py @ 5:a422e75bf464 draft

Default to symlinks mode, since it’s better.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 22 Aug 2012 11:47:19 +0200
parents c40f0eed70cd
children 2c81cc41de2d
comparison
equal deleted inserted replaced
4:c40f0eed70cd 5:a422e75bf464
185 185
186 186
187 def main(args): 187 def main(args):
188 mountpoint = args.pop() 188 mountpoint = args.pop()
189 189
190 if args[1] == '-s' or args[1] == '--use-symlinks': 190 if args[1] == '-n' or args[1] == '--no-symlinks':
191 use_symlinks = False
192 filelist = args[1:]
193 else:
191 use_symlinks = True 194 use_symlinks = True
192 filelist = args[2:] 195 filelist = args[2:]
193 else:
194 use_symlinks = False
195 filelist = args[1:]
196 196
197 FUSE(Danbooru(filelist, os.path.dirname(mountpoint), use_symlinks), 197 FUSE(Danbooru(filelist, os.path.dirname(mountpoint), use_symlinks),
198 mountpoint, foreground=True) 198 mountpoint, foreground=True)
199 199
200 200
201 if __name__ == '__main__': 201 if __name__ == '__main__':
202 if len(argv) < 3: 202 if len(argv) < 3:
203 print('USAGE: %s' % argv[0], '[-s|--use-symlinks]', 203 print('USAGE: %s' % argv[0], '[-n|--no-symlinks]',
204 '<tag file> [<tag file>...]', '<mountpoint>') 204 '<tag file> [<tag file>...]', '<mountpoint>')
205 exit(1) 205 exit(1)
206 206
207 main(argv) 207 main(argv)