varun2784 / weed-fs

Automatically exported from code.google.com/p/weed-fs
0 stars 0 forks source link

feature request - migration of directory structure to weed volumes #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It could be helpfull if "weed upload" function reads recursively directory 
structure and echo uploaded file meta info that could be used to insert data to 
database.

For each file echo: file path + actual metadata.

It will make more people/company will test weed-fs.

Original issue reported on code.google.com by Karol.Mu...@gmail.com on 13 Jul 2013 at 8:12

GoogleCodeExporter commented 8 years ago
At least in Linux you can do that easily,

find  /var/www/html/images/ -regextype posix-extended -regex '.*(gif|jpg|png)' 
-print0 | xargs -0 weed upload -server=127.0.0.1:9333

Original comment by claudiu....@gmail.com on 13 Jul 2013 at 8:36

GoogleCodeExporter commented 8 years ago
But it should be the same for all systems. On linux it's easy ;)

Original comment by Karol.Mu...@gmail.com on 13 Jul 2013 at 8:55

GoogleCodeExporter commented 8 years ago
Add support to upload a directory recursively.

But right now it doesn't support regular expressions. Someone can help on this?

Original comment by chris...@gmail.com on 13 Jul 2013 at 9:16

GoogleCodeExporter commented 8 years ago
I'm not familiar with GO but this could be useful:
http://golang.org/pkg/regexp/

and get filename regexp from cmd line parameters if added?

Original comment by Karol.Mu...@gmail.com on 13 Jul 2013 at 10:21

GoogleCodeExporter commented 8 years ago
Maybe this (where s will be file or filepath):
func (re *Regexp) MatchString(s string) bool

Original comment by Karol.Mu...@gmail.com on 13 Jul 2013 at 10:35

GoogleCodeExporter commented 8 years ago
This needs some coding labor. Regular expression is different. People want to 
use *.jpg, instead of .*\.jpg to match stuff.

Original comment by chris...@gmail.com on 13 Jul 2013 at 11:01

GoogleCodeExporter commented 8 years ago
Now it support an option, for example:
 -include=*.pdf 

Original comment by chris...@gmail.com on 14 Jul 2013 at 6:20