BlocklistHelperScripts

Summary: Use the output available from Blocklist2 to build a better blocklist
Version:
Prerequisites:
Status:
Maintainer:
Categories: Obsolete

Blocklist2 is deprecated

Questions answered by this recipe

How can I use the output available from Blocklist2 to help me build a better blocklist?

Answer

Use some of the Blocklist Helper Scripts described in this document.

blockfindkeytermsΔ (a php command-line script, expects a text file argument, returns parsed text to standard output)
Attach:blocksuggest Δ (bash command-line script -- reads text file argument, returns parsed text to standard output)

The Scripts

  • These scripts are independent of PmWiki, and even of the Blocklisting software, although future cookbook recipes may incorporate them as a package.
  • Each script has different requirements, see their descriptions below (php as a CLI, bash scripting, applescript, etc.)

blockfindkeyterms

A configurable php content parser. Allows rudimentary text and regex filtering by the user. Open script in text editor to see the configurable options. Will be used in conjunction with other upcoming scripts or can be used in a pipeline (example below).

  ./blockfindkeyterms blockedcontent.txt | sed 's/^/block:/g' > outputfile.txt

blocksuggest

A bash script (*nix) for parsing blocked content. Suggests blocklist terms in "block:" format. Suggested usage:

  ./blocksuggest blockedcontent.txt > outputfile.txt

Command line scripts from PmWiki

You can call command line scripts before sending mail() to the admin, right from PmWiki, if your php installation allows it. You must have executable permissions on the scripts (rwxr-x--- for example, or chmod 700 filename, 750, etc.). It's suggested that you store them all in the same folder, outside of your website folder, so that you can easily link their behavior together. If you have username/public_html/pmwiki/ you might want these files in username/pmwikiscripts/blocklist/ for example. Scripts that interact with each other expect to be in the same folder together.

See Also

Blocklist2

Contributors

  • Crisses XES, 17-July-2005