Discussion:
mirror:exclude-regex
J1 Simón
2013-01-23 13:49:55 UTC
Permalink
I have defined the next setting in rc file:
set mirror:exclude-regex
\"^.+\.part$|^.+\.url$|^.+\.JPG$|^.+\.jpg$|^.+\.jpeg$|^.+\.JPEG$|^.+\.png$|^.+\.PNG$|^.+\.txt$|^.+\.TXT$|^.+\.nfo$|^.+\.NFO$\"
But when I download something lftp downloads jpg, txt, etc...
lftp 4.4.0 compiled on Ubuntu 12.10 64 bits
Justin Piszcz
2013-01-23 16:03:21 UTC
Permalink
set mirror:exclude-regex \"^.+\.part$|^.+\.url$|^.+\.**
JPG$|^.+\.jpg$|^.+\.jpeg$|^.+\**.JPEG$|^.+\.png$|^.+\.PNG$|^.+**
\.txt$|^.+\.TXT$|^.+\.nfo$|^.+**\.NFO$\"
But when I download something lftp downloads jpg, txt, etc...
lftp 4.4.0 compiled on Ubuntu 12.10 64 bits
Hi,

You need to escape the pipes in between regexes, e.g.:

set mirror:exclude-regex "regex1\|regex2"

Justin.
J1 Simón
2013-01-23 19:23:15 UTC
Permalink
_______________________________________________
lftp mailing list
***@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
Justin Piszcz
2013-01-23 19:31:38 UTC
Permalink
Post by J1 Simón
set mirror:exclude-regex
\"^.+\.part$|^.+\.url$|^.+\.__JPG$|^.+\.jpg$|^.+\.jpeg$|^.+\__.JPEG$|^.+\.png$|^.+\.PNG$|^.+__\.txt$|^.+\.TXT$|^.+\.nfo$|^.+__\.NFO$\"
But when I download something lftp downloads jpg, txt, etc...
lftp 4.4.0 compiled on Ubuntu 12.10 64 bits
Hi,
set mirror:exclude-regex "regex1\|regex2"
I don't think so.
set mirror:exclude-regex "^.+\.part$|^.+\.url$";
alias exclude-regex "set mirror:exclude-regex \"^.+\.part$|^.+\.url$\"";
alias bd "cd /torrent-descargas/BD; lcd /dunehd/Descargando;
exclude-regex;";
alias dvd "cd /torrent-descargas/DVD; lcd /dunehd/Descargando;
exclude-regex;";
alias mkv "cd /torrent-descargas/mkv; lcd /dunehd/Descargando;
exclude-regex;";
alias test "cd /torrent-descargas/test; lcd /dunehd/test; set
mirror:exclude-regex
\"^.+\.part$|^.+\.url$|^.+\.JPG$|^.+\.jpg$|^.+\.jpeg$|^.+\.JPEG$|^.+\.png$|^.+\.PNG$|^.+\.txt$|^.+\.TXT$|^.+\.nfo$|^.+\.NFO$\"";
I do a mirror of a test folder with sample files: prueba.JPG prueba.avi
prueba.jpg prueba.nfo prueba.part prueba.txt prueba.url
It works correctly. It downloads all but prueba.part and prueba.url
I do a mirror using the "test" alias and it works correctly too. It
downloads only prueba.avi
I think the problem is when I use several queue downloading several
folders with different alias. I have to do more tests.
Hi,

In that scenario you could try to use:

^.*\.jpg$

Or:

^.*\.[jJ][pP][gG]$ to match either case type at the end of any path and not
just current directory? I've always used them (similar to this) this and
have not had any issues.

Please let me know what you find.

Justin.
J1 Simón
2013-01-23 20:02:15 UTC
Permalink
Post by J1 Simón
Post by J1 Simón
set mirror:exclude-regex
\"^.+\.part$|^.+\.url$|^.+\.__JPG$|^.+\.jpg$|^.+\.jpeg$|^.+\__.JPEG$|^.+\.png$|^.+\.PNG$|^.+__\.txt$|^.+\.TXT$|^.+\.nfo$|^.+__\.NFO$\"
But when I download something lftp downloads jpg, txt, etc...
lftp 4.4.0 compiled on Ubuntu 12.10 64 bits
Hi,
set mirror:exclude-regex "regex1\|regex2"
I don't think so.
set mirror:exclude-regex "^.+\.part$|^.+\.url$";
alias exclude-regex "set mirror:exclude-regex
\"^.+\.part$|^.+\.url$\"";
alias bd "cd /torrent-descargas/BD; lcd /dunehd/Descargando;
exclude-regex;";
alias dvd "cd /torrent-descargas/DVD; lcd /dunehd/Descargando;
exclude-regex;";
alias mkv "cd /torrent-descargas/mkv; lcd /dunehd/Descargando;
exclude-regex;";
alias test "cd /torrent-descargas/test; lcd /dunehd/test; set
mirror:exclude-regex
\"^.+\.part$|^.+\.url$|^.+\.JPG$|^.+\.jpg$|^.+\.jpeg$|^.+\.JPEG$|^.+\.png$|^.+\.PNG$|^.+\.txt$|^.+\.TXT$|^.+\.nfo$|^.+\.NFO$\"";
I do a mirror of a test folder with sample files: prueba.JPG
prueba.avi prueba.jpg prueba.nfo prueba.part prueba.txt prueba.url
It works correctly. It downloads all but prueba.part and prueba.url
I do a mirror using the "test" alias and it works correctly too.
It downloads only prueba.avi
I think the problem is when I use several queue downloading
several folders with different alias. I have to do more tests.
Hi,
^.*\.jpg$
^.*\.[jJ][pP][gG]$ to match either case type at the end of any path
and not just current directory? I've always used them (similar to
this) this and have not had any issues.
I'll test it but the unique difference is the "*". I think is more
correct my regexp because the files always will be "name.ext". With
your regexp the name is optional.
The "[jJ][pP][gG]" to match either case type is more easy and clear
than my way.
Thanks.
Post by J1 Simón
Please let me know what you find.
Justin.
J1 Simón
2013-01-24 11:06:51 UTC
Permalink
_______________________________________________
lftp mailing list
***@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Loading...