Author Topic: Explanation for some SETUP options  (Read 5918 times)

Offline pieper

  • Contributor
  • ***
  • Posts: 45
Explanation for some SETUP options
« on: January 25, 2007, 07:46:39 pm »
HI there,

Most options I understand, these options however need some more explanation:
allow rootnodes sort:  What exactly is the Rootnode? Does it sort the items in tabs par2 & DL queue or only tab par2
Explain status in XML file option.  What can I do with the generated xml file?
Delete newzbin messagepart ID from NZB name  Why?
Replace underscore with space when importin NZB  Why?


Great program, nice work :!:

Offline Rdl

  • Administrator
  • *****
  • Posts: 4050
Re: Explanation for some SETUP options
« Reply #1 on: January 25, 2007, 08:03:50 pm »
Quote from: "foppe"

allow rootnodes sort:  What exactly is the Rootnode? Does it sort the items in tabs par2 & DL queue or only tab par2

http://www.sens-design.nl/alt.binz/forum/viewtopic.php?t=54
Quote from: "foppe"

Explain status in XML file option.  What can I do with the generated xml file?

http://www.sens-design.nl/alt.binz/forum/viewtopic.php?t=78
Quote from: "foppe"

Delete newzbin messagepart ID from NZB name  Why?
Replace underscore with space when importin NZB  Why?

http://www.sens-design.nl/alt.binz/forum/viewtopic.php?t=100
http://www.sens-design.nl/alt.binz/forum/viewtopic.php?t=26

Offline pieper

  • Contributor
  • ***
  • Posts: 45
Re: Explanation for some SETUP options
« Reply #2 on: January 26, 2007, 11:06:26 am »
allow rootnodes sort: Read it, understood it, but still don't understand completely how it works.
If turned on, and several rootnodes are queued in tab DL queue? it will sort automattically by age? That doesn't work here.

Enable status in XML file: understood, I opened the file in IE7, the layout for an xml file is horrible with all those brackets.

Delete newzbin messagepart ID from NZB name
Replace underscore with space when importing NZB
Understood, not really elementair, just to make the filename a little shorter and nicer.

Thanks, great program, nice work  :!:

Offline Rdl

  • Administrator
  • *****
  • Posts: 4050
Re: Explanation for some SETUP options
« Reply #3 on: January 26, 2007, 11:16:39 am »
Quote from: "foppe"
allow rootnodes sort: Read it, understood it, but still don't understand completely how it works.
If turned on, and several rootnodes are queued in tab DL queue? it will sort automattically by age? That doesn't work here.

Ok, turn on that option, import several nzb files, make sure no nzb is selected (click in white area that doesn't belong to either nzb) and then try sorting by name,size,age... You got the point. It defeats the purpose of the program (first nzb in list downloading first...) by my standards so that's why it is just an option (off by default)
Quote from: "foppe"

Enable status in XML file: understood, I opened the file in IE7, the layout for an xml file is horrible with all those brackets.

Err, no point in opening it in IE7. You didn't understood the purpose.

Offline srki

  • Contributor
  • ***
  • Posts: 72
Re: Explanation for some SETUP options
« Reply #4 on: January 26, 2007, 11:51:05 am »
Quote from: "Rdl"
Quote from: "foppe"

Enable status in XML file: understood, I opened the file in IE7, the layout for an xml file is horrible with all those brackets.

Err, no point in opening it in IE7. You didn't understood the purpose.

@fopee The purpose od that XML is to have external control of ABZ. For example you can maker short Ruby script (or script/program in any programming language you like/know) like this:
----- cut here -----
require 'rexml/document'
include REXML
file = File.new("altbinz_status.xml", "r+")
doc = Document.new(file)
root = doc.root
conn = root.elements["connect"]
conn.text = "true"
file = File.new("altbinz_status.xml", "w+")
file.write(doc)
----- cut here -----

This script turns ABZ on. For example you can access to XML file remotely via web to see informations and control ABZ...
Very simply - ABZ ROX!

Offline pieper

  • Contributor
  • ***
  • Posts: 45
Explanation for some SETUP options
« Reply #5 on: January 26, 2007, 05:02:43 pm »
Okay I understand Root node sort:

If allow rootnode sort is enabled:
- When a rootnode is selected, it's possible to perform File column sort in the DL Queue (inside the rootnode, rar- par- files etc).
- When no rootnode is selected (click on white area), it's possible to perform Rootnode column sort (one level higher).
If allow rootnode sort is disabled:
- Only File column sort is possible
- Rootnode column sort is disabled

I'll get back later about  XML I want to know how to run this script.

Thanks for the explanation guys , Great program Nice work :!:

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: Explanation for some SETUP options
« Reply #6 on: January 26, 2007, 07:06:09 pm »
Quote from: "foppe"

Enable status in XML file: understood, I opened the file in IE7, the layout for an xml file is horrible with all those brackets.

If you're not big on scripting, one of the simplest uses of the info is in a batch file to check whether, for example, altbinz is currently downloading anything.  As an example:

Code: [Select]

@echo off

:check_altbinz_state
wmic process get name | find "altbinz.exe" > nul
if %ERRORLEVEL%==0 goto :check_altbinz_queue
goto :end

:check_altbinz_queue
find "<QueueSize>0 MB</QueueSize>" "C:\Program Files\Altbinz\altbinz_status.xml"
if %ERRORLEVEL%==0 goto :queue_empty
@ping 127.0.0.1 -n 300 -w 1000 > nul
goto :check_altbinz_queue

:queue_empty
rem do something here

:end
goto :eof



This will check the xml every 5 minutes (300 secs)  if altbinz is running.  When the queue is empty, it will move on.  You can also check Current Speed like this.  Crude, but it works.  I use it as part of an overnight batch file that switches on wireless, let's altbinz scan TvNZB for any new downloads, downloads them, switches off wireless, then starts maintenance tasks.

Offline pieper

  • Contributor
  • ***
  • Posts: 45
Explanation for some SETUP options
« Reply #7 on: January 27, 2007, 12:43:21 pm »
Thanks, got the (command) script running, understand most of it. (wmic is new for me).
I understand xml more now. I only forgot to read about controlling ABZ with the connect is True/False part. In the beginning I thought the XML file could be opened with a standard viewer. This probably is not the case, the syntax here is used to read status and to gain control over ABZ.

You're right about me not knowing a lot about scripting. But I do know some languages (C, basic, pascal, awk, nawk, tcl/tk, java). Most of them I've only used 5 years ago.

The rubic script is new for me but it's not hard to read and I understand this part of it. found a website: http://www.ruby-lang.org/en/ They got a great online tutorial  (try ruby in 20 minutes). I will do some experiments with it, see how far I'll come

BTW I was able to disconnect and connect by changing the XML file in a notepad  :)  (changing true/false)

Thanks, Great work guys :!:

Offline pieper

  • Contributor
  • ***
  • Posts: 45
Explanation for some SETUP options
« Reply #8 on: January 29, 2007, 07:18:08 pm »
got the ruby script running ! In the beginning I thought I wouldn't use it, but I found  a nice solution and modified the script. I shared the altbinzfolder on my downloadpc. With my laptop I'm able to check the status. Here's my script:

require 'rexml/document'
include REXML

file = File.new("//<downloadpcname/altbinz/altbinz_status.xml", "r+")
doc = Document.new(file)
root = doc.root
printf("---- %s ----\n", root.elements["title"].text        )
printf("connect       %9s\n", root.elements["connect"].text      )
printf("Current speed %9s  ", root.elements["CurrentSpeed"].text )
printf("QueueSize     %9s\n", root.elements["QueueSize"].text    )
printf("limit         %9s  ", root.elements["limit"].text        )
printf("Free Space    %9s\n", root.elements["FreeSpace"].text    )
printf("ETA           %9s\n", root.elements["ETA"].text          )

sleep 5

I made a shortcut on the desktop (laptop) to the abz.rb file, so when I click it, a small popup appears for 5 seconds, containing the status.

Thanks, guys :!: