Ejemplo n.º 1
0
        private static void PrintUsage()
        {
            VersionFu.PrintHeader();

            string usage =
                "Usage: beagrepd [OPTIONS]\n\n" +
                "Options:\n" +
                "  --foreground, --fg\tRun the daemon in the foreground.\n" +
                "  --background, --bg\tRun the daemon in the background.\n" +
                "  --backend\t\tConfigure which backends to use.  Specifically:\n" +
                "    --backend <name>\tOnly start backend 'name'\n" +
                "    --backend +<name>\tAdditionally start backend 'name'\n" +
                "    --backend -<name>\tDisable backend 'name'\n" +
                "  --replace\t\tReplace a running daemon with a new instance.\n" +
                "  --list-backends\tList all the available backends.\n" +
                "  --add-static-backend\tAdd a static backend by path.\n" +
                "  --help\t\tPrint this usage message.\n" +
                "  --version\t\tPrint version information.\n" +
                "\n" +
                "Advanced options:\n" +
                "  --debug\t\tWrite out debugging information.\n" +
                "  --mono-debug\t\tShow mono related debugging information.\n" +
                "  --debug-memory\tWrite out debugging information about memory use.\n" +
                "  --indexing-test-mode\tRun in foreground, and exit when fully indexed.\n" +
                "  --indexing-delay <t>\tWait 't' seconds before indexing.  (Default 60 seconds)\n" +
                "  --disable-scheduler\tDisable the use of the scheduler.\n" +
                "  --disable-text-cache\tDisable the use of the text cache used to provide snippets.\n";

            Console.WriteLine(usage);
        }
Ejemplo n.º 2
0
    public static int Main(string[] args)
    {
        if (Array.IndexOf(args, "--help") > -1)
        {
            VersionFu.PrintHeader();
            return(0);
        }

        if (Array.IndexOf(args, "--version") > -1)
        {
            VersionFu.PrintVersion();
            return(0);
        }

        ShutdownRequest request = new ShutdownRequest();

        try {
            request.Send();
        } catch {
            Console.WriteLine("ERROR: The Beagle daemon does not appear to be running");
            return(1);
        }

        return(0);
    }
Ejemplo n.º 3
0
        /////////////////////////////////////////////////////////////////

        static void PrintUsage()
        {
            VersionFu.PrintHeader();

            string usage =
                "Usage: beagrep-build-index [OPTIONS] --target <index_path> <path> [path]\n\n" +

                "** WARNING **\n" +
                "beagrep-build-index will *delete all existing data* within the target\n" +
                "directory.  Ensure that the target path is set correctly before running.\n\n" +

                "Options:\n" +
                "  --source [name]\t\tThe index's source name.  Defaults to the target directory name\n" +
                // FIXME: remap doesnt seem to be implemented !
                // Implementing remap might some fixes to --enable-deletion, see IndexWorker
                //"  --remap [path1:path2]\t\tRemap data paths to fit target. \n" +
                "  --tag [tag]\t\t\tTag index data for identification.\n" +
                "  --recursive\t\t\tCrawl source path recursivly.\n" +
                "  --enable-deletion\t\tRemove deleted files and directories from index.\n" +
                "                   \t\tIndex should be created and always updated with this option.\n" +
                "  --enable-text-cache\t\tBuild text-cache of documents used for snippets.\n" +
                "  --disable-directories\t\tDon't add directories to the index.\n" +
                "  --deny-directory-pattern\t\tKeep any directory and files under it matching this pattern from being indexed.\n" +
                "  --disable-filtering\t\tDisable all filtering of files. Only index attributes.\n" +
                "  --allow-pattern [pattern]\tOnly allow files that match the pattern to be indexed.\n" +
                "  --deny-pattern [pattern]\tKeep any files that match the pattern from being indexed.\n" +
                "  --disable-restart\t\tDon't restart when memory usage gets above a certain threshold.\n" +
                "  --disable-on-battery\t\tDisable indexer while on battery power.\n";

            Console.WriteLine(usage);
            Environment.Exit(0);
        }
Ejemplo n.º 4
0
    public static void PrintUsageAndExit()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: beagrep-query [OPTIONS] <query string>\n\n" +
            "Options:\n" +
            "  --verbose\t\tPrint detailed information about each hit.\n" +
            "  --cache\t\tShow the entire cached text instead of a snippet\n" +
            "         \t\tshowing the matches, requires --verbose.\n" +
            "         \t\tFor large documents this will produce extremely large output,\n" +
            "         \t\tso use this with uri queries or queries returning only a few results\n" +
            "         \t\tNot recommended for live-queries or stats-only queries.\n" +
            "  --keywords\t\tLists the keywords allowed in 'query string'.\n" +
            "            \t\tKeyword queries can be specified as keywordname:value e.g. ext:jpg\n" +
            "  --stats-only\t\tOnly display statistics about the query, not\n" +
            "              \t\tthe actual results.\n" +
            "  --max-hits\t\tLimit number of search results per backend\n" +
            "            \t\t(default 100)\n" +
            "\n" +
            "\n" +
            "  --help\t\tPrint this usage message.\n" +
            "  --version\t\tPrint version information.\n" +
            "\n" +
            "Query string supports an advanced query syntax.\n" +
            "For details of the query syntax, please see http://beagrep-project.org/Searching_Data\n" +
            "Note: Quotes (\" or \') need to be shell escaped if used.\n";

        Console.WriteLine(usage);

        System.Environment.Exit(0);
    }
Ejemplo n.º 5
0
        private static void PrintUsageAndExit()
        {
            VersionFu.PrintHeader();

            Console.WriteLine("USAGE: beagle-imlogviewer --client <CLIENT> [OPTIONS] <log file or directory>\n" +
                              "Options:\n" +
                              "  --client\t\t\tClient that the log belongs to (e.g. Pidgin).\n" +
                              "  --highlight-search\t\tWords to highlight in the buffer.\n" +
                              "  --search\t\t\tSearch query to filter hits on.\n" +
                              "  --help\t\t\tPrint this usage message.\n" +
                              "  --version\t\t\tPrint version information.\n");

            Environment.Exit(0);
        }
Ejemplo n.º 6
0
        public static void PrintUsageAndExit()
        {
            VersionFu.PrintHeader();

            string usage =
                "Usage: beagle-search [OPTIONS] [<query string>]\n\n" +
                "Options:\n" +
                "  --icon\t\t\tAdd an icon to the notification area rather than opening a search window.\n" +
                "  --search-docs\t\t\tAlso search the system-wide documentation index.\n" +
                "  --help\t\t\tPrint this usage message.\n" +
                "  --version\t\t\tPrint version information.\n";

            Console.WriteLine(usage);

            System.Environment.Exit(0);
        }
Ejemplo n.º 7
0
    static void PrintUsage()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: beagle-index-url <OPTIONS>\n\n" +
            "Options:\n" +
            "  --url URL\t\tURL for the web page being indexed.\n" +
            "  --title TITLE\t\tTitle for the web page.\n" +
            "  --sourcefile PATH\tFile containing content to index.\n" +
            "\t\t\tIf not set, content is read from STDIN.\n" +
            "  --deletesourcefile\tDelete file passed to --sourcefile after index.\n" +
            "  --help\t\tPrint this usage message.\n" +
            "  --version\t\tPrint version information.\n";

        Console.WriteLine(usage);
    }
Ejemplo n.º 8
0
    private static void PrintUsage()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: beagrep-removable-index --indexdir INDEXDIR --mount DIR\n" +
            "       beagrep-removable-index --indexdir INDEXDIR --unmount DIR\n" +
            "Options:\n" +
            "  --indexdir DIR\tSpecify the path to the index directory.\n" +
            "  --mount DIR \tTell beagrepd to load a removable index from the given directory.\n" +
            "  --umount DIR\tTell beagrepd to unload a removable index from the given directory.\n" +
            "               \tGive full path to the directory in the above options.\n\n" +
            "  --help\t\tPrint this usage message.\n" +
            "  --version\t\tPrint version information.\n";

        Console.WriteLine(usage);
    }
Ejemplo n.º 9
0
    static void PrintUsage()
    {
        VersionFu.PrintHeader ();

        Console.WriteLine ("Usage: beagle-extract-content [OPTIONS] file [file ...]");
        Console.WriteLine ();
        Console.WriteLine ("Options:");
        Console.WriteLine ("  --debug\t\t\tPrint debug info to the console");
        Console.WriteLine ("  --tokenize\t\t\tTokenize the text before printing");
        Console.WriteLine ("  --analyze\t\t\tAnalyze the text before printing.\n\t\t\t\tThis will output exactly the words, separated by whitespace, that go into beagle index.");
        Console.WriteLine ("  --show-generated\t\tShow filtering information for items created by filters");
        Console.WriteLine ("  --mimetype=<mime_type>\tUse filter for mime_type");
        Console.WriteLine ("  --outfile=<filename>\t\tOutput file name");
        Console.WriteLine ("  --help\t\t\tShow this message");
        Console.WriteLine ("  --version\t\t\tPrint version information");
        Console.WriteLine ();
    }
Ejemplo n.º 10
0
    public static void PrintUsageAndExit()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: beagle-settings-qt [OPTIONS]\n\n" +
            "Options:\n" +
            "--general    : Open the page with general options.(default)\n" +
            "--indexing   : Open the page with indexing specific options.\n" +
            "--backends   : Open the page with a list of backends to choose.\n" +
            "--networking : Open the page with networking related options.\n\n" +
            "--google     : OPen the page with google backend specific options.\n\n";

        Console.WriteLine(usage);

        System.Environment.Exit(0);
    }
Ejemplo n.º 11
0
    private static void PrintUsageAndExit()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: \n" +
            "     beagle-config [OPTIONS]\n" +
            " * to list sections:\n" +
            "     beagle-config --list-sections\n" +
            " * to list options in a section:\n" +
            "     beagle-config SECTION\n" +
            " * to view current values of an option:\n" +
            "     beagle-config SECTION SECTIONOPTION\n" +
            " * to change values of a boolean or a string options:\n" +
            "     beagle-config SECTION SECTIONOPTION VALUE\n" +
            " * to add values to a list option:\n" +
            "     beagle-config SECTION SECTIONOPTION PARAMS\n" +
            " * to remove a value from a list option:\n" +
            "     beagle-config SECTION SECTIONOPTION - PARAMS\n\n" +
            "Options:\n" +
            "  --list-sections\t\tList the available sections.\n" +
            "  --beagled-reload-config\tAsk the beagle daemon to reload\n" +
            "                         \tthe configuration file.\n" +
            "  --list-backends\t\tList the available backends.\n" +
            "\n" +
            "  Xml based operations:\n" +
            "  The following two methods can be used by non-C# programs to\n" +
            "  read and set config options.\n" +
            "  --write-xml SECTION\t\tPrint the section in xml format.\n" +
            "                     \t\tSuitable for parsing by other programs.\n" +
            "  --read-xml SECTION\t\tReads the xml of a section from stdin.\n" +
            "                    \t\tSuitable for setting options by other programs.\n" +
            "  In case of any error, the following error codes are returned:\n" +
            "     1 : Bad section name\n" +
            "     2 : Invalid xml\n" +
            "     3 : Xml does not correspond to the section name\n" +
            "\n" +
            "  --help\t\t\tPrint this usage message.\n" +
            "  --version\t\t\tPrint version information.\n\n";

        Console.WriteLine(usage);

        System.Environment.Exit(0);
    }
Ejemplo n.º 12
0
    public static void PrintUsageAndExit()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: beagle-query [OPTIONS] <query string>\n\n" +
            "Options:\n" +
            "  --verbose\t\tPrint detailed information about each hit.\n" +
            "  --cache\t\tShow the entire cached text instead of a snippet\n" +
            "         \t\tshowing the matches, requires --verbose.\n" +
            "         \t\tFor large documents this will produce extremely large output,\n" +
            "         \t\tso use this with uri queries or queries returning only a few results\n" +
            "         \t\tNot recommended for live-queries or stats-only queries.\n" +
            "  --keywords\t\tLists the keywords allowed in 'query string'.\n" +
            "            \t\tKeyword queries can be specified as keywordname:value e.g. ext:jpg\n" +
            "  --live-query\t\tRun continuously, printing notifications if a\n" +
            "              \t\tquery changes.\n" +
            "  --stats-only\t\tOnly display statistics about the query, not\n" +
            "              \t\tthe actual results.\n" +
            "  --max-hits\t\tLimit number of search results per backend\n" +
            "            \t\t(default 100)\n" +
            "  --raw-uri\t\tDisplay the actual (unescaped) uri used internally.\n" +
            "           \t\tOnly use this form of the uri in uri queries.\n" +
            "\n" +
            "  --domain <local|system|network|global|all> Specify query domain (default local + system)\n" +
            "\n" +
            "  --flood\t\tExecute the query over and over again.  Don't do that.\n" +
            "  --listener\t\tExecute an index listener query.  Don't do that either.\n" +
            "  --help\t\tPrint this usage message.\n" +
            "  --version\t\tPrint version information.\n" +
            "\n" +
            "Query string supports an advanced query syntax.\n" +
            "For details of the query syntax, please see http://beagle-project.org/Searching_Data\n" +
            "Note: Quotes (\" or \') need to be shell escaped if used.\n";

        Console.WriteLine(usage);

        System.Environment.Exit(0);
    }
Ejemplo n.º 13
0
    public static void PrintUsageAndExit()
    {
        VersionFu.PrintHeader();

        string usage =
            "Usage: beagle-info <OPTIONS>\n\n" +
            "Options:\n" +
            "  --daemon-version\t\tPrint the version of the running daemon.\n" +
            "  --status\t\t\tDisplay status of the running daemon.\n" +
            "  --index-info\t\t\tDisplay statistics of the Beagle indexes.\n" +
            "  --is-indexing\t\t\tDisplay whether the indexer is currently active.\n" +
            "  --all-info\t\t\tAll of the above information.\n" +
            "  --list-backends\t\tList the currently available backends.\n" +
            "  --list-filters\t\tList the currently available filters.\n" +
            "  --list-static-indexes\t\tList the available static indexes.\n" +
            "  --help\t\t\tPrint this usage message.\n" +
            "  --version\t\t\tPrint version information.\n";

        Console.WriteLine(usage);

        System.Environment.Exit(0);
    }