Page 1 of 2

Import multiple files bookmarklet for NP 3.73+ (IE 6)

Posted: Wed Jan 28, 2004 6:51 pm
by slotboxed
Newest version online today for IE 6 and probably 5.5 as well. I tested it with IE 6 on XP Pro SP1. Much better look and feel and more features in the selection process than any previous version. I also wrote a tutorial explaining setup and usage for this version.

http://www.mgrier.com/newspro/

Mike

Posted: Fri Jan 30, 2004 10:51 pm
by slotboxed
Well, so much for my bookmarklet. alt.binaries.nl dropped msg-id's in the output and went to nzb's. That's the problem with relying on someone else's design. But I've thought some more about doing this on my server, but I don't think I'd do it with nzb's.

The thing is, I have a real bugaboo about redundant information being transmitted. It's wasted bandwidth (and for a person running a server, wasted money). Here is an nzb file as produced by a.b.nl:

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE nzb PUBLIC "-//newzBin//DTD NZB 1.0//EN" "http://www.newzbin.com/DTD/nzb/nzb-1.0.dtd">
<nzb xmlns="http://www.newzbin.com/DTD/2003/nzb">
<file poster="EagleForce_NL" date="1075473850" subject="Linux_A_Z.part03.rar EagleForce_NL Linux_A_Z (ftd: 145239)[3/9]">
<groups><group>alt.binaries.e-book.technical</group></groups>
<segments>
<segment bytes="614921" number="1">40195f66$0$143$e4fe514c@dreader13.news.xs4all.nl</segment>
<segment bytes="614921" number="2">40195f81$0$143$e4fe514c@dreader13.news.xs4all.nl</segment>
<segment bytes="614921" number="3">40195f9d$0$143$e4fe514c@dreader13.news.xs4all.nl</segment>
<segment bytes="614921" number="4">40195fb8$0$143$e4fe514c@dreader13.news.xs4all.nl</segment>
<segment bytes="614921" number="5">40195fda$0$143$e4fe514c@dreader13.news.xs4all.nl</segment>
</segments></file></nzb>

Without counting carriage returns, that's 865 characters. If you take out redundant characters and unnecessary info on the server side, then you can reconstruct the same exact file on the client side. As an example, the relevant data in the above nzb follows:

EagleForce_NL
1075473850
Linux_A_Z.part03.rar EagleForce_NL Linux_A_Z (ftd: 145239)[3/9]
alt.binaries.e-book.technical
614921
40195f
$0$143$e4fe514c@dreader13.news.xs4all.nl
66
81
9d
b8
da

The total characters needed to reconstruct the file is just 177, a savings of 79.5%. As you can see, much of the redundant info is in the message id's themselves. All a program has to do on the server side is compare each character position in all the msg-id's in a part to determine which segments of them are redundant and which are not. Then you split at those points, output the first redundant part, then the last (I would only do 2; that's the norm for msg-id's [prefix and suffix], and doing otherwise would increase the complexity of the format), then the non-redundant parts. The number of non-redundant parts equals the number of segments. This is an extreme example, where only two characters are different in each message-id.

I wouldn't have to reconstruct an nzb file; I could just have a bookmarklet output in the way the current ones I wrote do, since they import fine into Newspro (let it export nzb's).

Posted: Fri Jan 30, 2004 11:06 pm
by jaapf
Well, for this moment the seem to have some problems....

BTW, looks like there still making a NZB for EACH file? Still leaving 100 operations needed to get a search-result of a 100 files?

Looks like your Bookmaklet 's still a winner!

Posted: Sat Jan 31, 2004 2:54 pm
by slotboxed
fixed... see new post above.

Posted: Sat Jan 31, 2004 4:34 pm
by Obiwantje
@Slotboxed,

Fist off: Thanks for this wonderful program, this will save me and many others LOADS of time !

One Question though, I was just now trying your program for the first time, and I seem stuck at the "Processing" screen, it has been running now for some 5 minutes on a selection of some 60 files, I then retried with just 2-3 files to check if it is just a matter of patience....but the same here, it seems stuck at the "processing" screen

Any idea what might be going wrong?

Posted: Sat Jan 31, 2004 4:35 pm
by Obiwantje
@Slotboxed,

Fist off: Thanks for this wonderful program, this will save me and many others LOADS of time !

One Question though, I was just now trying your program for the first time, and I seem stuck at the "Processing" screen, it has been running now for some 5 minutes on a selection of some 60 files, I then retried with just 2-3 files to check if it is just a matter of patience....but the same here, it seems stuck at the "processing" screen

Any idea what might be going wrong?

Posted: Sat Jan 31, 2004 4:55 pm
by slotboxed
no, it shouldn't take that long. it does about 3 or 4 a sec for me on cable. Are you seeing any activity on the status bar?

And you're using the latest version? I made some changes even after I posted this morning.

Are you getting any script errors? I could see about putting some debug code in. Most likely it's stuck on the first file.

Posted: Sat Jan 31, 2004 5:25 pm
by Obiwantje
@Slotboxed,

Problem resolved, it is my popup and ad-filter that is causing the problem, I've uninstalled it (as just disabling did NOT work) and now it works like a charm.

Since I am now WITHOUT a popup blocker, I'd be interested to hear wich one you are using, as that one is probably supported ;-)

Again, many thanks !

Posted: Sat Jan 31, 2004 6:10 pm
by slotboxed
Well, I wasn't using any at the moment, though I used to use AdMuncher when I was running Win98. Haven't got around to installing it on XP yet. Anyway, I went to http://www.popup-killer-review.com/inte ... p-stop.htm to see what was listed. I tried the free PopupManager and it's fine.

Funny thing is, I'm not doing any window.open calls at all, just dynamically rewriting the same page. What is the name of your (former) popup killer? I remember AdMuncher messing with some programming tool I used.

Posted: Sat Jan 31, 2004 8:59 pm
by Obiwantje
Well guess what: It was admuncher, I've now installed it, and I am trying to get your tool to work with Norton internet security instead....what a brilliant tool you wrote, it really works well !

Posted: Sun Feb 01, 2004 2:19 am
by slotboxed
I don't know what kind of problem AdMuncher gave you, because I just downloaded the latest copy and installed it with default settings and the bookmarklet works fine with it. I'm also using EZTrust's Antivirus and Firewall, and there's a hardware router between my computer and the cable modem.

Posted: Sun Feb 01, 2004 3:18 am
by joerg
I also just tried your bookmarklet, and it's amazing. Thanks for this great tool!

Is something like this also possible for Opera (my default browser)? Had to switch to Firebird to use it (I avoid IE wherever I can), which is of course no problem - but if it worked with Opera that would be even better!

Posted: Sun Feb 01, 2004 5:18 am
by alex
since they added .nzb support probably i'll drop the support for the 'clipboard' format since it is not needed any more.

is it not possible to do everything on the user machine so there will be no question of bandwidth?

Posted: Sun Feb 01, 2004 7:34 am
by slotboxed
The problem with their nzb support is it's 1 nzb per part, not like newzbin where all parts to a file posting are gathered in in one nzb.

Ex. newzbin
1 nzb for a 100-part file
each part containing, let's say, 10 segments
total of 1000 msg-id's in 1 nzb

Ex. a.b.nl
1 nzb for each part of 100-part file
100 nzb's each contain 10 msg-id's
total of 1000 msg-id's in 100 nzb's

So I urge you to reconsider the dropping of clipboard support for now, anyway. On the other hand, it would be relatively easy to format my output as nzb for saving into a file, which could then be imported into Newspro.

Anyway, I'm also looking into doing my own indexing, at least as an exercise for me. I would do most of it at home to keep my costs down, and only upload my compressed data to the server to be indexed by the database. It's kinda silly, because I use Newzbin Premium myself. But, as I said, it's an exercise.

Mike

p.s. about Opera... I downloaded the latest version this afternoon and tried both bookmarklets on it, but neither worked. It truncated the Mozilla by about 5000 characters, so there's no way I could get it to work unless maybe I could split it up into 2 bookmarklets and/or reduce its feature set. The most logical and intuitive way to split it up would be to present the sort/selection page with the first bookmarklet, then process and output the results with the other. I've done this sort of thing before - one in particular I did, before I found out JS files could be used on IE, had 4 small bookmarklets that you ran in sequence to complete the task.


The IE one just sat there like a dead stump. I looked in Opera's JS Console, but no errors showed up, so I don't know how I'd debug it. Both IE and Mozilla have JS debuggers, so that makes them easier to debug. Bookmarklets are harder to debug than normal JS anyway, because the source code is not on an actual web page, and if you have a syntax error, especially in the one-liners, it can be hard to figure out where it is, because what the debugger says is not necessarily the cause.

Myself, I prefer MozillaFirebird because you start with a lean and mean browser, but you are able to augment its feature set the way you want with extensions.

Posted: Sun Feb 01, 2004 7:57 am
by alex
if you put one .nzb after another in one file newspro can digest it.

you mention bandwidth, do you somehow run a server or everything is done on the user side?