? COPYING
? INSTALL
Index: configfile.cc
===================================================================
RCS file: /usr/data/cvs/xapian/xapian-applications/omega/configfile.cc,v
retrieving revision 1.7
diff -u -w -r1.7 configfile.cc
--- configfile.cc	16 Sep 2004 00:00:28 -0000	1.7
+++ configfile.cc	28 Oct 2004 18:15:14 -0000
@@ -34,11 +34,11 @@
 
 #include "configfile.h"
 
-static string config_file = "/etc/omega.conf";
+static string config_file = "/rest/omega/omega.conf";
 
-string database_dir = "/var/lib/omega/data/";
-string template_dir = "/var/lib/omega/templates/";
-string log_dir = "/var/log/omega/";
+string database_dir = "/rest/omega/data/";
+string template_dir = "/rest/omega/templates/";
+string log_dir = "/rest/omega/log/";
 
 /** Return true if the file fname exists
  */
Index: omega.cc
===================================================================
RCS file: /usr/data/cvs/xapian/xapian-applications/omega/omega.cc,v
retrieving revision 1.41
diff -u -w -r1.41 omega.cc
--- omega.cc	16 Sep 2004 00:00:28 -0000	1.41
+++ omega.cc	28 Oct 2004 18:15:14 -0000
@@ -57,7 +57,7 @@
 
 string date_start, date_end, date_span;
 
-const string default_dbname = "default";
+const string default_dbname = "offline";
 
 string dbname;
 string fmtname = "query";
Index: omindex.cc
===================================================================
RCS file: /usr/data/cvs/xapian/xapian-applications/omega/omindex.cc,v
retrieving revision 1.48
diff -u -w -r1.48 omindex.cc
--- omindex.cc	25 Aug 2004 22:23:06 -0000	1.48
+++ omindex.cc	28 Oct 2004 18:15:14 -0000
@@ -67,7 +67,7 @@
 #define DUPE_ignore 0
 #define DUPE_replace 1
 #define DUPE_duplicate 2
-static int dupes = DUPE_replace;
+static int dupes = DUPE_ignore;
 static int recurse = 1;
 static string dbpath;
 static string root;
@@ -142,8 +142,8 @@
 		    lowercase_term(val);
 		    if (val.find("none") != string::npos ||
 			val.find("noindex") != string::npos) {
-			indexing_allowed = false;
-			throw true;
+			//indexing_allowed = false;
+			//throw true;
 		    }
 		}
 	    }
@@ -358,10 +358,12 @@
 	    // MyHtmlParser throws a bool to abandon parsing at </body> or when
 	    // indexing is disallowed
 	}
+/*
 	if (!p.indexing_allowed) {
 	    cout << "indexing disallowed by meta tag - skipping\n";
 	    return;
 	}
+*/
 	dump = p.dump;
 	title = p.title;
 	keywords = p.keywords;
@@ -404,6 +406,22 @@
 	    cout << "\"" << cmd << "\" failed - skipping\n";
 	    return;
 	}
+    } else if (mimetype == "application/msword") {
+	string cmd = "antiword " + shell_protect(file);
+	try {
+	    dump = stdout_to_string(cmd);
+	} catch (ReadError) {
+	    cout << "\"" << cmd << "\" failed - skipping\n";
+	    return;
+	}
+    } else if (mimetype == "text/x-perl") {
+	string cmd = "pod2text " + shell_protect(file);
+	try {
+	    dump = stdout_to_string(cmd);
+	} catch (ReadError) {
+	    cout << "\"" << cmd << "\" failed - skipping\n";
+	    return;
+	}
     } else {
 	// Don't know how to index this
 	cout << "unknown MIME type - skipping\n";
@@ -574,6 +592,10 @@
     mime_map["ps"] = "application/postscript";
     mime_map["eps"] = "application/postscript";
     mime_map["ai"] = "application/postscript";
+    mime_map["doc"] = "application/msword";
+    mime_map["pod"] = "text/x-perl";
+    mime_map["pm"] = "text/x-perl";
+    mime_map["pl"] = "text/x-perl";
 
     while ((getopt_ret = getopt_long(argc, argv, "hvd:D:U:M:l", longopts, NULL))!=EOF) {
 	switch (getopt_ret) {
@@ -597,6 +619,7 @@
 	    return 0;
 	case 'v':
 	    cout << OMINDEX << " (" << PACKAGE << ") " << VERSION << "\n"
+		 << "[with local modification to handle additional file types]\n"
 		 << "Copyright (c) 1999,2000,2001 BrightStation PLC.\n"
 		 << "Copyright (c) 2001 James Aylett\n"
 		 << "Copyright (c) 2001,2002 Ananova Ltd\n"
@@ -691,7 +714,7 @@
 	}
 	index_directory("/", mime_map);
 	for (Xapian::docid did = 1; did < updated.size(); ++did) {
-	    if (!updated[did]) {
+	    if (dupes == DUPE_replace && !updated[did]) {
 		try {
 		    db.delete_document(did);
 		    cout << "Deleted document #" << did << endl;
