There are several ways to get in contact with the developers of NNTPGrab.
On this website, there is a forum where you can get in contact with the developer of NNTPGrab
A lot of discussions about the development of the project happen at the IRC channel #nntpgrab which is on irc.nntpgrab.nl
The main developer of NNTPGrab, Erik van Pienbroek, can be reached at the e-mail address info at nntpgrab dot nl
If you have any questions about NNTPGrab, please use the Discussion Forum as e-mail might easily get lost or overlooked at.
There aren't any mailing lists for NNTPGrab yet, but if there's a demand, it can be set up.
If you're encountering situations where NNTPGrab suddenly disappears and doesn't seem to be running anymore, then you're probably having a segmentation fault which means that the program (or one of the components it's using) tried to do something which isn't allowed. To investigate such segmentation fault's it's recommended to generate a stack trace and send it along your bugreport
If the file nntpgrab_gui.rpt cannot be found one in the folders mentioned above, you can try to collect a stack trace manually.
For this you need to download the files gdb.exe and libexpat-1.dll and save them to the folder C:\Program Files\NNTPGrab\bin (or C:\Program Files (x86)\NNTPGrab\bin if you're using a 64bit version of Windows).
Now open a cmd window and execute the following set of commands:
C:\ cd "Program Files\NNTPGrab\bin" gdb nntpgrab_gui.exe run
thread apply all bt thread apply all bt full info locals
If all information is collected, type the command quit in the cmd window to close the debugger and NNTPGrab
If you're using the Windows 64bit version of NNTPGrab, then you need to catch segmentation fault's using the debugger gdb. This can be found here. Please save this file to the folder C:\Program Files\NNTPGrab\bin (or wherever you've installed NNTPGrab). Now open a cmd window and execute the following set of commands:
C:\ cd "Program Files\NNTPGrab\bin" gdb64 nntpgrab_gui.exe run
thread apply all bt thread apply all bt full info locals
If all information is collected, type the command quit in the cmd window to close the debugger and NNTPGrab
On Mac OS X it's much easier to generate a stack trace. It's done automatically when a segmentation fault occurs in NNTPGrab! In this situation, a popup will be shown automatically mentioning that a crash has occured in NNTPGrab. In this popup there's an option to report this to the developers. Click this button and send all the information you get to see now along the bugreport
On Linux you need gdb to catch segmentation fault's. On most Linux environments this package is installed by default. If not, please use the package manager of your distribution to install the gdb package.
Now open a terminal and execute the following set of commands:
gdb nntpgrab_gui run
thread apply all bt thread apply all bt full info locals
If all information is collected, type the command quit in the terminal to close the debugger and NNTPGrab
If you want to help the development of NNTPGrab or extend it, documentation can be found here. If something is not clear enough on these pages, feel free to post a message on the forum
API Documentation
Control NNTPGrab using JSON-RPC
Control NNTPGrab using PHP
Control NNTPGrab using a custom TCP protocol (obsoleted)
Developing plugins
Developing on Mac OS X
Fonera port
eTrayz port
Help wanted
This page will document the steps required to get started on developing NNTPGrab on Mac OS X environments
NNTPGrab requires some external dependencies which are not bundled with XCode or the Qt SDK. These can be installed by performing these commands in the Terminal:
mkdir -p ~/Development/NNTPGrab cd ~/Development svn co https://svn.openftd.org/svn/build_env/osx NNTPGrab
When using Qt Creator, some environment variables need to be set to allow the build scripts to detect all the external dependencies which are required for NNTPGrab. Please perform these commands in the Terminal:
echo ~/Development/NNTPGrab/deps/bin > ~/tmp sudo mv ~/tmp /etc/paths.d/NNTPGrab cp /etc/profile ~/tmp chmod 644 ~/tmp echo "export PKG_CONFIG_LIBDIR=~/Development/NNTPGrab/deps/lib/pkgconfig" >> ~/tmp sudo mv ~/tmp /etc/profile sudo chown root:wheel /etc/profile source /etc/profile cd ~/Development/NNTPGrab/deps/share/aclocal sudo cp glib-2.0.m4 glib-gettext.m4 intltool.m4 nls.m4 pkg.m4 /usr/share/aclocal cd ~/Development/NNTPGrab/deps/lib sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libgio-2.0.la sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libglib-2.0.la sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libgmodule-2.0.la sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libgobject-2.0.la sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libgthread-2.0.la sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libintl.la sed -i '' "s|PREFIX|`echo ~`/Development/NNTPGrab/deps|g" libsoup-2.4.la cd ~/Development/NNTPGrab/deps/lib/pkgconfig sed -i '' "s|PREFIX|`echo ~`|" gio-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" gio-unix-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" glib-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" gmodule-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" gmodule-export-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" gmodule-no-export-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" gobject-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" gthread-2.0.pc sed -i '' "s|PREFIX|`echo ~`|" libsoup-2.4.pc
Restart the Terminal application now to allow the new environment variables to be set
Retrieve the NNTPGrab source code and prepare it with these commands:
cd ~/Development/NNTPGrab svn co https://svn.openftd.org/svn/nntpgrab/trunk src cd src ./autogen.sh ./configure \ --prefix=`echo ~`/Development/NNTPGrab/dest \ --disable-gui \ --disable-webinterface \ --disable-dependency-tracking \ CPPFLAGS="-I`echo ~`/Development/NNTPGrab/deps/include" \ CFLAGS="-arch ppc -arch i386 -arch x86_64" \ DYLD_LIBRARY_PATH="`echo ~`/Development/NNTPGrab/deps/lib" make
Now everything's ready we can open the project in Qt Creator. Start Qt Creator and select ''File'' -> ''Open File or Project''. Now navigate to the folder Development/NNTPGrab/src and select the file ''NNTPGrab.creator''
The Qt version of the NNTPGrab Server is currently bundled as a seperate project. To work on this, open the project file ''server_qt/server_qt.pro''
The Qt version of the NNTPGrab GUI is currently bundled as a seperate project. To work on this, open the project file ''client/gui_qt/gui_qt.pro''
The latest released version of NNTPGrab is version 0.7.2 which is released on Monday May 28 2012
The download mirrors are provided by the following persons / companies:
All the files mentioned on this page are stable releases. Looking for the latest test versions and snapshot releases of NNTPGrab instead? Go here
Information about the Subversion repository where all development takes place can be found at the Subversion page
NNTPGrab requires Windows 2000 or higher.
The setup can be found at nntpgrab_0_7_2_Setup.exe
A x64 version of NNTPGrab is also available: nntpgrab_0_7_2_Setup64.exe
NNTPGrab requires Mac OS X 10.5 (Leopard) or higher.
The standalone package can be found at NNTPGrab-0.7.2.zip
The Server package can be found at NNTPGrab-Server-0.7.2.zip
The (deprecated) Gtk frontend can be found at NNTPGrab-Gtk-0.7.2.zip
You can install NNTPGrab by using the command yum install nntpgrab or by using the graphical software manager to install the 'nntpgrab' package. No additional configuration is necessary.
Future releases of NNTPGrab will automatically be installed when you perform the command yum update or use the graphical update program from Fedora.
If you want to have faster access to newer versions of NNTPGrab, you need to install this package
First you need to have access to the EPEL-repository. Instructions how to do so can be found here
Afterwards you can install NNTPGrab by using the command yum install nntpgrab or by using the graphical software manager to install the 'nntpgrab' package. No additional configuration is necessary.
Future releases of NNTPGrab will automatically be installed when you perform the command yum update or use the graphical update program from CentOS
If you want to have access to test versions of NNTPGrab, you need to install this package
First make sure you have installed the package layman.
Now perform the following commands:
layman -o https://www.nntpgrab.nl/releases/gentoo/overlay.xml -f layman -o https://www.nntpgrab.nl/releases/gentoo/overlay.xml -a nntpgrab
If you already have OpenFTD installed you can skip the above commands
You can now install NNTPGrab by using the command:
emerge -av nntpgrab
If you receive a error mentioning the package 'nntpgrab' isn't found, you need
to add the following line to the file /etc/make.conf:
source /usr/local/portage/layman/make.conf
If this does not work, add the following line to /etc/make.conf:
PORTAGE_OVERLAY="/usr/local/portage/layman/nntpgrab $PORTAGE_OVERLAY"
To retrieve updates, you need to use the following commands:
layman -S emerge -av nntpgrab
To prepare your environment, start YaST by clicking on it under System in your menu or by typing yast in the run command box (press Alt+F2). Select Installation Source. Click on Add, Select enter URL.
For OpenSuSE 13.1: Use the following address for the repository URL https://www.nntpgrab.nl/releases/openSUSE_13.1
For OpenSuSE 12.3: Use the following address for the repository URL https://www.nntpgrab.nl/releases/openSUSE_12.3
For OpenSuSE 12.2: Use the following address for the repository URL https://www.nntpgrab.nl/releases/openSUSE_12.2
For OpenSuSE 12.1: Use the following address for the repository URL https://www.nntpgrab.nl/releases/openSUSE_12.1
For SuSE Linux Enterprise 11.0: Use the following address for the repository URL https://www.nntpgrab.nl/releases/SLE_11
Next you can install the NNTPGrab package by starting YaST. Select Software. Now search for the package 'nntpgrab' and install it.
Future releases of NNTPGrab will now automatically be installed when they are available
Read this page for instructions how to install NNTPGrab on Ubuntu
The source code can be found at nntpgrab-0.7.2.tar.bz2
NNTPGrab 0.1: Windows Mac OS X Source code
NNTPGrab 0.2: Windows Mac OS X Source code
NNTPGrab 0.2.1: Windows Mac OS X Source code
NNTPGrab 0.2.2: Windows Mac OS X Source code
NNTPGrab 0.2.3: Windows Mac OS X Source code
NNTPGrab 0.2.4: Windows Mac OS X Source code
NNTPGrab 0.2.5: Windows Mac OS X Source code
NNTPGrab 0.3.0: Windows Mac OS X Standalone Mac OS X Networked Source code
NNTPGrab 0.3.1: Windows Mac OS X Standalone Mac OS X Networked Source code
NNTPGrab 0.3.2: Windows Mac OS X Standalone Mac OS X Networked Source code
NNTPGrab 0.3.3: Windows Mac OS X Standalone Mac OS X Networked Source code
NNTPGrab 0.4.0: Windows Mac OS X Standalone Mac OS X Networked Mac OS X Server Source code
NNTPGrab 0.4.1: Windows Mac OS X Standalone Mac OS X Networked Mac OS X Server Source code
NNTPGrab 0.4.2: Windows Mac OS X Standalone Mac OS X Networked Mac OS X Server Source code
NNTPGrab 0.5.0: Windows Mac OS X Mac OS X Server Source code
NNTPGrab 0.5.1: Windows Mac OS X Mac OS X Server Source code
NNTPGrab 0.6.0: Windows Mac OS X Mac OS X Server Source code
NNTPGrab 0.6.1: Windows Mac OS X Mac OS X Server Source code
NNTPGrab 0.6.2: Windows 32bit Windows 64bit Mac OS X Mac OS X Server Source code
NNTPGrab 0.7.0: Windows 32bit Windows 64bit Mac OS X Mac OS X Server Mac OS X GTK Source code
NNTPGrab 0.7.1: Windows 32bit Windows 64bit Mac OS X Mac OS X Server Mac OS X GTK Source code
The latest unstable version of NNTPGrab is version 0.6.92 (0.7 Beta 3) which is released on Wednesday July 20 2011
The download mirrors are provided by the following persons / companies:
Looking for experimental builds of NNTPGrab? These are published at the following addresses:
NNTPGrab 0.7 branch (testing)
Windows (x86): https://snapshots.nntpgrab.nl/win32/stable-0.7
Windows (x64): https://snapshots.nntpgrab.nl/win64/stable-0.7
Mac OS X: https://snapshots.nntpgrab.nl/osx/stable-0.7
NNTPGrab trunk branch (experimental)
Windows (x86): https://snapshots.nntpgrab.nl/win32/unstable-trunk
Windows (x64): https://snapshots.nntpgrab.nl/win64/unstable-trunk
Mac OS X: https://snapshots.nntpgrab.nl/osx/unstable-trunk
Other snapshots
All other available snapshots can be found at: https://snapshots.nntpgrab.nl
Please note that the snapshots from the trunk branch can be highly experimental from time to time
The links mentioned below are all testing releases which should be reasonable stable
NNTPGrab requires Windows 2000 or higher. The setup can be found at nntpgrab_0_6_92_Setup.exe. The setup for x64 versions of Windows can be found at nntpgrab_0_6_92_Setup64.exe
NNTPGrab requires Mac OS X 10.5 (Leopard) or higher. The standalone package can be found at NNTPGrab-0.6.92.zip. The Server package can be found at NNTPGrab-Server-0.6.92.zip. The (deprecated) GTK-based package can be found at NNTPGrab-Gtk-0.6.92.zip
To enable the test versions of NNTPGrab, start the Add/remove software program (which can be found in System -> Administration), click on System -> Software Sources and enable the repository NNTPGrab for Fedora X - xxxxx - Testing.
New test versions will now be automatically pulled in with the regular updates
Please download and install this package
To enable the test versions of NNTPGrab, open the file /etc/yum.repos.d/nntpgrab.repo in an editor and change the option enabled=0 to enabled=1 in the [nntpgrab-testing] section.
New test versions will now be automatically pulled in with the regular updates
Afterwards you can install NNTPGrab by using the command yum install nntpgrab or by using the graphical software manager to install the 'nntpgrab' package. No additional configuration is necessary.
Future releases of NNTPGrab will automatically be installed when you perform the command yum update or use the graphical update program from CentOS.
First follow the regular Gentoo installation instructions
Add the following line to the file /etc/portage/package.keywords:
net-nntp/nntpgrab ~* www-apps/nntpgrab-web ~*
Perform an emerge --update to install the latest unstable version
To prepare your environment, start YaST by clicking on it under System in your menu or by typing yast in the run command box (press Alt+F2). Select Installation Source. Click on Add, Select enter URL.
For OpenSuSE 13.1: Use the following address for the repository URL https://www.nntpgrab.nl/releases/testing/openSUSE_13.1
For OpenSuSE 12.3: Use the following address for the repository URL https://www.nntpgrab.nl/releases/testing/openSUSE_12.3
For OpenSuSE 12.2: Use the following address for the repository URL https://www.nntpgrab.nl/releases/testing/openSUSE_12.2
For OpenSuSE 12.1: Use the following address for the repository URL https://www.nntpgrab.nl/releases/testing/openSUSE_12.1
For SuSE Linux Enterprise 11.0: Use the following address for the repository URL https://www.nntpgrab.nl/releases/testing/SLE_11
Next you can install the NNTPGrab package by starting YaST. Select Software. Now search for the package 'nntpgrab' and install it.
Future test releases of NNTPGrab will now automatically be installed when they are available
Read this page for instructions how to install NNTPGrab on Ubuntu. Please note that the testing repository uses a different address than the stable releases!
The source code can be found at nntpgrab-0.6.92.tar.bz2
The eTrayz is a NAS which runs on Linux and has a number of interesting features. As it contains the Linux operating system it should be possible to get NNTPGrab operational on it. This wiki describes how NNTPGrab can be made operational on eTrayz devices.
Luckily enough, the default eTrayz installation contains all the dependencies of NNTPGrab (like GLib2 en libxml2) and contains all development tools so that makes things much more easy than other embedded devices.
A script has been created to make compilation of NNTPGrab as easy as possible. First you need to log in to the eTrayz using SSH
When you're logged in using SSH, perform these commands:
mkdir /home/sysadmin/nntpgrab cd /home/sysadmin/nntpgrab wget https://www.nntpgrab.nl/contrib/build_nntpgrab.sh chmod +x build_nntpgrab.sh ./build_nntpgrab.sh
The last command can take a while to complete. It should end with this message:
NNTPGrab is successfully installed in /home/sysadmin/nntpgrab ! You can start the NNTPGrab Server with the command /home/sysadmin/nntpgrab/bin/start_nntpgrab_server
If you receive any other message, feel free to contact us using the forum
Eventually, this script should get replaced by a proper package, but as I (Alguno) am not familiar with that I'll leave to up to somebody else
Now it should be possible to start the NNTPGrab Server using the command mentioned by the script: /home/sysadmin/nntpgrab/bin/start_nntpgrab_server
This should start NNTPGrab in the foreground. If you wish to run NNTPGrab in the background, add the argument --background to it
Right now there's one known issue. Automatic importing of .nzb files may cause the NNTPGrab Server to crash. Unfortunately I (Alguno) don't have the proper hardware here or access to one to diagnose this. If you happen to stumble across this bug, please try to create a backtrace of gdb. If you need help with this, please contact us in the forum
At the old website of NNTPGrab it was possible to request features using a special wiki page. For this new website things are slightly different.
Feature requests can be done by creating a new issue and using the 'Tracker: Feature'.
People who are interested in features which are requested by somebody else can indicate this by opening the feature request and using the vote function.
When creating a new feature request, please leave the 'Version' field empty as that will be used by the developers to indicate the version of NNTPGrab in which the feature will be implemented
There has been some demand to get NNTPGrab operational on Fonera 2.0 devices. This page documents the current progress of this port
Download and prepare the fon-ng repository:
svn co https://svn.fonosfera.org/fon-ng/trunk fon-ng cd fon-ng ./install.sh cd openwrt
Add the NNTPGrab packages to the Fonera/OpenWRT buildsystem
echo "src-svn nntpgrab https://svn.openftd.org/svn/openwrt" >> feeds.conf ./scripts/feeds update nntpgrab ./scripts/feeds install -a -p nntpgrab
All the dependencies of NNTPGrab (gettext, libiconv and GLib 2) are bundled in this repository, so you don't need to add the official OpenWRT repositories (it probably even conflicts for now). The plan is to get the changes which are required in the dependencies upstream (OpenWRT) as soon as everything runs stable
Now you can execute make menuconfig and create a configuration for the Fonera. NNTPGrab is split in 2 packages at the moment (libnntpgrab and nntpgrab-server) and can be found in the section Network -> Usenet. All other options can be left at their defaults. If you want to create a package for the Fonena 2.0n you need to indicate so
When the configuration has been created you can use make V=99 to build everything
All built packages can now be found in the folder bin/packages/mips (or bin/packages/mipsel if you're compiling for the Fonera 2.0n). You can now copy these files to the Fonera device using (for example) scp or by copying them to an USB stick:
glib2_2.20.3-1_mips.ipk libiconv_1.11-1_mips.ipk libintl_0.16.1-4_mips.ipk libnntpgrab_*_mips.ipk nntpgrab-server_*_mips.ipk
You can now install these packages using opkg. Please note that the Fonera itself doesn't have enough disk space to install everything, so you're recommended to install the packages to (for example) an USB stick.
When all the files have been compiled and installed on the Fonera, you can start the NNTPGrab Server with this command:
LD_LIBRARY_PATH=$PREFIX/usr/lib \ NNTPGRAB_LIBDIR=$PREFIX/usr/lib/nntpgrab \ NNTPGRAB_CONFIG_DIR=/tmp/run/mountd/sda1 \ NNTPGRAB_DEFAULT_DL_DIR=/tmp/run/mountd/sda1 \ NNTPGRAB_WWWDIR=$PREFIX/usr/share/nntpgrab/web \ $PREFIX/usr/bin/nntpgrab_server
The $PREFIX is the location where the files have been installed using opkg.
The /tmp/run/mountd/sda1 is the path to a connected hard drive where all settings and downloads can be saved
The --background argument can be used to start the program in the background
You can now connect to the NNTPGrab Server by using NNTPGrab 0.6.90 or later from your desktop environment. On startup, you're asked for an IP address of an NNTPGrab Server. This is the IP address of your Fonera (192.168.10.1 by default)
The webinterface can be reached on https://192.168.10.1:5423. When asked for an username and password, use admin/admin
The location of the NNTPGrab configuration can be influenced with the environment variable NNTPGRAB_CONFIG_DIR (see above). If this environment variable isn't set, the default path will be used: ~/.config/NNTPGrab. On Fonera devices this means /tmp/.config/NNTPGrab. This folder is part of a RAM-disk, so it's contents will get lost on a reboot. It's really recommended to use this environment variable.
The default location for all downloads can be set with NNTPGRAB_DEFAULT_DL_DIR (as can be seen above). The environment variable only needs to be set the first time the program is used. Once the initial configuration has been created, the download paths can be set using the NNTPGrab GUI from your desktop environment. This can be done in the configuration tab in the GUI. You need to choose a folder which isn't part of the internal memory of the Fonera as this is too limited
Another thing which needs to be done in the configuration is to disable the options 'Automatically perform a PAR2 repair' and 'Automatically unpack files'. This is because the Fonera hardware is too limited for these features to operate and requires some packages which currently aren't packaged yet (par2 and unrar)
After this initial configuration is done you can import files in the program and the download will start automatically
The entire dependency tree looks like this:
nntpgrab-server
|
+----------> libnntpgrab
|
+--------> glib2
| |
| +-------> libiconv (for character encodings)
| |
| +-------> gettext (for translations)
|
+--------> cyaSSL (for connecting to NNTP servers over SSL)
The TODO list of the Fonera port of NNTPGrab has been split in two sections, generic task and Fonera-specific tasks.
The tasks mentioned in the generic list benefit users of NNTPGrab on all environments and are more or less already part of the Roadmap
Binaries of NNTPGrab for the Fonera and it's dependencies are published at https://snapshots.nntpgrab.nl/fonera. This is all a work-in-progress with known issues, so there are no stability guarantees yet
NNTPGrab is an open source project which means that anybody can help with the development of the program.
We're always open for external contributions.
If you think you can help us, don't hesitate to contact us!
The fastest way to get in contact with us is through IRC or through the forum on this website
As of NNTPGrab 0.6 it is possible to control NNTPGrab using JSON-RPC. This requires the JSON-RPC plugin to be loaded in the program.
JSON-RPC support is provided by the JSON-RPC plugin which is installed along with the program by default. To activate the JSON-RPC server, you need to go to the configuration tab in NNTPGrab, select Plugins and make sure that the option Enable embedded webserver is checked. It's also possible to indicate the port number of which the JSON-RPC server needs to listen.
After the JSON-RPC server has been activated you can send JSON-RPC commands to the URL https://localhost:5423/jsonrpc (where localhost is the hostname or IP address of the host where NNTPGrab is running and 5423 is the port number which has been set in the NNTPGrab configuration.
When using JSON-RPC no special handshake is needed. It's sufficient to send a regular HTTP POST request containing JSON-RPC data to the server. The connection will automatically be closed by the server after every request as Mongoose (the embedded webserver library used by NNTPGrab) doesn't support HTTP keep-alive.
If possible it's recommended to use JSON-RPC over TCP. This is because NNTPGrab can emit events (notifications) at any time. When using JSON-RPC over TCP the connection doesn't need to be re-established after every request so this saves time and resources.
For JSON-RPC over TCP the same port as JSON-RPC over HTTP can be used, but instead of a HTTP request, a custom request needs to be sent by the client to the server. This way the webserver knows what method needs to be used.
To activate JSON-RPC over TCP the client needs to send this message to the server:
NNTPGrab - API version 20110625\r\n\r\n
The value 20110625 is the current API version as defined in the file nntpgrab_core/nntpgrab_plugins.h and the \r\n\r\n sequence are two newlines
In response, the server can send one of these replies:
OK\r\n API mismatch, expected 20091228\r\n
If the server sends the OK response then the handshake is completed and JSON-RPC request can be sent to the server. The server can also send any events (notifications) back to the client at any moment
If the server sends the API mismatch response then a different version of the API is expected. The value 20091228 mentioned here is just an example, it can be different depending on the version of NNTPGrab installed. The connection will be closed automatically by the server if this response is emit
Authentication is required to use JSON-RPC over HTTP. This is realized by the HTTP authentication method Digest. The default username and password for NNTPGrab 0.6.x is admin/admin.
Authentication isn't implemented at the moment for JSON-RPC over TCP, but it will be in future versions. Check back later
nntpgrab_get_version_info - Returns several version numbers belonging to NNTPGrab
object nntpgrab_get_version_info
Returns an object with the following fields:
(
[glue_version]
[major_version]
[minor_version]
[micro_version]
[version]
)
Available since NNTPGrab 0.6
nntpgrab_config_get_avail_servers - Retrieve a list of the available usenet servers
array nntpgrab_config_get_avail_servers()
Returns an array containing the servername's of all the available usenet servers
Available since NNTPGrab 0.6
nntpgrab_config_get_server_info - Retrieve the configuration details about a specific usenet server
object nntpgrab_config_get_server_info(string servername)
When the given servername isn't known an error is returned, otherwise
an object containing the following elements is returned
(
[servername]
[hostname]
[port]
[username]
[password]
[max_threads]
[priority]
[send_group_command]
[use_ssl]
[enabled]
)
The contents of the field priority has one of the following values:
0 - High priority 1 - Normal priority 2 - Low priority
Available since NNTPGrab 0.6
nntpgrab_config_add_server - Add a new server to the NNTPGrab configuration
boolean nntpgrab_config_add_server(array serverconfig)
Returns TRUE when the server was successfully added to the NNTPGrab configuration
or FALSE when the given servername is already known.
The serverconfig array needs to have the following fields:
(
[servername]
[hostname]
[port]
[username]
[password]
[max_threads]
[priority]
[send_group_command]
[use_ssl]
[enabled]
)
The contents of the field priority needs to have one of the following values:
0 - High priority 1 - Normal priority 2 - Low priority
Available since NNTPGrab 0.6
nntpgrab_config_del_server - Remove a server from the NNTPGrab configuration
boolean nntpgrab_config_del_server(string servername)
Returns TRUE when the server was successfully removed from the NNTPGrab configuration
or FALSE when the given servername isn't known.
Available since NNTPGrab 0.6
nntpgrab_config_edit_server - Change the settings of a server
boolean nntpgrab_config_edit_server(string original_servername, object serverconfig)
Returns TRUE when the change was successfully performed or FALSE when the given original_servername isn't known.
The serverconfig object needs to have the following fields:
(
[servername]
[hostname]
[port]
[username]
[password]
[max_threads]
[priority]
[send_group_command]
[use_ssl]
[enabled]
)
The contents of the field priority needs to have one of the following values:
0 - High priority 1 - Normal priority 2 - Low priority
Available since NNTPGrab 0.6
nntpgrab_config_get_opts - Retrieve the basic configuration information from NNTPGrab
object nntpgrab_config_get_opts()
Returns an object containing the following fields:
(
[download_directory]
[temp_directory]
[enable_intelligent_par2_downloading]
[enable_par2_repair]
[enable_auto_import]
[auto_import_directory]
[move_file_after_auto_import]
[enable_auto_unpack]
[enable_bandwidth_shaping]
[max_bandwidth]
[enable_webserver]
[webserver_port]
[enable_logger]
)
Available since NNTPGrab 0.6
nntpgrab_config_set_opts - Change the basic configuration of NNTPGrab
boolean nntpgrab_config_set_opts(object options)
Returns TRUE when the changes have been performed or FALSE when there was an error
The options object needs to have the following fields:
(
[download_directory]
[temp_directory]
[enable_intelligent_par2_downloading]
[enable_par2_repair]
[enable_auto_import]
[auto_import_directory]
[move_file_after_auto_import]
[enable_auto_unpack]
[enable_bandwidth_shaping]
[max_bandwidth]
[enable_webserver]
[webserver_port]
[enable_logger]
)
Available since NNTPGrab 0.6
nntpgrab_schedular_start - Start the NNTPGrab schedular
boolean nntpgrab_schedular_start()
Returns TRUE when the schedular has been successfully started or FALSE when
the schedular was already running or in the stopping state
Available since NNTPGrab 0.6
nntpgrab_schedular_stop - Stop the NNTPGrab schedular
nntpgrab_schedular_stop(boolean wait)
If wait is FALSE, a request will be sent to the NNTPGrab Server to
stop the schedular, but the function will not wait for the schedular to
be really stopped. If wait is TRUE, this function will wait
until the schedular is really stopped.
Available since NNTPGrab 0.6
nntpgrab_schedular_get_state - Retrieve the current state of the NNTPGrab schedular
int nntpgrab_schedular_get_state()
This function can return one of the following values:
0 - Schedular is running 1 - Schedular is stopping 2 - Schedular is stopped
Available since NNTPGrab 0.6
nntpgrab_schedular_add_file_to_queue - Add a new file to the download queue
boolean nntpgrab_schedular_add_file_to_queue(string collection_name, string subject, string poster, int timestamp, int file_size, array groups, array parts)
Returns TRUE when the file has been successfully added or FALSE when there already is a file with
the same subject in the same collection_name in the download queue
The file_size needs to be in bytes
The array groups contains a list of usenet groups in which this file is published
The array parts contains an array which has the following fields:
(
[0] => Object -- This block is representing one part. This block can occur multiple times
(
[message_id]
[part_num]
[size]
)
)
Available since NNTPGrab 0.6
nntpgrab_schedular_del_file_from_queue - Remove a file from the download queue
boolean nntpgrab_schedular_del_file_from_queue(string collection_name, string subject)
Returns TRUE when the file has been successfully removed or FALSE when the given collection_name and subject aren't known
Available since NNTPGrab 0.6
nntpgrab_schedular_restart_file - Restart a file
boolean nntpgrab_schedular_restart_file(string collection_name, string subject)
Returns TRUE when the file has been successfully restarted or FALSE when the given collection_name and subject aren't known
Available since NNTPGrab 0.6
nntpgrab_schedular_save_queue - Save the download queue
boolean nntpgrab_schedular_save_queue()
This function should be called after several new tasks have been added to the download queue
Returns TRUE when the save has been successful or FALSE when there was an error
Available since NNTPGrab 0.6
nntpgrab_schedular_get_all_tasks - Retrieve all the tasks in the download queue
array nntpgrab_schedular_get_all_tasks()
The array returned from this function contains a lot of data:
(
[0] => Object -- This block is representing one collection. This block can occur multiple times
(
[collection_name]
[total_size]
[total_size_remaining]
[files] => Array
(
[1] => Object -- This is representing one file. This block can occur multiple times
(
[subject]
[poster]
[stamp]
[file_size]
[file_size_remaining]
[num_parts_total]
[num_parts_downloaded]
[num_parts_failed]
[status]
[groups] => Array -- This is representing a list of usenet groups in which this file is published
(
[0]
)
)
)
)
)
The fields total_size and file_size mention the size in KB (kilobytes, 1024 bytes)
Possible values for the status are:
0 - Waiting for download 1 - Downloading 2 - Waiting for decoding 3 - Decoding 4 - Finished - complete 5 - Finished - incomplete 6 - Finished - no parts available 7 - Skipped
Available since NNTPGrab 0.6
nntpgrab_schedular_move_file - Change the position and/or location of a file in the download queue
boolean nntpgrab_schedular_move_file(string collection_name_src, string subject_src, string collection_name_dest, int position_dest)
collection_name_src can be the same as collection_name_dest. If position_dest is -1, the file will be added to the end of the queue.
If subject is empty, then position_dest will mean the position of all the collections in the download queue.
Available since NNTPGrab 0.6
nntpgrab_schedular_move_collection - Change the position of a collection in the download queue
boolean nntpgrab_schedular_move_collection(string collection_name, int new_position)
If new_position is -1, the file will be added to the end of the queue.
Available since NNTPGrab 0.6
nntpgrab_schedular_mark_task_optional - Mark a task optional/non-optional in the download queue
boolean nntpgrab_schedular_mark_task_optional string collection, string subject, boolean is_optional)
Available since NNTPGrab 0.7
nntpgrab_plugins_get_avail_plugins - Get a list of all the available plugins
array nntpgrab_plugins_get_avail_plugins()
Returns an array containing string's with the name of the plugin
Available since NNTPGrab 0.6
nntpgrab_plugins_get_plugin_info - Retrieve information about a specific plugin
object nntpgrab_plugins_get_plugin_info(string plugin_name)
The returned object contains these fields:
(
[name]
[version]
[author]
[url]
[description]
[is_loaded]
[is_persistent]
)
Available since NNTPGrab 0.6
nntpgrab_plugins_load_plugin - Load a plugin
boolean nntpgrab_plugins_load_plugin(string plugin_name)
Returns TRUE if the plugin was successfully loaded. In case of an error, an JSON error will be returned containing details
Available since NNTPGrab 0.6
nntpgrab_plugins_unload_plugin - Unload a plugin
boolean nntpgrab_plugins_unload_plugin(string plugin_name)
Returns TRUE if the plugin was successfully unloaded. In case of an error, an JSON error will be returned containing details
Available since NNTPGrab 0.6
nntpgrab_plugin_set_persistent - Change the persistent flag of a plugin
void nntpgrab_plugins_set_persistent(string plugin_name, boolean is_persistent)
In case of an error, an JSON error will be returned containing details
Available since NNTPGrab 0.6
nntpgrab_utils_strip_subject - Split a subject in various useable fields
array nntpgrab_utils_strip_subject(string subject)
The array returned contains the following fields:
(
[subject]
[subject_without_partnum]
[file_num]
[total_files]
[filename]
[extension]
[file_type]
[par2_startnum]
[num_par2_blocks]
[part_num]
[total_parts]
)
Note that some fields can be missing. If a field is missing, it can't be detected in the given subject
Available since NNTPGrab 0.6
nntpgrab_utils_calculate_file_size - Returns the given file size in a human readable notation
string nntpgrab_utils_calculate_file_size(long filesize)
The filesize should be in KB (kilobytes)
Available since NNTPGrab 0.6
nntpgrab_utils_calculate_estimated_time_remaining - Make an estimation when a file with the given size will be completed
int nntpgrab_utils_calculate_estimated_time_remaining (array speed_history, int filesize)
The array speed_history should be the history part of the array returned by the function nntpgrab_connections_get_speed_history
The filesize is in KB (kilobytes)
The value returned is the number of seconds necessary to complete the given file size
Available since NNTPGrab 0.6
nntpgrab_utils_get_readable_time_remaining - Returns the human readable notation of a given number of seconds
string nntpgrab_utils_get_readable_time_remaining (int time_remaining)
The value time_remaining is returned by the function nntpgrab_utils_calculate_estimated_time_remaining
Available since NNTPGrab 0.6
nntpgrab_utils_get_readable_finished_time - Returns the human readable notation of a given number of seconds relative to the current time
string nntpgrab_utils_get_readable_finished_time (int time_remaining)
The value time_remaining is returned by the function nntpgrab_utils_calculate_estimated_time_remaining
Available since NNTPGrab 0.6
nntpgrab_utils_get_folder_listing - Retrieves a list containing all the sub-folders which are in the given folder
mixed nntpgrab_utils_get_folder_listing(string parent)
Returns FALSE when the given parent isn't known by the NNTPGrab Server or an
array containing object's with these values:
(
[folder]
[has_subfolders]
)
Available since NNTPGrab 0.6
When connected to NNTPGrab using JSON-RPC over TCP events can be emit at any moment. When using JSON-RPC over HTTP, events (or in JSON-RPC terms: notifications) can be sent along with responses to requests. These are the possible events which the NNTPGrab Core can send:
Something in the configuration has changed
config_changed
The download of a part has just started
part_download_start string servername, int conn_id, string collection_name, string subject, int part_num
The download of a part has completed successfully
part_done string servername, int conn_id, string collection_name, string subject, int part_num, int size
The download of a part has failed (probably because the part isn't available on the server
part_failed string servername, int conn_id, string collection_name, string subject, int part_num, int size, boolean all_servers_tried
Every second, traffic statistics about the last 10 seconds are given
traffic_monitor_update int bytes_received1, int bytes_received2, int bytes_received3, int bytes_received4, int bytes_received5, int bytes_received6. int bytes_received7, int bytes_received8, int bytes_received9, int bytes_received10, int stamp, double average
Every 1/10th second of a part download, this message will be sent
part_progress_update string servername, int conn_id, string collection_name, string subject, int part_num, int bytes_downloaded, int bytes_total
A new collection was added
collection_added string collection_name, string poster
A collection was removed
collection_removed string collection_name
The poster of a collection was modified
collection_modified string collection_name, string poster
A file was added to a already existing collection
file_added string collection_name, string subject, string poster, int stamp, int file_size, int total_size, int total_size_remaining, int status, int num_parts, array groups
The groups argument is a list of newsgroups (string's)
NOTE: The fields file_size, total_size and total_size_remaining contain the number of KB's instead of bytes
A file was removed from the download queue
file_removed string collection_name, string subject, int total_size, int total_size_remaining
NOTE: The fields total_size and total_size_remaining contain the number of KB's instead of bytes
The state of a file in the download queue has changed
file_download_state_update string collection_name, string subject, int num_parts_total, int num_parts_done, int num_parts_failed, int file_size, int file_size_remaining, int total_size, int total_size_remaining
NOTE: The fields file_size, file_size_remaining, total_size and total_size_remaining contain the number of KB's instead of bytes
A file in the download queue was restarted
file_state_changed string collection_name, string subject, string real_filename, int old_state, int new_state
A new connection is being made to a usenet server
connection_connecting string servername, int conn_id
A connection attempt has succeeded
connection_connected string servername, int conn_id, string welcome_msg
A connection to a usenet server was disconnected
connection_disconnect string servername, int conn_id, int disconnect_type, string reason
disconnect_type can be any of the following values:
0: normal 1: hostname could not be resolved 2: connection refused 3: too many connections 4: connection timeout 5: read error 6: read timeout 7: write error 8: idle timeout 9: invalid message received from server 10: login failure 11: unable to initialize SSL 12: unexpected error occured
The state of the schedular has changed
schedular_state_changed int new_state, string reason
A log message has been emitted
log_message string component, int log_level, string msg
log_level can contain one of the following values:
1: info 2: warning 3: error 4: fatal 5: debug
The position of a task in the download queue has changed
task_moved string orig_collection_name, string subject, string new_collection_name, int old_position, int new_position
The position of a collection in the download queue has changed
collection_moved string collection_name, int old_position, int new_position
This message is emit when all the items in the download queue are completed
all_downloads_completed
A plugin has been loaded
plugin_loaded string plugin_name, boolean is_persistent
A plugin has been unloaded
plugin_unloaded string plugin_name
A plugin has emit an event
plugin_event string plugin_name, string event_name, array values
The values parameter is an array containing string's
Certain plugin can emit events which are interesting to frontends.
This is a list of all known events which can be emit by plugins (as part of the plugin_event event)
The name of this plugin is PAR2
A PAR2 verification (and if necessary repair) has just started
values[0]: collection_name values[1]: active_par2_filename
A file is now being verified
values[0]: collection_name values[1]: active_par2_filename values[2]: filename values[3]: progress
A PAR2 recovery file has been loaded completely
values[0]: collection_name values[1]: active_par2_filename values[2]: filename values[3]: num_new_packets values[4]: num_blocks_found
A regular file has been loaded completely
values[0]: collection_name values[1]: active_par2_filename values[2]: filename values[3]: state values[4]: num_blocks_found values[5]: num_blocks_expected
The field state can be one of the following values:
MISSING FOUND DAMAGED NO_NEW_BLOCKS_FOUND
A PAR2 repair is now going on
values[0]: collection_name values[1]: active_par2_filename values[2]: progress
The PAR2 repair has failed because there aren't enough recovery blocks available or some other error
values[0]: collection_name values[1]: active_par2_filename values[2]: error message values[3]: num_blocks_more_required
The PAR2 repair has completed successfully
values[0]: collection_name values[1]: active_par2_filename
All the files in the PAR2 set have been verified and no repair is necessary
values[0]: collection_name values[1]: active_par2_filename
The name of this plugin is Unpack
The unpack component has made some progress
values[0]: collection_name values[1]: filename values[2]: progress
The unpack component has emit a message. This message mostly is the file which is currently extracted
values[0]: collection_name values[1]: filename values[2]: message
The unpack component is now unpacking from a new archive file
values[0]: collection_name values[1]: filename values[2]: new archive filename
NNTPGrab is licensed under the GPL2+ license:
Copyright (C) 2005-2010 Erik van Pienbroek
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
As of NNTPGrab 0.3 it is possible the create a website on which you can communicate with NNTPGrab. This is made possible by using a PHP module, which is written in the C programming language.
To enable this PHP module, you need to make sure you have the PHP development files installed on your Linux environment (mostly this is done by installing a package called php-devel). When you install NNTPGrab, you have to call the ./configure script with the argument --enable-php-module. This will automatically detect your PHP installation and compile/install the PHP module. A final step is necessary before you can use the functions provided by this module. You need to open your php.ini in a editor and add the line extension=nntpgrab.so to it. It is a good idea to restart your webserver at this point.
nntpgrab_connect - Connect to the NNTPGrab Server
mixed nntpgrab_connect(string $hostname, int $port, string $username, string $password, bool $use_ssl)
The parameters username, password and use_ssl are ignored in NNTPGrab version 0.3, but these will be used in a future version of NNTPGrab
Returns TRUE on success or a string containing an error message
Available since NNTPGrab 0.3
nntpgrab_get_is_connected - Retrieve the status of the connection to the NNTPGrab Server
boolean nntpgrab_get_is_connected
Returns TRUE when there is an active connection to the NNTPGrab Server
Available since NNTPGrab 0.3
nntpgrab_get_connect_errmsg - Returns the error message belonging to the last connection attempt done by nntpgrab_connect()
string nntpgrab_get_connect_errmsg
Returns the last known error message or the message "No error occured" if the last connection attempt was successfull
Available since NNTPGrab 0.3
nntpgrab_get_version_info - Returns several version numbers belonging to NNTPGrab
array nntpgrab_get_version_info
Returns an array with the following fields:
(
[glue_version]
[major_version]
[minor_version]
[micro_version]
[version]
)
Available since NNTPGrab 0.3
In version 0.5, the field api_version has been renamed to glue_version
nntpgrab_config_get_avail_servers - Retrieve a list of the available usenet servers
array nntpgrab_config_get_avail_servers()
Returns an array containing the servername's of all the available usenet server
Available since NNTPGrab 0.3
nntpgrab_config_get_server_info - Retrieve the configuration details about a specific usenet server
array nntpgrab_config_get_server_info(string $servername)
When the given servername isn't known, the value NULL is returned, otherwise an array containing the following elements is returned
(
[servername]
[hostname]
[port]
[username]
[password]
[max_threads]
[priority]
[use_ssl]
[enabled]
)
The contents of the field priority has one of the following values:
0 - High priority 1 - Normal priority 2 - Low priority
Available since NNTPGrab 0.3
nntpgrab_config_add_server - Add a new server to the NNTPGrab configuration
boolean nntpgrab_config_add_server(array $serverconfig)
Returns TRUE when the server was successfully added to the NNTPGrab configuration or FALSE when the given servername is already known.
The serverconfig array needs to have the following fields:
(
[servername]
[hostname]
[port]
[username]
[password]
[max_threads]
[priority]
[use_ssl]
[enabled]
)
The contents of the field priority needs to have one of the following values:
0 - High priority 1 - Normal priority 2 - Low priority
Available since NNTPGrab 0.3
nntpgrab_config_del_server - Remove a server from the NNTPGrab configuration
boolean nntpgrab_config_del_server(string $servername)
Returns TRUE when the server was successfully removed from the NNTPGrab configuration or FALSE when the given servername isn't known.
Available since NNTPGrab 0.3
nntpgrab_config_edit_server - Change the settings of a server
boolean nntpgrab_config_edit_server(string $original_servername, array $serverconfig)
Returns TRUE when the change was successfully performed or FALSE when the given original_servername isn't known.
The serverconfig array needs to have the following fields:
(
[servername]
[hostname]
[port]
[username]
[password]
[max_threads]
[priority]
[use_ssl]
[enabled]
)
The contents of the field priority needs to have one of the following values:
0 - High priority 1 - Normal priority 2 - Low priority
Available since NNTPGrab 0.3
nntpgrab_config_get_opts - Retrieve the basic configuration information from NNTPGrab
array nntpgrab_config_get_opts()
Returns an array containing the following fields:
(
[download_directory]
[temp_directory]
[enable_intelligent_par2_downloading]
[enable_auto_import]
[auto_import_directory]
[move_file_after_auto_import]
)
Available since NNTPGrab 0.3
The fields enable_auto_import, auto_import_directory and move_file_after_auto_import have been added in NNTPGrab 0.4
nntpgrab_config_set_opts - Change the basic configuration of NNTPGrab
boolean nntpgrab_config_set_opts(array $options)
Returns TRUE when the changes have been performed or FALSE when there was an error
The options array needs to have the following fields:
(
[download_directory]
[temp_directory]
[enable_intelligent_par2_downloading]
[enable_auto_import]
[auto_import_directory]
[move_file_after_auto_import]
)
Available since NNTPGrab 0.3
The fields enable_auto_import, auto_import_directory and move_file_after_auto_import have been added in NNTPGrab 0.4
nntpgrab_config_get_folder_listing - Retrieves a list containing all the sub-folders which are in the given folder
mixed nntpgrab_config_get_folder_listing(string $parent)
Returns FALSE when the given parent isn't known by the NNTPGrab Server or an array containing all the sub-folders which are in the given folder
Available since NNTPGrab 0.3
nntpgrab_schedular_start - Start the NNTPGrab schedular
boolean nntpgrab_schedular_start()
Returns TRUE when the schedular has been successfully started or FALSE when the schedular was already running or in a stopping state
Available since NNTPGrab 0.3
nntpgrab_schedular_stop - Stop the NNTPGrab schedular
nntpgrab_schedular_stop(boolean $wait)
If wait is FALSE, a request will be sent to the NNTPGrab Server to stop the schedular, but the function will not wait for the schedular to be really stopped. If wait is TRUE, this function will wait until the schedular is really stopped.
Available since NNTPGrab 0.3
nntpgrab_schedular_get_state - Retrieve the current state of the NNTPGrab schedular
int nntpgrab_schedular_get_state()
This function can return one of the following values:
0 - Schedular is running 1 - Schedular is stopping 2 - Schedular is stopped
Available since NNTPGrab 0.3
nntpgrab_schedular_add_task_to_queue - Add a new task (/file) to the download queue
boolean nntpgrab_schedular_add_task_to_queue(string $collection_name, string $subject, string $poster, int $timestamp, int $file_size, array $groups, array $parts)
Returns TRUE when the task has been successfully added or FALSE when there already is a task with the same subject in the same collection_name in the download queue
The file_size needs to be in bytes
The array groups contains a list of usenet groups in which this file is published
The array parts contains an array which has the following fields:
(
[0] => Array -- This block is representing one part. This block can occur multiple times
(
[message_id]
[partnum]
[size]
)
)
Available since NNTPGrab 0.3
nntpgrab_schedular_del_task_from_queue - Remove a task from the download queue
boolean nntpgrab_schedular_del_task_from_queue(string $collection_name, string $subject)
Returns TRUE when the task has been successfully removed or FALSE when the given collection_name and subject aren't known
Available since NNTPGrab 0.3
nntpgrab_schedular_restart_task - Restart a task
boolean nntpgrab_schedular_restart_task(string $collection_name, string $subject)
Returns TRUE when the task has been successfully restarted or FALSE when the given collection_name and subject aren't known
Available since NNTPGrab 0.3
nntpgrab_schedular_save_queue - Save the download queue
boolean nntpgrab_schedular_save_queue()
This function should be called after several new tasks have been added to the download queue
Returns TRUE when the save has been successful or FALSE when there was an error
Available since NNTPGrab 0.3
nntpgrab_schedular_get_all_tasks - Retrieve all the tasks in the download queue
array nntpgrab_schedular_get_all_tasks()
The array returned from this function contains a lot of data:
(
[0] => Array -- This block is representing one collection. This block can occur multiple times
(
[collection_name]
[total_size]
[total_size_remaining]
[files] => Array
(
[1] => Array -- This is representing one file. This block can occur multiple times
(
[subject]
[poster]
[stamp]
[file_size]
[file_size_remaining]
[num_parts_total]
[num_parts_downloaded]
[num_parts_failed]
[status]
[groups] => Array -- This is representing a list of usenet groups in which this file is published
(
[0]
)
)
)
)
)
The fields total_size and file_size mention the size in KB (kilobytes, 1024 bytes)
Possible values for the status are:
0 - Waiting for download 1 - Downloading 2 - Waiting for decoding 3 - Decoding 4 - Finished - complete 5 - Finished - incomplete 6 - Finished - no parts available 7 - Skipped
Available since NNTPGrab 0.3
The status'es Finished - incomplete and Finished - no parts available have been added in NNTPGrab 0.4
nntpgrab_schedular_move_task - Change the position and/or location of a task in the download queue
boolean nntpgrab_schedular_move_task(string $collection_name_src, string $subject_src, string $collection_name_dest, int $position_dest)
collection_name_src can be the same as collection_name_dest. If position_dest is -1, the file will be added to the end of the queue. If subject is empty, then position_dest will mean the position of all the collections in the download queue.
Available since NNTPGrab 0.3
nntpgrab_schedular_move_collection - Change the position of a collection in the download queue
boolean nntpgrab_schedular_move_collection(string $collection_name, int $new_position)
If new_position is -1, the file will be added to the end of the queue.
Available since NNTPGrab 0.3
nntpgrab_debug_get_messages - Retrieve the last 100 received debug messages
array nntpgrab_debug_get_messages()
Any debug messages that the NNTPGrab Server or the Glue layer can send will be buffered in the background by the PHP module. With this function it is possible to retrieve all the debug messages which are buffered. Only the last 100 received debug messages will be kept in the buffer
Available since NNTPGrab 0.3
nntpgrab_connections_get_speed_history - Retrieve the number of bytes received in the last 10 seconds
array nntpgrab_connections_get_speed_history()
The array returned contains the following data:
(
[history] => Array
(
[0]
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
)
[timestamp]
[average]
)
The timestamp is an unix timestamp
Available since NNTPGrab 0.4
nntpgrab_utils_strip_subject - Split a subject in various usable fields
array nntpgrab_utils_strip_subject(string $subject)
The array returned contains the following fields:
(
[subject]
[subject_without_partnum]
[file_num]
[total_files]
[filename]
[extension]
[file_type]
[par2_startnum]
[num_par2_blocks]
[part_num]
[total_parts]
)
Note that some fields can be missing. If a field is missing, it can't be detected in the given subject
Available since NNTPGrab 0.4
nntpgrab_utils_calculate_file_size - Returns the given file size in a human readable notation
string nntpgrab_utils_calculate_file_size(long filesize)
The filesize should be in KB (kilobytes)
Available since NNTPGrab 0.4
nntpgrab_utils_calculate_estimated_time_remaining - Make an estimation when a file with the given size will be completed
int nntpgrab_utils_calculate_estimated_time_remaining (array speed_history, int filesize)
The array speed_history should be the history part of the array returned by the function nntpgrab_connections_get_speed_history. The filesize is in KB (kilobytes). The value returned is the number of seconds necessary to complete the given file size
Available since NNTPGrab 0.4
nntpgrab_utils_get_readable_time_remaining - Returns the human readable notation of a given number of seconds
string nntpgrab_utils_get_readable_time_remaining (int time_remaining)
The value time_remaining is returned by the function nntpgrab_utils_calculate_estimated_time_remaining
Available since NNTPGrab 0.4
nntpgrab_utils_get_readable_finished_time - Returns the human readable notation of a given number of seconds relative to the current time
string nntpgrab_utils_get_readable_finished_time (int time_remaining)
The value time_remaining is returned by the function nntpgrab_utils_calculate_estimated_time_remaining
Available since NNTPGrab 0.4
As of NNTPGrab 0.6.0 the program is fully plugin based. This makes it very easy to add new functionality to the program. New functionality can be added in the form of seperate plugins. This documentation describes the steps needed to create a plugin suitable for NNTPGrab.
All plugins need to implement a number of functions. These functions need to be exported before the plugin can be loaded from the NNTPGrab Core:
void nntpgrab_plugin_initialize(NGPlugin *plugin_data) ngboolean nntpgrab_plugin_load(NGPlugin *plugin_data, char **errmsg) ngboolean nntpgrab_plugin_can_unload(NGPlugin *plugin_data, char **reason) void nntpgrab_plugin_unload(NGPlugin *plugin_data) void nntpgrab_plugin_destroy(NGPlugin *plugin_data) int nntpgrab_plugin_get_version(void)
The NGPlugin structure is defined in the file nntpgrab_core/nntpgrab_plugin.h. Plugins must include this file. The NGPlugin structure looks like this:
typedef struct _ng_plugin { GObject parent; NGPluginCoreData *core_data; NGPluginCoreFuncs core_funcs; gpointer priv; } NGPlugin;
This structure contains 4 fields.
The first field is GObject parent. This is used internally by GLib/GObject and must not be touched by plugins
The second field is NGPluginCoreData *core_data. This is a pointer to a structure containing internal plugin information which is maintained by the NNTPGrab Core. This structure also must not be touched by plugins
The third field is NGPluginCoreFuncs core_funcs. This structure contains pointers to various functions in the NNTPGrab Core. Plugins can call these functions to change the behaviour of the program
The fourth field is gpointer priv. Plugins can put any kind of data in this field
On startup of NNTPGrab, the program searches in the plugin folder for all the available plugins. This is done by searching files which implement all the functions which were listed above.
To retrieve information about the plugin, this function is called automatically. Must of the time, this function is implemented like this:
void nntpgrab_plugin_initialize(NGPlugin *plugin_data) { ng_plugin_set_name(plugin_data, "Example"); ng_plugin_set_version(plugin_data, "1.0"); ng_plugin_set_author(plugin_data, "Erik van Pienbroek"); ng_plugin_set_url(plugin_data, "https://www.nntpgrab.nl"); ng_plugin_set_description(plugin_data, "Example plugin which prints a message in the console every time a file is added"); }
If the plugin want to offer new functionality (functions) to the NNTPGrab Core or other plugins then the function ng_plugin_register_function() can be used here
If the plugin wants to use functionality (functions) from other plugins, then this can be indicated by using the function ng_plugin_set_required_function()
This is also the only place where the functions ng_plugin_register_function() and ng_plugin_set_required_function() can be used
This function will be called by the NNTPGrab Core when the plugin needs to be loaded and get ready to used. The function ng_plugin_connect_event() can be used here to connect to events.
If wanted, the plugin_data->priv field can be initialized here to something useful
NNTPGrab frontends can call this function to find out whether the plugin is performing a task at the moment.
If this is the case, the parameter char **reason can be set to a small comment about the active task and the value FALSE can be returned.
If the plugin isn't doing anything at the moment, the value TRUE can be returned
Whenever a plugin needs to be unloaded (because of program shutdown or on the user's request) this function will be called.
It's basically the reverse of the nntpgrab_plugin_load function. If the plugin_data->priv field was set, then it can be cleared here
It isn't necessary to unregister any event connections (done by ng_plugin_connect_event()) as that'll be automatically done by the NNTPGrab Core
On program shutdown, this function will be automatically called. Most plugins don't need to add any implementation to this function
The implementation of this function must be the same across all plugins. All that needs to happen is a return NNTPGRAB_PLUGIN_API_VERSION;. With this information, the NNTPGrab Core can find out if the plugin is using the same API version of the NNTPGrab Core is expecting. When an API mismatch is detected, the plugin will be ignored
Whenever a plugin want to use functionality from another plugin, a special function has to be used: ng_plugin_call()
This function expects a variable number of arguments. The first parameters (which are always required) are a pointer to an instance of the NGPlugin structure (which is used across all plugin functions) and a function name. Depending on the function which needs to be executed, zero or more additional arguments are needed.
If the function which needs to be executed has a return value, then it needs to be added as the last parameter to the ng_plugin_call() call.
To help the NNTPGrab Core in dependency resolving, any external function which will be used by the plugin needs to be registered with the ng_plugin_set_required_function() function in the [Plugin_development#nntpgrab_plugin_initialize|nntpgrab_plugin_initialize()]] function
Every function expects a different set of parameters. To find out what the right expected parameters are see the API documentation section
Plugins can emit events whenever something has occured. Other plugins can connect to these event by using the ng_plugin_connect_event() function
This function expects a pointer to an instance of the NGPlugin structure (which is used across all plugin functions), an event name and the name of the function which needs to be invoked whenever the event occurs.
Every event has a different set of arguments. To find out what the right expected parameters are see the API documentation section
For a list of functions which NNTPGrab plugins can use to communicate with other plugins, see the documentation for nntpgrab_plugin.h
This is a list of events which are exported by the NNTPGrab Core and other plugins. Plugins can connect to these events with the function ng_plugin_connect_event().
Something in the configuration has changed
void config_changed (NGPlugin *plugin_data, void *user_data)
The download of a part has just started
void part_download_start (NGPlugin *plugin_data, const char *servername, int conn_id, const char *collection_name, const char *subject, int part_num, void *user_data)
The download of a part has completed successfully
void part_done (NGPlugin *plugin_data, const char *servername, int conn_id, const char *collection_name, const char *subject, int part_num, int size, void *user_data)
The download of a part has failed (probably because the part isn't available on the server)
void part_failed (NGPlugin *plugin_data, const char *servername, int conn_id, const char *collection_name, const char *subject, int part_num, int size, ngboolean all_servers_tried, void *user_data)
Every second, traffic statistics about the last 10 seconds are given
void traffic_monitor_update (NGPlugin *plugin_data, int bytes_received1, int bytes_received2, int bytes_received3, int bytes_received4, int bytes_received5, int bytes_received6, int bytes_received7, int bytes_received8, int bytes_received9, int bytes_received10, guint64 stamp, double average, void *user_data)
Every 1/10th second of a part download, this message will be sent
void part_progress_update (NGPlugin *plugin_data, const char *servername, int conn_id, const char *subject, int part_num, int bytes_downloaded, int bytes_total, void *user_data)
A new collection was added
void collection_added (NGPlugin *plugin_data, const char *collection_name, const char *poster, void *user_data)
A collection was removed
void collection_removed (NGPlugin *plugin_data, const char *collection_name, void *user_data)
The poster of a collection was modified
void collection_modified (NGPlugin *plugin_data, const char *collection_name, const char *poster, void *user_data)
A file was added to a already existing collection
void file_added (NGPlugin *plugin_data, const char *collection_name, const char *subject, const char *poster, nguint64 stamp, nguint64 file_size, nguint64 total_size, nguint64 total_size_remaining, NGTaskState status, int num_parts, NGList *groups, void *user_data)
The groups argument is a list of newsgroups (const char*'s)
A file was removed from the download queue
void file_removed (NGPlugin *plugin_data, const char *collection_name, const char *subject, nguint64 total_size, nguint64 total_size_remaining, void *user_data)
The state of a file in the download queue has changed
void file_download_state_update (NGPlugin *plugin_data, const char *collection_name, const char *subject, int num_parts_total, int num_parts_done, int num_parts_failed, nguint64 file_size, nguint64 file_size_remaining, nguint64 total_size, nguint64 total_size_remaining, void *user_data)
A file in the download queue was restarted
void file_state_changed (NGPlugin *plugin_data, const char *collection_name, const char *subject, const char *real_filename, NGTaskState old_state, NGTaskState new_state, void *user_data)
A new connection is being made to a usenet server
void connection_connecting (NGPlugin *plugin_data, const char *servername, int conn_id, void *user_data)
A connection attempt has succeeded
void connection_connected (NGPlugin *plugin_data, const char *servername, int conn_id, const char *welcome_msg, void *user_data)
A connection to a usenet server was disconnected
void connection_disconnect (NGPlugin *plugin_data, const char *servername, int conn_id, NNTPDisconnectType disconnect_type, const char *msg, void *user_data)
The state of the schedular has changed
void schedular_state_changed (NGPlugin *plugin_data, NGSchedularState new_state, const char *reason, void *user_data)
A log message has been emitted
void log_message (NGPlugin *plugin_data, const char *component, NGLogLevel log_level, const char *msg, void *user_data)
The position of a task in the download queue has changed
void task_moved (NGPlugin *plugin_data, const char *orig_collection_name, const char *subject, const char *new_collection_name, int old_position, int new_position, void *user_data)
The position of a collection in the download queue has changed
void collection_moved (NGPlugin *plugin_data, const char *collection_name, int old_position, int new_position, void *user_data)
This message is emit when all the items in the download queue are completed
void all_downloads_completed (NGPlugin *plugin_data, void *user_data)
A plugin has been loaded
void plugin_loaded (NGPlugin *plugin_data, const char *plugin_name, ngboolean is_persistent, void *user_data)
A plugin has been unloaded
void plugin_unloaded (NGPlugin *plugin_data, const char *plugin_name, void *user_data)
A plugin has emit an event
void plugin_event (NGPlugin *plugin_data, const char *plugin_name, const char *event_name, const char **values)
The values parameter is a NULL-terminated array containing const char*'s
For a simple example plugin, see the file plugins/example/example.c. This is a very basic plugin which waits for the event file_added to occur. Whenever the event occurs, some parameters belonging to that specific event are printed in the console
This page contains several screenshots of NNTPGrab. If you've got more screenshots which you would like to add, feel free to send us an e-mail
All development of NNTPGrab takes places in a Subversion repository. The address of this repository is https://svn.openftd.org/svn/nntpgrab
In the repository the following layout is used:
/trunk - development of the next major version of NNTPGrab
/branches - bugfixes for stable releases of NNTPGrab
/tags - contains all releases of NNTPGrab
The code can be browsed by using the Repository link.
There's also a svnweb available at https://svn.openftd.org/viewvc/NNTPGrab/
NOTE: This documentation is obsolete and doesn't apply anymore to NNTPGrab 0.6.0 and higher. For documentation about remote controlling NNTPGrab 0.6.0 and higher, please see the JSON-RPC documentation
This document describes how any frontend can communicate to the backend over raw sockets. This makes it possible to control the NNTPGrab backend from another host.
The NNTPGrab Core listens on port 5423/tcp.
After making a connection to this port, the NNTPGrab Core replies with the following welcome message:
NNTPGrab Server - API version 20090505
The documentation on this wiki is all based on API version 20090505
The NNTPGrab protocol is a line based protocol. Every command should end with the newline character (\n).
When connecting, the client should send one of the following commands before further communication is possible:
MODE LISTENER
MODE COMMAND
OK
After this command, the socket is either broadcasting all the signals coming from the NNTPGrab Core or awaiting commands.
When an invalid command is entered, the server will send the response:
INVALID COMMAND
Returns a list of all the available usenet servers.
Notation:
CONFIG_GET_AVAIL_SERVERS
Response:
NULL
Example:
> CONFIG_GET_AVAIL_SERVERS < NewsZilla < NULL
Retrieve information about a specific usenet server. Returns NULL when the given servername isn't found
Notation:
CONFIG_GET_SERVER_INFO
Response:
NULL
NULL
Example:
> CONFIG_GET_SERVER_INFO NewsZilla < NewsZilla < newszilla.xs4all.nl < 119 < < < 3 < 1 < FALSE < TRUE < NULL
Add a new usenet server
Returns FALSE when the servername already exists
Notation:
CONFIG_ADD_SERVER\t \t \t \t \t \t \t \t
Response:
TRUE
FALSE
Example:
> CONFIG_ADD_SERVER NewsZilla newszilla.xs4all.nl 119 3 1 FALSE TRUE < TRUE
Remove a usenet server
Returns FALSE when the servername isn't known
Notation:
CONFIG_DEL_SERVER
Response:
TRUE
FALSE
Example:
> CONFIG_DEL_SERVER NewsZilla < TRUE
Changes the settings of a usenet server
Returns FALSE when the servername isn't known
Notation:
CONFIG_EDIT_SERVER\t \t \t \t \t \t \t \t \t
Response:
TRUE
FALSE
Example:
> CONFIG_EDIT_SERVER NewsZilla NewsZilla_IPV6 newszilla6.xs4all.nl 119 my_username my_pass 3 1 FALSE TRUE < TRUE
Retrieves the global settings of the NNTPGrab Core
Notation:
CONFIG_GET_OPTS
Response:
NULL
Example:
> CONFIG_GET_OPTS < /home/test/NNTPGrab/Downloads < /home/test/NNTPGrab/Temp < FALSE < TRUE < TRUE < /home/test/NNTPGrab/NZB < TRUE < TRUE < NULL
Changes the global settings of the NNTPGrab Core
Returns FALSE when one of the new settings are invalid
Notation:
CONFIG_SET_OPTS\t \t \t \t \t \t \t
Response:
TRUE
FALSE
Example:
> CONFIG_SET_OPTS /home/test/NNTPGrab/Downloads /home/test/NNTPGrab/Temp FALSE TRUE TRUE /home/test/NNTPGrab/NZB FALSE TRUE < TRUE
Retrieves a list containing all the sub-folders which are in the given folder.
Each result also contains a TRUE or FALSE mentioning if the sub-folders itself contains sub-folders
Notation:
CONFIG_GET_FOLDER_LISTING
Response:
FALSE
NULL
folder1\tTRUE folderX\tFALSE NULL
Example:
> CONFIG_GET_FOLDER_LISTING / < bin FALSE < etc TRUE < proc TRUE < sbin FALSE < usr TRUE < var TRUE < NULL
Start the NNTPGrab schedular
Returns FALSE when the schedular is already running
Notation:
SCHEDULAR_START
Response:
TRUE
FALSE
Example:
> SCHEDULAR_START < TRUE
Stop the NNTPGrab schedular
Returns FALSE when the schedular is already stopped
Notation:
SCHEDULAR_STOP
Response:
TRUE
FALSE
Example:
> SCHEDULAR_STOP TRUE < TRUE
Retrieves the current state of the schedular
Notation:
SCHEDULAR_GET_STATE
Response:
RUNNING
STOPPING
STOPPED
Example:
> SCHEDULAR_GET_STATE < STOPPED
Add a new task (file) to the download queue
When a file contains multiple groups or multiple parts, these need to be split using the | character. A part needs to be in the notation
Notation:
SCHEDULAR_ADD_TASK_TO_QUEUE\t \t \t \t \t \t
Response:
TRUE
FALSE
Example:
> SCHEDULAR_ADD_TASK_TO_QUEUE my collection my subject some poster 1199389869 123456789 alt.binaries.boneless|alt.binaries.nl,1,500| ,2,250 < FALSE The file already exists in the download queue
Removes a task from the download queue
Notation:
SCHEDULAR_DEL_TASK_FROM_QUEUE\t
Response:
TRUE
FALSE
Example:
> SCHEDULAR_DEL_TASK_FROM_QUEUE my collection my subject < TRUE
Restarts a task already present in the download queue
Notation:
SCHEDULAR_RESTART_TASK\t
Response:
TRUE
FALSE
Example:
> SCHEDULAR_RESTART my collection some other subject < FALSE File is not present in the given collection
Saves the download queue. This needs to be done after added new files to the download queue
Notation:
SCHEDULAR_SAVE_QUEUE
Response:
TRUE
FALSE
Example:
> SCHEDULAR_SAVE_QUEUE < TRUE
Returns all the collections and tasks present in the download queue
Notation:
SCHEDULAR_FOREACH_TASK
Response:
COLLECTION\t \t \t \tFILE \t \t \t \t \t \t \t \t \t \t (this list can be returned multiple times) NULL
Possible status'es:
WAITING_FOR_DOWNLOAD DOWNLOADING WAITING_FOR_DECODE DECODING FINISHED_COMPLETE FINISHED_INCOMPLETE FINISHED_NO_PARTS_AVAIL SKIPPED
Example:
> SCHEDULAR_FOREACH_TASK < COLLECTION my collection 12345678 100 3 < FILE my_subject some_poster 1199389869 0 1234567 1 100 10 0 WAITING_FOR_DOWNLOAD alt.binaries.boneless|alt.binaries.nl < FILE some_other_subject some poster 1199389900 100 565432 2 50 0 0 alt.binaries.x < COLLECTION some other collection 626832 200 < FILE another subject another poster 1199331624 1583632 200 1 10 0 0 alt.binaries.x < NULL
Change the position and/or location of a task in the download queue.
The collection_name_src can be the same as collection_name_dest. If the position is -1, the file will be added to the end of the queue. If subject is empty, then the position will mean the position of all the collections in the download queue.
Notation:
SCHEDULAR_MOVE_TASK\t \t \t
Response:
TRUE
FALSE
Example, change the position of a task within the same collection:
> SCHEDULAR_MOVE_TASK my collection my subject my collection 5 < TRUE
Example, move the task to another collection
> SCHEDULAR_MOVE_TASK my collection my subject another collection -1 < FALSE
Change the position of a collection in the download queue.
If the new_position is -1, the collection will be moved to the end of the queue.
Notation:
SCHEDULAR_MOVE_COLLECTION\t
Response:
TRUE
FALSE
Example
> SCHEDULAR_MOVE_COLLECTION my collection -1 < TRUE
While in the listener mode, all signals coming from the NNTPGrab Core are automatically broadcasted on the socket. These are the possible messages which the NNTPGrab Core can send.
Something in the configuration has changed
CONFIG_CHANGED
The download of a part has just started
PART_DOWNLOAD_START\t \t \t \t
The download of a part has completed successfully
PART_DONE\t \t \t \t \t
The download of a part has failed (probably because the part isn't available on the server
PART_FAILED\t \t \t \t \t \t
Every second, traffic statistics about the last 10 seconds are given
TRAFFIC_MONITOR_UPDATE\t \t \t \t \t \t \t \t \t \t \t
Every 10KB of a part download, this message will be sent
PART_PROGRESS_UPDATE\t \t \t \t \t
A new collection was added
COLLECTION_ADDED\t
A collection was removed
COLLECTION_REMOVED
The poster of a collection was modified
COLLECTION_MODIFIED\t
A file was added to a already existing collection. The
FILE_ADDED\t \t \t \t \t \t \t
A file was removed from the download queue
FILE_REMOVED\t \t \t
The state of a file in the download queue has changed
FILE_DOWNLOAD_STATE_UPDATE\t \t \t \t \t \t t\t \t
A file in the download queue was restarted
FILE_STATE_CHANGED\t \t \t \t
A new connection is being made to a usenet server
CONNECTION_CONNECTING\t
A connection attempt has succeeded
CONNECTION_CONNECTED\t \t
A connection to a usenet server was disconnected
CONNECTION_DISCONNECT\t \t \t
disconnect_type can be any of the following values:
NORMAL NO_SUCH_HOST CONNECTION_REFUSED TOO_MANY_CONNECTIONS CONNECT_TIMEOUT READ_ERROR READ_TIMEOUT WRITE_ERROR IDLE_TIMEOUT INVALID_MSG LOGIN_FAILURE ERROR_SSL_INITIALISE UNEXPECTED
The state of the schedular has changed
SCHEDULAR_STATE_CHANGED\t
A fatal error has occured
FATAL_ERROR
A warning has occured
WARNING_MESSAGE
A debug message has been emitted
DEBUG_MESSAGE
The position of a task in the download queue has changed
TASK_MOVED\t \t \t \t
The position of a collection in the download queue has changed
COLLECTION_MOVED\t \t
The PAR2 repair component has emit a message which can be shown to the user
PAR2_REPAIR_MESSAGE
This message is emit when all the items in the download queue are completed
ALL_DOWNLOADS_COMPLETED
The unpack component has made some progress
UNPACK_PROGRESS_UPDATE\t \t
The unpack component has emit a message. This message mostly is the file which is currently extracted
UNPACK_MESSAGE_RECEIVED\t \t
The unpack component is now unpacking from a new archive file
UNPACK_WORKING_ARCHIVE_CHANGED\t \t
A PAR2 verification (and if necessary repair) has just started
PAR2_BEGIN_VERIFY\t
A file is now being verified
PAR2_LOAD_PROGRESS_UPDATE\t \t \t
A PAR2 recovery file has been loaded completely
PAR2_RECOVERY_FILE_LOADED\t \t \t \t
A regular file has been loaded completely
PAR2_FILE_LOADED\t \t \t \t \t
The field state can be one of the following values:
MISSING FOUND DAMAGED NO_NEW_BLOCKS_FOUND
A PAR2 repair is now going on
PAR2_REPAIR_PROGRESS_UPDATE\t \t
The PAR2 repair has failed because there aren't enough recovery blocks available
PAR2_REPAIR_FAILURE\t \t
The PAR2 repair has completed successfully
PAR2_REPAIR_SUCCESS\t
All the files in the PAR2 set have been verified and no repair is necessary
PAR2_NO_REPAIR_REQUIRED\t
As of NNTPGrab version 0.3.2 there is a Ubuntu software repository available
containing NNTPGrab packages for the following Ubuntu releases:
This repository also contains several NNTPGrab subpackages so that you can
decide for yourself whether you want to use the webinterface or not.
Before you start, please download the file https://www.nntpgrab.nl/releases/ubuntu/gpg.key on your computer. The location doesn't matter
Start by opening the Synaptic Package Manager. This program can be found at System -> Administration.
Once Synaptics is started, choose Settings -> Repositories. Next go to the tab called Third-Party-Software and press the Add button.
Enter one of the following line is the dialog presented:
For Ubuntu 10.04 (Lucid, LTS)
deb https://www.nntpgrab.nl/releases/ubuntu lucid main
deb https://www.nntpgrab.nl/releases/ubuntu precise main
deb https://www.nntpgrab.nl/releases/ubuntu quantal main
deb https://www.nntpgrab.nl/releases/ubuntu raring main
deb https://www.nntpgrab.nl/releases/ubuntu saucy main
deb https://www.nntpgrab.nl/releases/ubuntu trusty main
deb https://www.nntpgrab.nl/releases/ubuntu utopic main
Press the Add source button now to add the repository.
Next go to the tab called Authentication and press the Import Key File button.
Select the file you downloaded at the beginning of this document and press OK.
You can now close the Software sources window by clicking the Close button.
If everything is okay, you now get a message mentioning it is recommended to reload now.
Do so by pressing the Reload button.
As soon as the Reload process is finished you can press the Search button and search for nntpgrab.
You should see several results now.
Normally it is sufficient to mark the package nntpgrab for installation, but
if you want you can also choose to only install some components (like the NNTPGrab Server).
When you've marked one or more packages ready for installation, press the Apply button. The program will now be installed.
You can now remove the gpg.key file which you've downloaded at the beginning of this document.
After the installation, you can close Synaptics and there should be one or more shortcuts for NNTPGrab in your Application -> Internet menu.
Future updates of NNTPGrab wil automatically be presented to you as an update as soon as they're published.
The instructions above only need to be done once.
If you want to help out testing unstable releases of NNTPGrab, you can repeat the above process, but use one of the following repository addresses:
For Ubuntu 10.04 (Lucid, LTS)
deb https://www.nntpgrab.nl/releases/ubuntu/testing lucid main
deb https://www.nntpgrab.nl/releases/ubuntu/testing precise main
deb https://www.nntpgrab.nl/releases/ubuntu/testing quantal main
deb https://www.nntpgrab.nl/releases/ubuntu/testing raring main
deb https://www.nntpgrab.nl/releases/ubuntu/testing saucy main
deb https://www.nntpgrab.nl/releases/ubuntu/testing trusty main
deb https://www.nntpgrab.nl/releases/ubuntu/testing utopic main
It isn't necessary to import the gpg.key file again
Our friends at Binaries4All have created a HOWTO explaining how the NNTPGrab program can be used. At the moment this HOWTO is only available in the Dutch language and can be found at https://www.binaries4all.nl/nntpgrab/
The latest stable version of NNTPGrab is version 0.7.2
This is a wiki for the NNTPGrab project. It is split in three main sections: a generic part, an user part and an developer part
Version history
Feature requests
License
Contact
User documentation
Using XAMPP and the NNTPGrab PHP module
Debugging crashes in NNTPGrab
If you want to help the development of NNTPGrab or extend it, documentation can be found here. If something is not clear enough on these pages, feel free to post a message on the forum
API Documentation
Control NNTPGrab using JSON-RPC
Control NNTPGrab using PHP
Control NNTPGrab using a custom TCP protocol (obsoleted)
Developing plugins
Developing on Mac OS X
Fonera port
eTrayz port
Help wanted
As of version 0.3 of NNTPGrab it is possible to control the program through a web-interface. To enable this web-interface you need to set up an webserver with PHP support. This document describes how to enable the web-interface using XAMPP.
XAMPP is a so-called WAMP program which contains the following software:First, you need to go to the XAMPP website and download the latest version of XAMPP. Next, install it.
After the installation is complete, you can download and install NNTPGrab. If you choose for the custom installation, you need to make sure the 'Webinterface' component gets installed.
Next, open the Windows Explorer and navigate to the folder where you've installed NNTPGrab (this is C:\Program Files\NNTPGrab by default). In it you will find several folders.
Next, you need to make a small adjustment to the PHP configuration file. This file can be found at C:\xampp\apache\bin\php.ini. Open this file in an editor (notepad for example) and search for a block of text containing 'extension=xxxx' rules. This should be around line number 600. You need to add a new line of text below the rest of the extension lines containing :
extension=php_nntpgrab.dll
Finally, start the XAMPP control panel and start/restart the Apache service. You're now ready to go and use your web browser to navigate to https://localhost to use the NNTPGrab webinterface