|
|
Welcome to the Invelos forums. Please read the forum
rules before posting.
Read access to our public forums is open to everyone. To post messages, a free
registration is required.
If you have an Invelos account, sign in to post.
|
|
|
|
Invelos Forums->DVD Profiler: Plugins |
Page:
1 2 3 4 ...8 Previous Next
|
New Plugin: DVDProfileLoop - send profile data to scripts (.bat, .exe) |
|
|
|
Author |
Message |
Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting d.a.one: Quote: 1. right 2. if ImageMagick(i think its open source btw) installed with the normal installer, you can call montage and convert from anywhere in the cmd (it is listed in the Path Variables) 3. I took the pictures randomly from the thumbnaildirectory and rename them to test montage So its just needed to get 8(or more, but then you have to change the -tile option in montage) last seen pictures out of DVDProfiler in the right order and the rest can be done by montage and convert.
thx Got it. I think I will have something soon. Montage seems like a cool program. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Oh yeah, it's ya birthday ...
cut and paste this into "montage.bat". Run DVDProfileLoop to select DVDs based on tags, flags or filters, point to this file and click "OK". Parameters are automatically detected. Rerun whenever you want to update the montage slide. Everything is saved in c:\montage folder, which you can change by making simple changes to the script. Enjoy!
Note there is one line that will go away when I fix a plugin bug that I found. Just take care if you update to the next release.
Cut Below=============== Montage.bat ============================= Rem Creates A montage file from a list of last seen image Rem In that case: Rem %1 = RunCode - (1 = start, 0 = run, 2 = finish) Rem %2 = ProfileNo Rem %3 = ThumbNailFront Path if %1==1 goto BEGIN if %1==0 goto RUN if %1==2 goto FINISH goto EXIT :BEGIN if not exist c:\montage md c:\montage goto EXIT :RUN copy %3 c:\montage\%2.jpg goto EXIT :FINISH SET _IX=0 SET _MAX=%2 REM NEXT LINE IS DUE TO A PLUGIN BUG SET /A _MAX-=1 :LOOP IF %_IX% LSS %_MAX% GOTO LOOPCONT GOTO LOOPDONE :LOOPCONT SET _IL_=%_IL_% "c:\montage\%_IX%.jpg" SET /A _IX+=1 GOTO LOOP :LOOPDONE montage -shadow -background none -geometry 100x100-11+4 -tile %_MAX% %_IL_% c:\montage\montage.png convert c:\montage\montage.png -background #0000ff -flatten c:\montage\montage.jpg :EXIT Cut Above===================================================== Edit: made a slight improvement | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: July 14, 2007 | Posts: 10 |
| Posted: | | | | Doesnt work here, he's copying the thumbs to c:\montage and thats all, it makes no montage.jpg I make a pause after convert and set the show .BAT window, but he didn't stop. And btw how can i say that he should only take 8 last ones in the filter? When i make it with flagged he mixed up the order to alphabetic, when i use the filter he take all i watched. thx |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting d.a.one: Quote: Doesnt work here, he's copying the thumbs to c:\montage and thats all, it makes no montage.jpg I make a pause after convert and set the show .BAT window, but he didn't stop. And btw how can i say that he should only take 8 last ones in the filter? When i make it with flagged he mixed up the order to alphabetic, when i use the filter he take all i watched.
thx Whoa, disaster! (By the way - did you cut/paste or retype? Make sure no typos. Also, make sure no character set / unicode issues - that can happen when you cut/paste from the internet.) Ok, one at a time: (1) I didn't put in explicit paths to montage.exe and convert.exe because you said they were already in your environment path. In fact that is also the case on my system. But perhaps they are not being found for some reason when you run it there. The .BAT file will not stop on the pause statement if there is an error. You could try to put in the full path names and use miontage.exe and convert.exe - see if anything changes, but right now we don't know what the error iis. (2) Only way to get a specific number is to select only that number - fllag exactly 8, or cause only 8 to be selected by tag or filter. The script just takes however many you send it. You could change the script to take only the first 8, but since it doesn't know how many are coming, it would be hard to take the last 8. I wouldn't recommend that approach. (3) If your filters are showing all the DVDs you watched, that's what the script will see. That's the point. You have to set filters or tags or flags to get only the DVD profiles you want the script to see, unless you change the script to ignore certain ones based on the data. As far as the sort order, let's handle that after the thing is working for you. The automatic parameter selection might also be affected by mistyping or character set. So check the preview and make sure that you have runcode, ProfileNo and ThumbNailFront Path checked. If not, you can set them manually. If you want to PM me your email address, I can send you my exact script. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: July 14, 2007 | Posts: 10 |
| Posted: | | | | Code Rem Creates A montage file from a list of last seen image Rem In that case: Rem %1 = RunCode - (1 = start, 0 = run, 2 = finish) Rem %2 = ProfileNo Rem %3 = ThumbNailFront Path if %1==1 goto BEGIN if %1==0 goto RUN if %1==2 goto FINISH goto EXIT :BEGIN if not exist c:\montage md c:\montage goto EXIT :RUN copy %3 c:\montage\%2.jpg goto EXIT :FINISH SET _IX=0 SET _MAX=%2 REM NEXT LINE IS DUE TO A PLUGIN BUG SET /A _MAX-=1 :LOOP IF %_IX% LSS %_MAX% GOTO LOOPCONT GOTO LOOPDONE :LOOPCONT SET _IL_=%_IL_% c:\montage\%_IX%.jpg SET /A _IX+=1 GOTO LOOP :LOOPDONE montage.exe -shadow -background none -geometry 100x100-11+4 -tile %_MAX% %_IL_% c:\montage\montage.png convert.exe c:\montage\montage.png -background #0000ff -flatten c:\montage\montage.jpg pause :EXIT /Code I've tested a bit and with .exe it works. Now i try to bring them in right order... thx for all the help untill now |
| Registered: July 14, 2007 | Posts: 10 |
| Posted: | | | | Now complete for those who want to do it the same way: I modified the original batch a bit so it only takes 8 pictures for the last seen banner. 1. Download and install ImageMagick 2. make a montage.bat with this included: Code======================= Rem Creates A montage file from a list of last seen image Rem In that case: Rem %1 = RunCode - (1 = start, 0 = run, 2 = finish) Rem %2 = ProfileNo Rem %3 = ThumbNailFront Path if %1==1 goto BEGIN if %1==0 goto RUN if %1==2 goto FINISH goto EXIT :BEGIN if not exist c:\montage md c:\montage goto EXIT :RUN copy %3 c:\montage\%2.jpg goto EXIT :FINISH SET _IX=0 SET _MAX=%2 REM NEXT LINE IS DUE TO A PLUGIN BUG SET /A _MAX-=1 :LOOP IF %_IX% LSS 8 GOTO LOOPCONT GOTO LOOPDONE :LOOPCONT SET _IL_=%_IL_% c:\montage\%_IX%.jpg SET /A _IX+=1 GOTO LOOP :LOOPDONE montage.exe -shadow -background none -geometry 100x100-11+4 -tile 8 %_IL_% c:\montage\montageh.png rem montage.exe -shadow -background none -geometry 100x100-11+4 -tile 1 %_IL_% c:\montage\montagev.png convert.exe c:\montage\montageh.png -background #ffffff -flatten c:\montage\montageh.jpg rem convert.exe c:\montage\montagev.png -background #ffffff -flatten c:\montage\montagev.jpg rem ftp.exe -n -i -s:"C:\Programme\DVD Profiler\Plugins\DVDProfileLoop\server.ftp" rem del /Q c:\montage\*.* exit :EXIT /Code=============== 3. If you want an automatic upload make a file called server.ftp in the plugin directory and unram the ftp line in the batch and modify it to your needs. Code server.ftp example=============== OPEN example.com USER username password cd directory/on/server send C:\montage\montageh.jpg disconnect quit /Code=============== 4. Start DVDProfiler and set a filter that you only can see the movies that you have seen at last and run mediadogg's plugin with the batch and have fun. edit: i almost forgott, thanks to mediadogg for his great work. | | | Last edited: by Solarstorm |
| Registered: March 14, 2007 | Posts: 94 |
| Posted: | | | | I'm trying to get this script to work, but am having some difficulties. The script stops after the thumbnail copy so I think the error has something to do with ImageMagick and the parameters. I think the parameter _IL_ (which I can't quite figure out what is) is to blame. Maybe there's some language/locale error.
If I run montage within c:\montage with these params: montage -shadow -background none -geometry 100x100-11+4 -tile 5 *.* c:\montage\montage.png
it works OK.
I hope you can help me out and thanks for putting so much effort into this. |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Rygaard: Quote: I'm trying to get this script to work, but am having some difficulties. The script stops after the thumbnail copy so I think the error has something to do with ImageMagick and the parameters. I think the parameter _IL_ (which I can't quite figure out what is) is to blame. Maybe there's some language/locale error.
If I run montage within c:\montage with these params: montage -shadow -background none -geometry 100x100-11+4 -tile 5 *.* c:\montage\montage.png
it works OK.
I hope you can help me out and thanks for putting so much effort into this. The _IL_ is a .BAT file parameter. You can make it anything if the character set is a problem. .BAT file programming is kind of wierd, but the advantage of it is that it is free, and virtually a standard acrosss all windows platforms. For example, you could make it "IL" instead of "_IL_". To set it, use SET IL=... and to use it, you have to put the % sign before and after, such as %IL%. If that doesn't work for you, why not post the whole .BAT file you are using exactly, and maybe we can get some help from d.a. one in figuring out the problem. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 13, 2007 | Posts: 350 |
| Posted: | | | | Or, if what you are saying is that you don't understand the purpose of _IL ...
The environment variable _IL is being set to a space-separated list of files that will be submitted to the montage program.
(that's what I thought he was wondering about, at least ...) | | | -fred |
| Registered: March 14, 2007 | Posts: 94 |
| Posted: | | | | @ mediadogg and FredLooks thank you both for taking a stab at this. I was actually asking a little bit of both so in all you answered my question. Didn't fully solve my case though... I'm using the original montage script by mediadogg - but i had altered it a bit and at least misplaced an underscore - now corrected... The funny thing is that if I run the script just after starting DVD Pro it now works great If I then introduce an error in the "montage -shadow..." part and runs it, it obviously doesn't work and just copies the thumbnails. Correcting the error and running the script will still keep creating only the thumbnails so the error I experienced initially might be due to some memory leak or something...For the record I empty the montage folder after each run. If I restart DVD Pro and run the script everything is working again... At least now I can get my montage created - great work |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Why didn't I think if this before:
If you are always creating a fixed montage of (say) 8 images, from images named 1.jpg, etc., then you can take out the whole loop, and just hardcode the final call to montage: Rem %1 = RunCode - (1 = start, 0 = run, 2 = finish) Rem %2 = ProfileNo Rem %3 = ThumbNailFront Path if %1==1 goto BEGIN if %1==0 goto RUN if %1==2 goto FINISH goto EXIT :BEGIN if not exist c:\montage md c:\montage goto EXIT :RUN copy %3 c:\montage\%2.jpg goto EXIT :FINISH SET IL=c:\montage\0.jpg c:\montage\1.jpg c:\montage\2.jpg c:\montage\3.jpg C:\montage\4.jpg c:\montage\5.jpg c:\montage\6.jpg c:\montage\7.jpg montage.exe -shadow -background none -geometry 100x100-11+4 -tile 8 %IL% c:\montage\montageh.png rem montage.exe -shadow -background none -geometry 100x100-11+4 -tile 1 %IL% c:\montage\montagev.png convert.exe c:\montage\montageh.png -background #ffffff -flatten c:\montage\montageh.jpg rem convert.exe c:\montage\montagev.png -background #ffffff -flatten c:\montage\montagev.jpg rem ftp.exe -n -i -s:"C:\Programme\DVD Profiler\Plugins\DVDProfileLoop\server.ftp" rem del /Q c:\montage\*.* exit :EXIT
It will run a few milliseconds faster and may be less prone to coding errors. I didn't test this, but I think you get the idea. My original script was trying to account for a variable unknown number of images being sent. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. | | | Last edited: by mediadogg |
| Registered: March 14, 2007 | Posts: 94 |
| Posted: | | | | Just a note... The script numbers the images from 0 to n so the "hardcoded" imagenames should probably start from 0. |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Rygaard: Quote: Just a note... The script numbers the images from 0 to n so the "hardcoded" imagenames should probably start from 0. Thanks - fixed it. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
| Registered: March 13, 2007 | Posts: 7 |
| Posted: | | | | Hello,
Just tried DVDeMail Seems to work fine, but(there is always a but) the generated mail is really... beautifull.
It should be nice to have an html mail, permitting the user to add, for instance, the front cover of the DVD.
Not really important, and the work already done is very impressive. just an idea for improvment :-)
Regards |
| Registered: March 18, 2007 | Reputation: | Posts: 6,463 |
| Posted: | | | | Quoting Michrone: Quote: Hello,
Just tried DVDeMail Seems to work fine, but(there is always a but) the generated mail is really... beautifull.
It should be nice to have an html mail, permitting the user to add, for instance, the front cover of the DVD.
Not really important, and the work already done is very impressive. just an idea for improvment :-)
Regards Thank you. It would be very easy to do that. Do me a favor, and make your post over in the DVDeMail thread. So when I start working on the next release, I only have one place to look for the improvement requests. | | | Thanks for your support. Free Plugins available here. Advanced plugins available here. Hey, new product!!! BDPFrog. |
| Registered: March 14, 2007 | Posts: 159 |
| Posted: | | | | Hi everyone
I almost done with my scripts for generated HTML list of DVD with several information (Loaned To for example)
It's based on a sample give with this plugin
The only thing is that you have to copy the thumbnails manually
--------------------------------------------------------------- rem @echo off Rem Creates simple HTML files that should be compatible with most smartphones Rem Uses folder {dvdpro}\plugins\dvdprofileloop\smartphone
Rem You must check Rem runcode, profileID, title, rating, Rem ProductionYear, CountryOfOrigin, RunningTime, AudioTracks, Subtitles, LoanedTo
Rem In that case: Rem %1 = runcode (1 = start, 0 = run, 2 = finish) Rem %2 = Profile ID Rem %3 = title Rem %4 = Rating Rem %5 = ProductionYear Rem %6 = CountryOfOrigin Rem %7 = RunningTime Rem %8 = AudioTracks Rem %9 = Subtitles Rem %10 = LoanedTo
set runcode=%1 set id=%2 set title=%3 set rate=%4 set prodYear=%5 set country=%6 set duration=%7 set audio=%8 set subtitles=%9
if %runcode% ==1 goto BEGIN if %runcode% ==0 goto RUN if %runcode% ==2 goto FINISH goto OUT
:BEGIN if not exist smartphone md smartphone if not exist "smartphone\thumbnails" md "smartphone\thumbnails" echo ^<html^> 1>".\smartphone\index.html" echo ^<head^> 1>>".\smartphone\index.html" echo ^<title^>DVDProfiler Collection^</title^> 1>>".\smartphone\index.html"
echo ^<script language="JavaScript"^> 1>>".\smartphone\index.html" echo ^<!-- Original by http://javascript.internet.com More javascripts http://www.hypergurl.com --^> 1>>".\smartphone\index.html" echo var NS4 = (document.layers); // Which browser? 1>>".\smartphone\index.html" echo var IE4 = (document.all); 1>>".\smartphone\index.html" echo var win = window; // window to search. 1>>".\smartphone\index.html" echo var n = 0; 1>>".\smartphone\index.html" echo function findInPage(str) { 1>>".\smartphone\index.html" echo var txt, i, found; 1>>".\smartphone\index.html" echo if (str == "") return false; // Find next occurance of the given string on the page, wrap around to the 1>>".\smartphone\index.html" echo // start of the page if necessary. 1>>".\smartphone\index.html" echo if (NS4) { 1>>".\smartphone\index.html" echo // Look for match starting at the current point. If not found, rewind 1>>".\smartphone\index.html" echo // back to the first match. 1>>".\smartphone\index.html" echo if (!win.find(str)) while(win.find(str, false, true)) 1>>".\smartphone\index.html" echo n++; else n++; // If not found in either direction, give message. 1>>".\smartphone\index.html" echo if (n == 0) alert("Not found."); 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo if (IE4) { 1>>".\smartphone\index.html" echo txt = win.document.body.createTextRange(); 1>>".\smartphone\index.html" echo // Find the nth match from the top of the page. 1>>".\smartphone\index.html" echo for (i = 0; i ^<= n ^&^& (found = txt.findText(str)) != false; i++) { 1>>".\smartphone\index.html" echo txt.moveStart("character", 1); 1>>".\smartphone\index.html" echo txt.moveEnd("textedit"); 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo // If found, mark it and scroll it into view. 1>>".\smartphone\index.html" echo if (found) { 1>>".\smartphone\index.html" echo txt.moveStart("character", -1); 1>>".\smartphone\index.html" echo txt.findText(str); 1>>".\smartphone\index.html" echo txt.select(); 1>>".\smartphone\index.html" echo txt.scrollIntoView(); 1>>".\smartphone\index.html" echo n++; 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo // Otherwise, start over at the top of the page and find first match. 1>>".\smartphone\index.html" echo else { 1>>".\smartphone\index.html" echo if (n ^> 0) { 1>>".\smartphone\index.html" echo n = 0; 1>>".\smartphone\index.html" echo findInPage(str); 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo // Not found anywhere, give message. else alert("Not found."); 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo return false; 1>>".\smartphone\index.html" echo } 1>>".\smartphone\index.html" echo ^</script^> 1>>".\smartphone\index.html"
echo ^</head^> 1>>".\smartphone\index.html" echo ^<body^> 1>>".\smartphone\index.html"
Rem First Do Owned echo ^<h4^>DVD Profiler Collection^</h4^> 1>>".\smartphone\index.html" echo ^<HR^> 1>>".\smartphone\index.html"
echo ^<form name="search" onSubmit="return findInPage(this.string.value);"^> 1>>".\smartphone\index.html" echo ^<div align="center"^> ^<p^>^<font size=3^> ^<input name="string" type="text" size=15 onChange="n = 0;"^> ^</font^> 1>>".\smartphone\index.html" echo ^<input type="submit" value="Search Page"^> ^</p^> ^</div^> 1>>".\smartphone\index.html" echo ^</form^> 1>>".\smartphone\index.html" echo ^<HR^> 1>>".\smartphone\index.html"
echo ^<table border="1" width="700"^> 1>>".\smartphone\index.html"
goto OUT
:RUN
set temp=
:BEGINSHIFT shift
set tempPrev=%temp% set temp=%9
if [%temp%]==[] goto ENDSHIFT set subtitles=%subtitles% %tempPrev%
goto BEGINSHIFT
:ENDSHIFT set loaned=%tempPrev%
echo ^<tr^>^<td^>^<img src=".\thumbnails\%id%f.jpg" width="70" height="105" align="top"^>^</td^> 1>>".\smartphone\index.html"
echo ^<td^>^<table border="1" width="700"^> 1>>".\smartphone\index.html" echo ^<tr^>^<td^>^<b^>%title%^</b^> (%id%) ^</td^>^</tr^> 1>>".\smartphone\index.html" echo ^<tr^>^<td^>^<table border="1" width="700"^> 1>>".\smartphone\index.html" echo ^<tr^>^<td width="140"^>%prodYear%^</td^>^<td width="140"^>%country%^</td^>^<td width="140"^>%duration% min^</td^>^<td width="140"^>Rated : %rate%^</td^>^<td ^>Pret: %loaned%^</td^>^</tr^> 1>>".\smartphone\index.html" echo ^</table^>^</td^>^</tr^> 1>>".\smartphone\index.html" echo ^<tr^>^<td^>^<table^> 1>>".\smartphone\index.html" echo ^<tr^>^<td^>Langue :^</td^>^<td^>%audio%^</td^>^</tr^> 1>>".\smartphone\index.html" echo ^<tr^>^<td^>Sous-titres:^</td^>^<td^>%subtitles%^</td^>^</tr^> 1>>".\smartphone\index.html"
echo ^</table^>^</td^>^</tr^> 1>>".\smartphone\index.html" echo ^</table^>^</td^> 1>>".\smartphone\index.html"
echo ^</tr^> 1>>".\smartphone\index.html" goto OUT
:FINISH echo ^</table^> 1>>".\smartphone\index.html" echo ^</body^> 1>>".\smartphone\index.html" echo ^</html^> 1>>".\smartphone\index.html"
:OUT
| | | Last edited: by Dedcap |
|
|
Invelos Forums->DVD Profiler: Plugins |
Page:
1 2 3 4 ...8 Previous Next
|
|
|
|
|
|
|
|
|