I tried different things that didn`t work.
TIA
Best regards,
Oleg Chernavin
MP Staff
Thank you, but this is what I already tried to do. But I didn`t have much luck with my results. Assuming
http://www.server.com/directory1/directory2/directory3/file.htm
would be the start URL.
What part represents {:server}; {:dir}; {:filename} ?
OK, {:filename} should be: file.htm
{:server} = www.server.com or http://www.server.com/ or http://www.server.com or...?
{:dir} = http://www.server.com/directory1/directory2/directory3/
or
http://www.server.com/directory1/directory2/directory3
or
/directory3/
or
directory3
or
.
.
?
I`m really confused.
Well, I will tell you what I tried in order to download the following file:
http://tigger.smu.edu.sg/software/gimp/gimp-2.0.0-i586-setup.zip
URL: http://tigger.smu.edu.sg/software/gimp/
Text and Archive File Filters checked.
Included files keywords in Filename URL Filters:
http://tigger.smu.edu.sg/{:dir}/gimp/gimp-2.0.0-i586-setup.zip
http://tigger.smu.edu.sg/{:dir}/gimp-2.0.0-i586-setup.zip
{:dir}/gimp/gimp-2.0.0-i586-setup.zip
{:dir}/gimp-2.0.0-i586-setup.zip
http://tigger.smu.edu.sg{:dir}/gimp/gimp-2.0.0-i586-setup.zip
http://tigger.smu.edu.sg{:dir}/gimp-2.0.0-i586-setup.zip
http://tigger.smu.edu.sg{:dir}gimp/gimp-2.0.0-i586-setup.zip
http://tigger.smu.edu.sg{:dir}gimp-2.0.0-i586-setup.zip
{:dir}gimp/gimp-2.0.0-i586-setup.zip
{:dir}gimp-2.0.0-i586-setup.zip
http://{:server}/software/gimp-2.0.0-i586-setup.zip
http://{:server}software/gimp-2.0.0-i586-setup.zip
{:server}/software/gimp-2.0.0-i586-setup.zip
{:server}software/gimp-2.0.0-i586-setup.zip
_______
I have checked all above keywords: The project doesn`t download "gimp-2.0.0-i586-setup.zip".
The download works ok when I check the keyword:
http://tigger.smu.edu.sg/software/gimp/gimp-2.0.0-i586-setup.zip
What have I made wrong?
And can you please tell me a "real-life" example for what the Macro {:filename} could be good for?
(URL and File Filter)
Maybe I haven`t understood something essentially,...
But I have another suggestion for URL Macros:
URL: http://www.server.com/directory1/directory2/directory3/file.htm
{:dir1} = directory1
{:dir2} = directory2
{:dir3} = directory3
.
.
{:dir10}
{:dir1} should represent only the directory name (without slashes).
I think that 10 directory levels should be enough.
Could that be done?
Thanks for your answer.
I forgot to insert /gimp/ in the {:server} keywords:
Now this is ok (as I supposed):
http://{:server}/software/gimp/gimp-2.0.0-i586-setup.zip
That is what I was awaiting:
http://tigger.smu.edu.sg/software/gimp/gimp-2.0.0-i586-setup.zip
I assumed, that this should represent the keywords:
tigger.smu.edu.sg = {:server}
/software/gimp/ = {:dir}
gimp-2.0.0-i586-setup.zip = {:filename}
I checked all the included keywords at once: nothing was downloaded.
Now I checked one after the other. That had a different effect: the download starts when some keywords were checked, but why? They are all in the included list. What`s the reason for this behavior?
But I can`t find out, how the {:dir} macro works:
By checking these keywords (one after the other), all zip files in the directory were downloaded (and not only gimp-2.0.0-i586-setup.zip):
http://{:server}{:dir}gimp-2.0.0-i586-setup.zip
http://tigger.smu.edu.sg{:dir}gimp-2.0.0-i586-setup.zip
By checking this keyword, the project did not download anything:
http://tigger.smu.edu.sg/{:dir}/gimp-2.0.0-i586-setup.zip
Thanks for reading.
Here is the fixed version:
http://www.metaproducts.com/download/betas/oep1800.zip
Oleg.
Thank you that fixing bugs has such a high priority!
> You are correct when you described what these keywords mean.
OK, this works just like I had imagined; I already had my doubts...
And I figured out how {:filename} could be used for:
Assuming the starting URL would be:
http://www.server.com/directory1/directory2/
... you could add an additional URL:
http://www.server.com/directory1/directory2/variable
(The server could respond: File not found, but that doesn`t matter.)
Although I would prefer that it would be possible do declare variables separately (Variables=var1=xxx; var2=yyy;var3=zzz -> and use {:var1} ; {:var2}; {:var3} in the Project. What do you think about it?) you have a variable {:filename} that you could use at any place.
> Here is the fixed version:
>
> http://www.metaproducts.com/download/betas/oep1800.zip
Thank you! Works fine. :-)
p.s.: What do you think about my first suggestion? I don`t have an urgent need for this, but maybe it`s worth to think about it?
| But I have another suggestion for URL Macros:
|
| URL: http://www.server.com/directory1/directory2/directory3/file.htm
|
| {:dir1} = directory1
| {:dir2} = directory2
| {:dir3} = directory3
| .
| .
| {:dir10}
|
| {:dir1} should represent only the directory name (without slashes).
I think that 10 directory levels should be enough.
(Perhaps {:DirName1}; ... would be clearer (directory names without slashes))
Thank you!
Pleased too early...
I think that there is still a bug when you use the {:filename} URL Macro:
To be safe, I deleted the zip extension from the Archive File Filter and checked Other File Filter instead. I have put {:filename} in the included files keywords list.
I tested this URL with Level 1:
http://tigger.smu.edu.sg/software/gimp/
The directory contains 2 zip files:
http://tigger.smu.edu.sg/software/gimp/gtk+-2.2.4-20040124-setup.zip
http://tigger.smu.edu.sg/software/gimp/gimp-2.0.0-i586-setup.zip
The results:
URL:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*.zip
(OK, loads all zip files)
URL:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*mm*.*
(OK, doesn`t load any files without "mm")
URL:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*m*.*
(OK, downloads only the desired file)
And her is the buggy setting:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/g*.*
(It doesn`t download the desired files!)
Another buggy setting:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/g*m*.zip
It seems like a simple letter at the start causes this bug... ?
http://tigger.smu.edu.sg/software/gimp/*.zip
This URL is invalid and cannot be loaded. It will not affect URL Filters keywords either. In fact, only the first URL is being used to extract {:dir}, {:filename} and {:server} keywords.
Oleg.
Sorry, but I think that I`m not wrong. How do you think, that I could get my results? Make the test by yourself. It`s a really easy setting, as I already described above (don`t forget to put {:filename} in the included file filters keywords).
> - it doesn`t make sense to place such URLs:
> http://tigger.smu.edu.sg/software/gimp/*.zip
In general: Yes. I know that the {:filename} macro wasn`t designed to use it for such settings.
But I saw it as a "trick" to get a user defined variable (I already described it in my other message). And that`s why I was asking for this implementation:
| Although I would prefer that it would be possible do declare variables separately
| (Variables=var1=xxx; var2=yyy;var3=zzz -> and use {:var1} ; {:var2}; {:var3} in the Project.
| What do you think about it?) you have a variable {:filename} that you could use at any place.
I don`t know why you haven`t said anything about my two suggestions that I mentioned in my above messages? Sorry, I don`t want to push..; I only would like to know what you think about them; not more.
> This URL is invalid and cannot be loaded.
Right, as I said before:
| |... you could add an additional URL:
| http://www.server.com/directory1/directory2/variable
| (The server could respond: File not found, but that doesn`t matter.)
> It will not affect URL Filters keywords either. In fact, only the first URL is being used
> to extract {:dir}, {:filename} and {:server} keywords.
If that`s the way it should be, then there is a bug in OEP; beside the bug that I already described.
I have tested once more some settings:
The same as above:
To be safe, I deleted the zip extension from the Archive File Filter and checked Other File Filter instead. I have put {:filename} in the included files keywords list.
I tested this URL with Level 1:
http://tigger.smu.edu.sg/software/gimp/
The directory contains 2 zip files:
http://tigger.smu.edu.sg/software/gimp/gtk+-2.2.4-20040124-setup.zip
http://tigger.smu.edu.sg/software/gimp/gimp-2.0.0-i586-setup.zip
URLs: (Put all of them in the URLs field):
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*i*.zip
http://tigger.smu.edu.sg/software/gimp/*mm*.zip
Result:
-> gimp-2.0.0-i586-setup.zip is downloaded
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*mm*.zip
http://tigger.smu.edu.sg/software/gimp/*i*.zip
-> gimp-2.0.0-i586-setup.zip
Compare the two results: Strange, that shouldn`t be -> bug
The same with "*k*.zip":
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*k*.zip
http://tigger.smu.edu.sg/software/gimp/*mm*.zip
-> gtk+-2.2.4-20040124-setup.zip
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*mm*.zip
http://tigger.smu.edu.sg/software/gimp/*k*.zip
-> gtk+-2.2.4-20040124-setup.zip
Another setting:
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*i*.zip
http://tigger.smu.edu.sg/software/gimp/*k*.zip
-> gimp-2.0.0-i586-setup.zip
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*k*.zip
http://tigger.smu.edu.sg/software/gimp/*i*.zip
-> gimp-2.0.0-i586-setup.zip
???
This is surely a bug!
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*k*.zip
http://tigger.smu.edu.sg/software/gimp/*k*.zip
-> gtk+-2.2.4-20040124-setup.zip
URLs:
http://tigger.smu.edu.sg/software/gimp/*mm*.zip
http://tigger.smu.edu.sg/software/gimp/*i*.zip
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*k*.zip
-> gimp-2.0.0-i586-setup.zip
??? -> bug!
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/g*.zip
No zip file is downloaded -> bug
URLs:
http://
http://tigger.smu.edu.sg/software/gimp/g*.zip
http://tigger.smu.edu.sg/software/gimp/
Oleg.
> For a quick workaround, exchange the URLs, like:
>
> http://tigger.smu.edu.sg/software/gimp/g*.zip
> http://tigger.smu.edu.sg/software/gimp/
This works ok for you?
As I already mentioned twice, this is a "special" bug:
| And her is the buggy setting:
| http://tigger.smu.edu.sg/software/gimp/
| http://tigger.smu.edu.sg/software/gimp/g*.*
| (It doesn`t download the desired files!)
|
| Another buggy setting:
| http://tigger.smu.edu.sg/software/gimp/
| http://tigger.smu.edu.sg/software/gimp/g*m*.zip and:
|
| ***It seems like a simple letter at the start causes this bug... ?***
and
| URLs:
| http://tigger.smu.edu.sg/software/gimp/
| http://tigger.smu.edu.sg/software/gimp/g*.zip
| No zip file is downloaded -> bug
|
| URLs:
| http://tigger.smu.edu.sg/software/gimp/g*.zip
| http://tigger.smu.edu.sg/software/gimp/
| No zip file is downloaded -> bug
> For a quick workaround, exchange the URLs, like:
In this case the order doesn`t matter!
Settings that work ok:
http://tigger.smu.edu.sg/software/gimp/*m*.*
http://tigger.smu.edu.sg/software/gimp/
and
| http://tigger.smu.edu.sg/software/gimp/
| http://tigger.smu.edu.sg/software/gimp/*m*.*
So this isn`t really a workaround for the mentioned bugs...
Thank you!
URL:
http://www.mozilla.org/images/product-front-thunderbird.png
URL Substitute:
URL
product-front-thunderbird.png
Replace
product-front-thunderbird.png
With
{:filename}
The result:
product-front-thunderbird.png -> default.htm
or
URL
product-front-thunderbird.png
Replace
product-front-thunderbird.png
With
{:filename}abc
The result:
product-front-thunderbird.png -> abcabc
Regarding URL Filters - I just finally did this. It worked well on my computer. Please try the following update:
http://www.metaproducts.com/download/betas/oep1803.zip
Oleg.
OK, thanks for the information. I only used the {:filename} macro in URL Substitutes for another test (to see what it represents).
> Regarding URL Filters - I just finally did this. It worked well on my computer.
Yes, the mentioned bugs are fixed! :-)
It seems like the {:filename} macro represents now *all* filenames in every URL line (at least when it is used in URL Filters:)
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*aaa*.zip
http://tigger.smu.edu.sg/software/gimp/*bbb*.zip
http://tigger.smu.edu.sg/software/gimp/*k*.zip
http://tigger.smu.edu.sg/software/gimp/*ccc*.zip
Result:
It finds the only matching keyword *k*.*:
-> gtk+-2.2.4-20040124-setup.zip is downloaded
URLs:
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*aaa*.zip
http://tigger.smu.edu.sg/software/gimp/*bbb*.zip
http://tigger.smu.edu.sg/software/gimp/*k*.zip
http://tigger.smu.edu.sg/software/gimp/*ccc*.zip
http://tigger.smu.edu.sg/software/gimp/*ddd*.zip
http://tigger.smu.edu.sg/software/gimp/*i*.zip
http://tigger.smu.edu.sg/software/gimp/*eee*.zip
Result:
It finds both matching keywords: *k*.* and *i*.*:
-> gtk+-2.2.4-20040124-setup.zip and gimp-2.0.0-i586-setup.zip are downloaded
URLs:
http://tigger.smu.edu.sg/software/gimp/*aaa*.zip
http://tigger.smu.edu.sg/software/gimp/*bbb*.zip
http://tigger.smu.edu.sg/software/gimp/*i*.zip
http://tigger.smu.edu.sg/software/gimp/*ccc*.zip
http://tigger.smu.edu.sg/software/gimp/
http://tigger.smu.edu.sg/software/gimp/*ddd*.zip
http://tigger.smu.edu.sg/software/gimp/*eee*.zip
http://tigger.smu.edu.sg/software/gimp/*fff*.zip
Result:
It finds the only matching keyword *i*.*:
-> gimp-2.0.0-i586-setup.zip is downloaded
This is a consistent logic; fine. Good work!
Thank you!
Oleg.
Thanks for the confirmation. -> You changed the logic:
| In fact, only the first URL is being used to extract {:dir}, {:filename} and {:server} keywords.
But which filename does it represent when it is used in other places (where only the use of 1 separate filename does make sense)?
I suppose that it represents the filename of the first URL? Right?
Oleg.
OK, this is consistent. The {:filename} macro represents always all filenames from all starting URLs (and this isn`t useful for URL Substitutes).
> Prehaps, it will be simply replaced with an empty symbol.
OK, this should avoid getting strange results.
In sum: my "trick" to get a user defined variable won`t work at all places.
-> The more I wish that I could use separate user defined variables (which could be also used in URL Substitutes) like I described before:
| Although I would prefer that it would be possible do declare variables separately
| (Variables=var1=xxx; var2=yyy;var3=zzz -> and use {:var1} ; {:var2}; {:var3} in the Project.
| What do you think about it?) you have a variable {:filename} that you could use at any place.
Thank you!
Oleg.
I don`t think that this has really a lot of a programming language. In fact, this is supposed to be only an assistance in order to avoid too much typing work. The operation purpose of such a variable can be versatile. I want to name only a few things, for what one could use these variables (mostly in templates):
- I would see this first of all as central administration of certain keywords which would be needed repeatedly at other places.
- For example, one could set a very certain Session-ID - or parts from that - (a Session-ID, that would be normally changed during the download -process), that one could place in URL Filters or in URL Substitutes.
- Also in URL Substitutes I would see an operation purpose in order to rename certain files or directories according to your own wishes. If these (changing) names occure now in several replacements, you could avoid a lot of typing work.
- The variables could represent for example also parts of a post-command that you want to use for the renaming of a file or a directory (or to use it in URL Filters).
- You could use variables in URL Substitutes to save certain notes by renaming filenames or directories.
... and so on
In total I see diverse operation purposes. I`m sure that there are also still reasonable areas of which I did currently not think of. I regard user-defined variables as a generally useful tool which could be used widely.
Perhaps my examples aren`t very good, but I`m sure that you could also find some areas in which variables are really useful. And maybe it`s worth to think of an implementation in the future...
Thank you!
Oleg.
Oleg.
That`s ok. I fully understand that this feature hasn`t got a high priority.
> However if you will need this urgently, please let me know.
Thank you! But, no: it isn`t urgent! And I`m fully satisfied with the recording in your plans.
Thanks again!
Oleg.
> Prehaps, it will be simply replaced with an empty symbol.
Maybe this should be fixed in the next Release. I started a project - rather by chance - that still contained the {:filename} macro in URL Substitutes. This ended up with an "Access violation". Perhaps some people don`t recognize that the macros {:filename}, {:dir} and {:server} are responsible for these error-messages?
Can you tell me, if the error occured immediately when you started the download or after some files were loaded?
Oleg.
Thank you, but I don`t think that it is sooo urgent. I also rather meant an adjustment in the next official final version (not beta).
If I`m not wrong, there isn`t yet an entry in the Help file regarding these macros. Therefore only a few people will attempt to use these macros (at unfitting places). Maybe you should add an entry that describes these macros (and where they can (not) be used) in the Help file of the next final version.
> Can you tell me, if the error occured immediately when you started the download
> or after some files were loaded?
Immediately!
Thank you!
Oleg.