IPB

Welcome Guest ( Log In | Register )

4 Pages V  « < 2 3 4  
Reply to this topicStart new topic
> Web Source Framework Discussion
Victor Kostas
post Apr 3 2011, 13:01
Post #46


Member


Group: Full Members
Posts: 142
Joined: 2-March 08
From: Belgium
Member No.: 6578
Mp3tag Version: 2.65



I was wondering if a .src command block can be reused in other .src (similar to INCLUDE command in some programming languages).
This way a tag related command block could be saved in a file which can be included in several .src files.

This post has been edited by Victor Kostas: Apr 4 2011, 23:56
Go to the top of the page
 
+Quote Post
pone
post Apr 6 2011, 01:18
Post #47


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(Victor Kostas @ Apr 6 2011, 00:51) *
Wouldn't it be better if each tag related command block is saved in a separate file so it can be reusable in script (.src) source files? http://forums.mp3tag.de/index.php?showtopi...amp;#entry53987 A nice-to-have option.
Thus you change centrally a tag related source code.
And each script file could be easier managed.


I'm answering you here since I think your question at the discogs script topic is not releated specially to this script, right?

What you propose there is not possible with mp3tag. You can't combine .src files like you can combine actions to action groups. You would have to run every script for every tag for it's own, so you would run about 15 scripts for one album!


ZITAT(Victor Kostas @ Apr 3 2011, 14:01) *
I was wondering if a .src command block can be reused in other .src (similar to INCLUDE command in some programming languages).
This way a tag related command block could be saved in a file which can be included in several .src files.


But you can reuse command blocks in other scripts. Just copy them and insert them into your own script.
The only tricky thing is that the new script finds the right place in the web source where the comand block is belonging.
Go to the top of the page
 
+Quote Post
Victor Kostas
post Apr 6 2011, 20:57
Post #48


Member


Group: Full Members
Posts: 142
Joined: 2-March 08
From: Belgium
Member No.: 6578
Mp3tag Version: 2.65



QUOTE (pone @ Apr 6 2011, 02:18) *
I'm answering you here since I think your question at the discogs script topic is not releated specially to this script, right?

What you propose there is not possible with mp3tag. You can't combine .src files like you can combine actions to action groups. You would have to run every script for every tag for it's own, so you would run about 15 scripts for one album!

But you can reuse command blocks in other scripts. Just copy them and insert them into your own script.
The only tricky thing is that the new script finds the right place in the web source where the comand block is belonging.


I think you didn't get my point.
I never wrote to combine .src files.
What I mean is to not write the same group of commands in each .src file but put this in a separate file (obviously not .src).
e.g. following block commands "extracts" Album.
CODE
# Album
outputto "Album"
findline "class=\"profile"
findline "href=\"/artist"
regexpreplace "^.+</a>" "</a>"
findinline "</a>"
findinline " - "
sayuntil "</h1>"

Instead of inserting the very same code to each .src file you save the block to a file (e.g. album.sri). You include the file (include album.sri) on each .src file.
A change to album.sri file would affect all .src files using it.
This way you manage centrally your code. A simple change on how you extract a particular tag wouldn't require a change of all .src files.
So the question now is: Would it be feasible to add a new command INCLUDE <filename>.sri ?
I hope it it is clear now.

This post has been edited by Victor Kostas: Apr 6 2011, 21:00
Go to the top of the page
 
+Quote Post
pone
post Apr 6 2011, 22:17
Post #49


Member


Group: Full Members
Posts: 1688
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



ZITAT(Victor Kostas @ Apr 6 2011, 21:57) *
I think you didn't get my point.


Yeah, I get your point and that's a good idea.
I don't know if this could be realized. You can make a feature suggestion to florian.
Go to the top of the page
 
+Quote Post
martinlooker
post Oct 13 2011, 17:18
Post #50


Member


Group: Full Members
Posts: 9
Joined: 20-September 09
Member No.: 10958
Mp3tag Version: 2.44



Hello,

I have a request, would it be possible to add search by ASIN for the various Amazon web sources ?

I mainly use amazon.co.uk.

Thanks, Martin.
Go to the top of the page
 
+Quote Post
dano
post Oct 13 2011, 20:27
Post #51


Moderator


Group: Moderators
Posts: 5690
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.65a



Just enter the ASIN in the search field, it should find the album.


--------------------
Go to the top of the page
 
+Quote Post
martinlooker
post Oct 13 2011, 22:02
Post #52


Member


Group: Full Members
Posts: 9
Joined: 20-September 09
Member No.: 10958
Mp3tag Version: 2.44



QUOTE (dano @ Oct 13 2011, 20:27) *
Just enter the ASIN in the search field, it should find the album.

Ok will try that I was actually trying to match to an MP3 download on there and I've found the script that handles those (I have a different problem with not finding the Artist on there though the script seems to be looking in the right place and the US lokup is working - but I will post in the thread for that script)

Thanks, Martin
Go to the top of the page
 
+Quote Post

4 Pages V  « < 2 3 4
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th November 2014 - 22:30