Commit f10f3716 authored by Nils Goroll's avatar Nils Goroll

add a demo database

parent 86162040
......@@ -81,6 +81,14 @@ instructions.
The classifier token is also referred to as DCS_KEY below.
Demo Database file
------------------
For demonstration purposes, we provice a simple database file with
some minimal and incomplete classification information in
`src/dcs_demo.db`. See :ref:using_the_demo_db for details.
PERFORMANCE
-----------
......@@ -187,6 +195,15 @@ required:
sh configure DCS_KEY=<key> DCS_ACCOUNT=<account-name>
.. _using_the_demo_db:
2c. Use the bundled demo Database.
We provide a very simple database for demonstration purposes.
::
sh configure DCS_KEY=demo DCS_DBFILE=dcs_demo.db
3. Run `make`
4. Optionally run `make install` to install at the default location
......@@ -263,6 +280,7 @@ VMOD USAGE - FUNCTIONS
To import the vmod, use
::
import dcs [from "path"] ;
.. _func_classify:
......
......@@ -50,13 +50,18 @@ fi
AC_ARG_VAR([DCS_ACCOUNT], [your netbiscuits account - optional, for online update only])
AC_ARG_VAR([DCS_DBFILE], [path to your DCS database file])
AC_CHECK_FILE([$DCS_DBFILE],
[],
[if test "x$DCS_ACCOUNT" = x; then
AC_MSG_ERROR([Need existing DCS_DBFILE if no DCS_ACCOUNT given])
fi
DCS_DBFILE=dcs.db
])
if test "x$DCS_DBFILE" = "xdcs_demo.db"; then
DCS_DBFILE=../dcs_demo.db
else
AC_CHECK_FILE([$DCS_DBFILE],
[],
[if test "x$DCS_ACCOUNT" = x; then
AC_MSG_ERROR([Need existing DCS_DBFILE or dcs_demo.db if no DCS_ACCOUNT given])
fi
DCS_DBFILE=dcs.db
])
fi
############################################################
## DEVELOPER flags etc
......
# <- file must start with a hashcross
#
# *Simple* DEMO Database for the dcs_classfier
#
# feel free to use this as a basis of your own classification database
# open source efforts are highly welcome - please publish your results
#
# Alternatively, commercial classification databases are available, see
# README.rst
#
# FORMAT
# ------
# vv tab
# substr type
# substr*substr*substr type
# !substr*substr type
# #
# substr is matched anywhere in the User-Agent header
# substr can contain spaces, but not tabs
# for a successful match on the entry, all substrs must match
# negative matches are marked with a !
#
# first match wins
#
# NOTE: At this point we need one entry for each type used in
# dcs_type.c - other than unidentified
#
# [NB_T_BOT] = "Bot",
# [NB_T_CAMERA] = "Camera",
# [NB_T_CE_DEVICE] = "CE-Device",
# [NB_T_COMPUTER] = "Computer",
# [NB_T_DESKTOP_BROWSER] = "Desktop-Browser",
# [NB_T_DEVTOOL] = "DevTool",
# [NB_T_EREADER] = "eReader",
# [NB_T_MEDIAPLAYER] = "MediaPlayer",
# [NB_T_MOBILECONSOLE] = "MobileConsole",
# [NB_T_MOBILE_BROWSER] = "Mobile-Browser",
# [NB_T_MOBILE_PHONE] = "Mobile Phone",
# [NB_T_OPERATINGSYSTEM] = "OperatingSystem",
# [NB_T_SETTOP_BOX_TV] = "Settop-Box, TV",
# [NB_T_TABLET] = "Tablet",
# [NB_T_UNIDENTIFIED] = "unidentified",
# [NB_T_WEARABLE_COMPUTER] = "wearable computer"
##
#
#
# Copyright (c) 2014 UPLEX - Nils Goroll Systemoptimierung
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS _AS IS_ AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#substr type
#substr*substr*substr type
#!substr*substr*substr type
#
# the first two entries are for the vtc tests
android*android*opera mini/ Mobile Phone
motorokr z6/r60_g_80.xx.yyi mozilla/4.0 (compatible; msie 6.0 linux; motorokr z6;nnn) profile/midp-2.0 configuration/cldc-1.1 opera 8.50[yy] up.link/6.3.0.0.0 netbiscuits Mobile Phone
iPad Tablet
iPhone Mobile Phone
iPod Mobile Phone
android 1.5; en-us; nimble CE-Device
Mozilla*Android*Glass wearable computer
android*chrome Mobile-Browser
BlackBerry Mobile Phone
webOS Mobile Phone
AU-MIC Mobile Phone
AUDIOVOX- Mobile Phone
Alcatel Mobile Phone
Blazer Mobile Phone
Danger hiptop Mobile Phone
DoCoMo/ Mobile Phone
Ericsson Mobile Phone
Googlebot-Mobile Mobile Phone
MSN Mobile Proxy Mobile Phone
Handheld Mobile Phone
Klondike Mobile Phone
LG- Mobile Phone
LGE- Mobile Phone
LGE Mobile Phone
MOT- Mobile Phone
NetFront Mobile Phone
Nokia Mobile Phone
Opera Mini Mobile Phone
PalmOS Mobile Phone
PalmSource Mobile Phone
Panasonic- Mobile Phone
SAGEM- Mobile Phone
SAMSUNG Mobile Phone
SGH- Mobile Phone
SHARP- Mobile Phone
SIE- Mobile Phone
Smartphone Mobile Phone
Symbian OS Mobile Phone
Windows CE Mobile Phone
portalmmm Mobile Phone
Profile/MIDP- Mobile Phone
UP.Link Mobile Phone
UP.Browser Mobile Phone
XV6875 Mobile Phone
htc Mobile Phone
amoi Mobile Phone
xda Mobile Phone
avantgo Mobile Phone
brew Mobile Phone
OpenWave Mobile Phone
Nintendo DSi MobileConsole
Windows-Media-Player MediaPlayer
QuickTime MediaPlayer
iTunes/ MediaPlayer
VLC media player MediaPlayer
MPlayer/ MediaPlayer
Songbird/ MediaPlayer
Googlebot-Image/ Bot
Googlebot-Video/ Bot
Googlebot/ Bot
Meidapartners-Google Bot
Coolpix Camera
macintosh*intel*mac os Computer
kindle eReader
google-site-verification Devtool
ios 4.2 OperatingSystem
windows*firefox Desktop Browser
googletv Settop-Box, TV
Android Mobile Phone
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment