Chapter 5. Common modules

Table of Contents
5.1. SFV module
5.1.1. Description
5.1.2. What is a SFV file ?
5.1.3. Installation
5.1.4. Parameters
5.1.5. Features
5.1.6. Available commands
5.2. TCL module
5.2.1. Description
5.2.2. Installation
5.2.3. Available TCL commands and variables
5.2.4. A complete example
5.3. Perl module
5.3.1. Description
5.3.2. Installation
5.3.3. Available PERL commands and variables
5.3.4. A complete example

5.1. SFV module

5.1.1. Description

This module comes with some utilities functions to handle sfv files, and associated files (diz, zip, etc).

When a SFV file is uploaded, server will create .missing files.

If the file is corrupted, a .bad file will be created.

HINT: when uploading dirs, be sure to upload SFV file first. The server will automatically check files as they are uploaded, and update a progress bar to quickly see how many percent are done.

NOTE to w_nd0ws users: although a (stupid) os can give you bad habits, files ARE CASE SENSITIVE !

5.1.2. What is a SFV file ?

A SFV file is a small verification file added to dirs, that stores records about a file or group of files integrity. When you compare a SFV file against a group of rar files it will check those rar files and tell you if they are complete or if they are "broken".

This is done by calculating a 32-bits checksum (*nix users already know md5 sums, this is similar - with a different algorithm).

5.1.3. Installation

Just add the line

module = /path/to/libwzd_sfv.so
in your config file.

5.1.4. Parameters

The following parameters are available, you can set them in the config file (don't forget the prefix param_).

  • sfv_progressmeter

    This dir is created during the upload, when the release isn't complete, to indicate the progression.

  • sfv_del_progressmeter

    This regex must match the progressmeter, and is used to find and delete it when the number of files has changed.

  • sfv_incomplete_indicator

    This will be a simlink created to indicate that the release isn't complete.

  • sfv_other_completebar

    This dir will be created when release is complete.

e.g:

param_sfv_progressmeter = [WzD] - %3d%% Complete - [WzD]

5.1.5. Features

  • When a SFV file is uploaded, an empty file is created for each name present in the SFV file, with '.missing' appended.

  • If a SFV file is present, each file uploaded (and present in sfv) is checked, and marqued as bad if checksums doesn't match (.missing are removed).

  • A "progress bar" is maintained after each upload, to inform on the progression of the upload. It uses the number of files to calculate percent.

  • A symbolic link is created to mark the upload as incomplete (and will be removed when complete).

  • When a zip file is uploaded, it is checked, and marqued as bad if corrupted.

  • When a diz file is uploaded, it is parsed, and the module tries to guess to number of files to be uploaded.

5.1.6. Available commands

  • site sfv check sfv_name

    Checks the specified sfv file. All missing or bad files will be marked as usual.

  • site sfv create sfv_name

    Creates a SFV file in current dir.