<commit_before>#!/bin/bash

GLIB_DOCS="/usr/share/doc/libglib2.0-doc/glib/api-index-full.html"
PHP_DOCS=~/docs/php-5.6/php-chunked-xhtml/indexes.html
LINKS="links"

main()
{
    source_file="$1"
    search_keyword="$2"

    if [ "x$source_file" = "x" ]
    then
        echo "Usage: $0 source_file [search_keyword]" >&2
        return 1
    fi

    language=$(guess_language "$source_file")
    [ "x$language" != "x" ] || return 1

    if [ "x$search_keyword" != "x" ]
    then
        case "$language" in
            "c"|"cpp")
                lookup_in_man || lookup_in_glib_docs
                return $?
                ;;
            "php")
                lookup_in_php_docs
                return $?
                ;;
            *)
                google_it
                return $?<commit_msg>vim_lookup_docs: update index file name in PHP docs<commit_after>#!/bin/bash

GLIB_DOCS="/usr/share/doc/libglib2.0-doc/glib/api-index-full.html"
PHP_DOCS=~/docs/php-5.6/indexes.functions.html
LINKS="links"

main()
{
    source_file="$1"
    search_keyword="$2"

    if [ "x$source_file" = "x" ]
    then
        echo "Usage: $0 source_file [search_keyword]" >&2
        return 1
    fi

    language=$(guess_language "$source_file")
    [ "x$language" != "x" ] || return 1

    if [ "x$search_keyword" != "x" ]
    then
        case "$language" in
            "c"|"cpp")
                lookup_in_man || lookup_in_glib_docs
                return $?
                ;;
            "php")
                lookup_in_php_docs
                return $?
                ;;
            *)
                google_it
                return $?
{'fraction_non_alphanumeric': 0.1398046398046398, 'fraction_numerical': 0.01221001221001221, 'mean_word_length': 1.6182108626198084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2330343', 'n_tokens_mistral': 587, 'n_tokens_neox': 543, 'n_words': 91}