pub / serci

Search the web with !keywords
git clone https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

config.php (17394B)


      1 <?php
      2 
      3 /* Define Search Engines
      4 *  Insert "%s" for the search-query part
      5 *  keywords are defined here as well. They may ONLY contain [A-Za-z0-9].
      6 */
      7 
      8 $searches = array(
      9     "archwiki" => array(
     10         "name" => "Arch Wiki",
     11         "website" => "https://wiki.archlinux.org",
     12         "query" => "https://wiki.archlinux.org/index.php?search=%s",
     13         "categories" => array("everything", "wiki", "linux"),
     14         "keywords" => array("archwiki", "arch", "aw")
     15     ),
     16     "base" => array(
     17         "name" => "BASE",
     18         "website" => "https://www.base-search.net",
     19         "query" => "https://www.base-search.net/Search/Results?lookfor=%s",
     20         "categories" => array("everything", "sci"),
     21         "keywords" => array("base", "basesearch", "science")
     22     ),
     23     "codeberg" => array(
     24         "name" => "Codeberg",
     25         "website" => "https://codeberg.org",
     26         "query" => "https://codeberg.org/explore/repos?q=%s",
     27         "categories" => array("everything", "code", "git"),
     28         "keywords" => array("codeberg", "cb")
     29     ),
     30     "cran" => array(
     31         "name" => "CRAN",
     32         "website" => "https://cran.r-project.org",
     33         "query" => "https://search.r-project.org/?P=%s",
     34         "categories" => array("everything", "code", "docu"),
     35         "keywords" => array("cran", "rcran", "r")
     36     ),
     37     "debianwiki" => array(
     38         "name" => "Debian Wiki",
     39         "website" => "https://wiki.debian.org",
     40         "query" => "https://wiki.debian.org/?action=fullsearch&value=%s",
     41         "categories" => array("everything", "wiki", "linux"),
     42         "keywords" => array("debianwiki", "debian", "deb", "dw")
     43     ),
     44     "deepl" => array(
     45         "name" => "DeepL (en-de)",
     46         "website" => "https://deepl.com",
     47         "query" => "https://www.deepl.com/translator#de/en/%s",
     48         "categories" => array("everything", "lang"),
     49         "keywords" => array("deepl")
     50     ),
     51     "dictcc" => array(
     52         "name" => "dict.cc",
     53         "website" => "https://dict.cc",
     54         "query" => "https://m.dict.cc/?s=%s",
     55         "categories" => array("everything", "lang"),
     56         "keywords" => array("dictcc", "dict", "translate", "tl")
     57     ),
     58     "dockerhub" => array(
     59         "name" => "dockerhub",
     60         "website" => "https://hub.docker.com",
     61         "query" => "https://hub.docker.com/search?q=%s",
     62         "categories" => array("everything", "software", "linux"),
     63         "keywords" => array("dockerhub", "docker", "dh")
     64     ),
     65     "duden" => array(
     66         "name" => "Duden",
     67         "website" => "https://www.duden.de",
     68         "query" => "https://www.duden.de/suchen/dudenonline/%s",
     69         "categories" => array("everything", "lang"),
     70         "keywords" => array("duden", "ger", "de")
     71     ),
     72     "fdroid" => array(
     73         "name" => "F-Droid",
     74         "website" => "https://f-droid.org",
     75         "query" => "https://search.f-droid.org/?q=%s",
     76         "categories" => array("everything", "software", "android"),
     77         "keywords" => array("fdroid", "droid", "fd", "android")
     78     ),
     79     "flathub" => array(
     80         "name" => "Flathub",
     81         "website" => "https://flathub.org",
     82         "query" => "https://flathub.org/apps/search?q=%s",
     83         "categories" => array("everything", "software", "linux"),
     84         "keywords" => array("flathub", "flatpak", "fh", "fp")
     85     ),
     86     "github" => array(
     87         "name" => "GitHub",
     88         "website" => "https://github.com",
     89         "query" => "https://github.com/search?q=%s",
     90         "categories" => array("everything", "code", "git"),
     91         "keywords" => array("github", "gh")
     92     ),
     93     "googlescholar" => array(
     94         "name" => "Google Scholar",
     95         "website" => "https://scholar.google.com",
     96         "query" => "https://scholar.google.com/scholar?q=%s",
     97         "categories" => array("everything", "sci"),
     98         "keywords" => array("googlescholar", "gscholar")
     99     ),
    100     "internetarchive" => array(
    101         "name" => "Internet Archive",
    102         "website" => "https://archive.org",
    103         "query" => "https://archive.org/search?query=%s",
    104         "categories" => array("everything", "archive"),
    105         "keywords" => array("internetarchive", "archive", "ia")
    106     ),
    107     "leo" => array(
    108         "name" => "LEO (en-de)",
    109         "website" => "https://leo.org",
    110         "query" => "https://dict.leo.org/englisch-deutsch/%s",
    111         "categories" => array("everything", "lang"),
    112         "keywords" => array("leo")
    113     ),
    114     "metagerimg" => array(
    115         "name" => "MetaGer Images",
    116         "website" => "https://metager.de/?focus=bilder",
    117         "query" => "https://metager.de/meta/meta.ger3?focus=bilder&eingabe=%s",
    118         "categories" => array("everything", "img", "meta"),
    119         "keywords" => array("metagerimg", "metaimg")
    120     ),
    121     "metagermap" => array(
    122         "name" => "MetaGer Maps",
    123         "website" => "https://metager.de/?fokus=maps",
    124         "query" => "https://maps.metager.de/en/%s/guess",
    125         "categories" => array("everything", "map"),
    126         "keywords" => array(
    127             "metagermap", "metagermaps", "mgmap", "metamap", "map", "maps"
    128         )
    129     ),
    130     "metagersci" => array(
    131         "name" => "MetaGer Science",
    132         "website" => "https://metager.de/?focus=science",
    133         "query" => "https://metager.de/meta/meta.ger3?focus=science&eingabe=%s",
    134         "categories" => array("everything", "sci", "meta"),
    135         "keywords" => array(
    136             "metagersci", "metagerscience", "metasci", "metascience"
    137         )
    138     ),
    139     "metagerweb" => array(
    140         "name" => "MetaGer Web",
    141         "website" => "https://metager.de/?focus=web",
    142         "query" => "https://metager.de/meta/meta.ger3?focus=web&eingabe=%s",
    143         "categories" => array("everything", "web", "meta"),
    144         "keywords" => array("metagerweb", "metager", "meta", "mg", "metaweb")
    145     ),
    146     "mojeekimg" => array(
    147         "name" => "Mojeek Images",
    148         "website" => "https://mojeek.com/images",
    149         "query" => "https://www.mojeek.com/search?fmt=images&q=%s",
    150         "categories" => array("everything", "img"),
    151         "keywords" => array("mojeekimg", "mjimg")
    152     ),
    153     "mojeekweb" => array(
    154         "name" => "Mojeek Web",
    155         "website" => "https://mojeek.com",
    156         "query" => "https://www.mojeek.com/search?q=%s",
    157         "categories" => array("everything", "web"),
    158         "keywords" => array("mojeekweb", "mojeek", "mj")
    159     ),
    160     "nonaimg" => array(
    161         "name" => "nona Images",
    162         "website" => "https://www.nona.de/bilder",
    163         "query" => "https://www.nona.de/bilder/?q=%s",
    164         "categories" => array("everything", "img"),
    165         "keywords" => array("nonaimg")
    166     ),
    167     "nonapod" => array(
    168         "name" => "nona Podcasts",
    169         "website" => "https://www.nona.de/podcasts",
    170         "query" => "https://www.nona.de/podcasts/?q=%s",
    171         "categories" => array("everything", "audio"),
    172         "keywords" => array("nonapod", "podcasts", "podcast", "pod")
    173     ),
    174     "nonavid" => array(
    175         "name" => "nona Videos",
    176         "website" => "https://www.nona.de/videos",
    177         "query" => "https://www.nona.de/videos/?q=%s",
    178         "categories" => array("everything", "vid"),
    179         "keywords" => array("nonavid")
    180     ),
    181     "nonaweb" => array(
    182         "name" => "nona Web",
    183         "website" => "https://www.nona.de",
    184         "query" => "https://www.nona.de/?q=%s",
    185         "categories" => array("everything", "web"),
    186         "keywords" => array("nonaweb", "nona")
    187     ),
    188     "npm" => array(
    189         "name" => "NPM",
    190         "website" => "https://www.npmjs.com",
    191         "query" => "https://www.npmjs.com/search?q=%s",
    192         "categories" => array("everything", "code", "docu"),
    193         "keywords" => array("npm", "npmjs", "node", "js")
    194     ),
    195     "oed" => array(
    196         "name" => "Oxford Dictionary",
    197         "website" => "https://www.oed.com",
    198         "query" => "https://www.oed.com/search/dictionary/?scope=Entries&q=%s",
    199         "categories" => array("everything", "lang"),
    200         "keywords" => array("oed", "oxford", "eng", "uk")
    201     ),
    202     "openstreetmap" => array(
    203         "name" => "OpenStreetMap",
    204         "website" => "https://www.openstreetmap.org",
    205         "query" => "https://www.openstreetmap.org/search?query=%s",
    206         "categories" => array("everything", "map"),
    207         "keywords" => array("openstreetmap", "osm")
    208     ),
    209     "php" => array(
    210         "name" => "PHP Manual",
    211         "website" => "https://www.php.net",
    212         "query" => "https://www.php.net/manual-lookup.php?pattern=%s",
    213         "categories" => array("everything", "docu"),
    214         "keywords" => array("php", "phpdoc", "phpdocs", "phpman", "phpmans")
    215     ),
    216     "pypi" => array(
    217         "name" => "PyPI",
    218         "website" => "https://pypi.org",
    219         "query" => "https://pypi.org/search/?q=%s",
    220         "categories" => array("everything", "code", "docu"),
    221         "keywords" => array("pypi", "python", "py")
    222     ),
    223     "qwantimg" => array(
    224         "name" => "Qwant Images",
    225         "website" => "https://qwant.com/?t=images",
    226         "query" => "https://www.qwant.com/?t=images&q=%s",
    227         "categories" => array("everything", "img"),
    228         "keywords" => array("qwantimg", "qwimg", "images", "image", "img")
    229     ),
    230     "qwantvideo" => array(
    231         "name" => "Qwant Videos",
    232         "website" => "https://qwant.com/?t=videos",
    233         "query" => "https://www.qwant.com/?t=videos&q=%s",
    234         "categories" => array("everything", "vid"),
    235         "keywords" => array("qwantvideo", "qwvid", "videos", "vids", "vid")
    236     ),
    237     "qwantweb" => array(
    238         "name" => "Qwant Web",
    239         "website" => "https://qwant.com/?t=web",
    240         "query" => "https://www.qwant.com/?t=web&q=%s",
    241         "categories" => array("everything", "web"),
    242         "keywords" => array("qwantweb", "qwant", "qw")
    243     ),
    244     "rottentomatoes" => array(
    245         "name" => "Rotten Tomatoes",
    246         "website" => "https://www.rottentomatoes.com",
    247         "query" => "https://www.rottentomatoes.com/search?search=%s",
    248         "categories" => array("everything", "vid"),
    249         "keywords" => array("rottentomatoes", "rt")
    250     ),
    251     "semanticscholar" => array(
    252         "name" => "Semantic Scholar",
    253         "website" => "https://semanticscholar.org",
    254         "query" => "https://semanticscholar.org/search?q=%s",
    255         "categories" => array("everything", "sci"),
    256         "keywords" => array("semanticscholar", "scholar", "literature")
    257     ),
    258     "sepiasearch" => array(
    259         "name" => "Sepia Search",
    260         "website" => "https://sepiasearch.org",
    261         "query" => "https://sepiasearch.org/search?search=%s",
    262         "categories" => array("everything", "vid", "fedi"),
    263         "keywords" => array(
    264             "sepiasearch", "sepia", "peertube", "pt"
    265         )
    266     ),
    267     "sourcehut" => array(
    268         "name" => "Sourcehut",
    269         "website" => "https://sr.ht",
    270         "query" => "https://sr.ht/projects?search=%s",
    271         "categories" => array("everything", "code", "git"),
    272         "keywords" => array("sourcehut", "srht", "sir")
    273     ),
    274     "stackoverflow" => array(
    275         "name" => "Stackoverflow",
    276         "website" => "https://stackoverflow.com",
    277         "query" => "https://stackoverflow.com/search?q=%s",
    278         "categories" => array("everything", "code", "forum"),
    279         "keywords" => array("stackoverflow", "so")
    280     ),
    281     "symbl" => array(
    282         "name" => "SYMBL",
    283         "website" => "https://symbl.cc",
    284         "query" => "https://symbl.cc/en/search/?q=%s",
    285         "categories" => array("everything", "misc"),
    286         "keywords" => array("symbl", "symbol", "unicode")
    287     ),
    288     "thedocumentfoundation" => array(
    289         "name" => "The Document Fdn.",
    290         "website" => "https://wiki.documentfoundation.org",
    291         "query" => "https://wiki.documentfoundation.org/index.php?title=Special%3ASearch&search=%s",
    292         "categories" => array("everything", "wiki"),
    293         "keywords" => array("thedocumentfoundation", "tdf", "libreoffice", "openoffice", "lo", "oo")
    294     ),
    295     "w3schools" => array(
    296         "name" => "W3schools", /* Google CSE (!) */
    297         "website" => "https://www.w3schools.com",
    298         "query" => "https://cse.google.com/cse?cx=c5f6ccbd4ce9405a8&q=%s",
    299         "categories" => array("everything", "docu", "learn"),
    300         "keywords" => array("w3schools", "w3school", "www", "w3s", "webdev")
    301     ),
    302     "waybackmachine" => array(
    303         "name" => "Wayback Machine",
    304         "website" => "https://web.archive.org",
    305         "query" => "https://web.archive.org/web/99999999000000*/%s",
    306         "categories" => array("everything", "archive"),
    307         "keywords" => array("waybackmachine", "webarchive", "wbm", "wb")
    308     ),
    309     "wikibookslatex" => array(
    310         "name" => "Wiki Books: LaTeX",
    311         "website" => "https://wikibooks.org/wiki/LaTeX",
    312         "query" => "https://wikibooks.org/wiki/Special:Search?prefix=LaTeX%2F&search=%s",
    313         "categories" => array("everything", "docu", "learn", "wiki"),
    314         "keywords" => array("wikibookslatex", "wblatex", "wbtex", "latex", "tex")
    315     ),
    316     "wikidata" => array(
    317         "name" => "Wikidata",
    318         "website" => "https://wikidata.org",
    319         "query" => "https://wikidata.org/w/index.php?title=Special%3ASearch&search=%s",
    320         "categories" => array("everything", "wiki"),
    321         "keywords" => array("wikidata", "wd")
    322     ),
    323     "wikimedia" => array(
    324         "name" => "Wikimedia Commons",
    325         "website" => "https://commons.wikimedia.org",
    326         "query" => "https://commons.wikimedia.org/w/index.php?title=Special%3AMediaSearch&search=%s",
    327         "categories" => array("everything", "wiki", "img"),
    328         "keywords" => array("wikimedia", "wi", "wm")
    329     ),
    330     "wikinews" => array(
    331         "name" => "Wikinews",
    332         "website" => "https://wikinews.org",
    333         "query" => "https://wikinews.org/w/index.php?title=Special%3ASearch&search=%s",
    334         "categories" => array("everything", "wiki", "news"),
    335         "keywords" => array("wikinews", "wn")
    336     ),
    337     "wikipedia" => array(
    338         "name" => "Wikipedia",
    339         "website" => "https://wikipedia.org",
    340         "query" => "https://wikipedia.org/w/index.php?title=Special%3ASearch&search=%s",
    341         "categories" => array("everything", "wiki"),
    342         "keywords" => array("wikipedia", "wiki", "wp", "wk")
    343     ),
    344     "wikisource" => array(
    345         "name" => "Wikisource",
    346         "website" => "https://wikisource.org",
    347         "query" => "https://wikisource.org/w/index.php?title=Special%3ASearch&search=%s",
    348         "categories" => array("everything", "wiki", "sci"),
    349         "keywords" => array("wikisource", "ws")
    350     ),
    351     "wikiversity" => array(
    352         "name" => "Wikiversity",
    353         "website" => "https://wikiversity.org",
    354         "query" => "https://wikiversity.org/w/index.php?title=Special%3ASearch&search=%s",
    355         "categories" => array("everything", "wiki", "sci"),
    356         "keywords" => array("wikiversity", "wv")
    357     ),
    358     "wikivoyage" => array(
    359         "name" => "Wikivoyage",
    360         "website" => "https://wikivoyage.org",
    361         "query" => "https://wikivoyage.org/w/index.php?title=Special%3ASearch&search=%s",
    362         "categories" => array("everything", "wiki", "map"),
    363         "keywords" => array("wikivoyage", "wt", "travel")
    364     ),
    365     "winehq" => array(
    366         "name" => "WINE HQ",
    367         "website" => "https://www-winehq.org",
    368         "query" => "https://www.winehq.org/search?q=%s",
    369         "categories" => array("everything", "wiki", "linux", "docu", "forum"),
    370         "keywords" => array("winehq", "wine")
    371     ),
    372     "youtube" => array(
    373         "name" => "YouTube",
    374         "website" => "https://www.youtube.com",
    375         "query" => "https://www.youtube.com/results?search_query=%s",
    376         "categories" => array("everything", "vid"),
    377         "keywords" => array("youtube", "yt")
    378     ),
    379 );
    380 
    381 /* Categories */
    382 $categories = array(
    383     "everything" => array(
    384         "name" => "All search engines",
    385     ),
    386     "meta" => array(
    387         "name" => "Meta search engines",
    388     ),
    389     "web" => array(
    390         "name" => "General web search",
    391     ),
    392     "img" => array(
    393         "name" => "Images"
    394     ),
    395     "vid" => array(
    396         "name" => "Videos"
    397     ),
    398     "audio" => array(
    399         "name" => "Audio"
    400     ),
    401     "map" => array(
    402         "name" => "Mapping and navigation"
    403     ),
    404     "lang" => array(
    405         "name" => "Languages and translation"
    406     ),
    407     "fedi" => array(
    408         "name" => "Fediverse"
    409     ),
    410     "sci" => array(
    411         "name" => "Science"
    412     ),
    413     "wiki" => array(
    414         "name" => "Wikis and encyclopedias"
    415     ),
    416     "linux" => array(
    417         "name" => "GNU+Linux"
    418     ),
    419     "android" => array(
    420         "name" => "Android"
    421     ),
    422     "code" => array(
    423         "name" => "Coding platforms"
    424     ),
    425     "git" => array(
    426         "name" => "GIT forges and repositories"
    427     ),
    428     "software" => array(
    429         "name" => "Software repositories"
    430     ),
    431     "forum" => array(
    432         "name" => "Forums and message boards"
    433     ),
    434     "learn" => array(
    435         "name" => "Learning"
    436     ),
    437     "docu" => array(
    438         "name" => "Documentation and manuals"
    439     ),
    440     "misc" => array(
    441         "name" => "Miscellaneous searches"
    442     ),
    443     "archive" => array(
    444         "name" => "Archives"
    445     )
    446 );
    447 
    448 /* Default Search Engine 
    449 *  Search Engine to use when no (known) keyword is given
    450 */
    451 $default_search = "qwantweb";
    452 
    453 /* Pre-generated mapping files */
    454 $searchkeys_file = "./config/keys_to_search.json";
    455 $searchcats_file = "./config/cats_to_search.json";
    456 
    457 ?>