1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[rewrite] Update prefixes

This commit is contained in:
Guido Cella 2020-07-05 05:58:25 +02:00
parent bde596ab67
commit 0d8d834af3

View File

@ -117,86 +117,74 @@ static union option_info uri_rewrite_options[] = {
INIT_OPT_DUMB_PREFIX("bz", ELINKS_BUGS_URL), INIT_OPT_DUMB_PREFIX("bz", ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX("bug", ELINKS_BUGS_URL), INIT_OPT_DUMB_PREFIX("bug", ELINKS_BUGS_URL),
INIT_OPT_DUMB_PREFIX("arc", "http://web.archive.org/web/*/%c"), INIT_OPT_DUMB_PREFIX("arc", "https://web.archive.org/web/*/%c"),
INIT_OPT_DUMB_PREFIX("cia", "http://cia.vc/"), INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org/bin/Dict"),
INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org"), INIT_OPT_DUMB_PREFIX("ddg", "https://lite.duckduckgo.com/lite"),
INIT_OPT_DUMB_PREFIX("ddg", "http://duckduckgo.com/?t=elinks"), INIT_OPT_DUMB_PREFIX("g", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX("g", "http://www.google.com/"), INIT_OPT_DUMB_PREFIX("gg", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX("gg", "http://www.google.com/"), INIT_OPT_DUMB_PREFIX("go", "https://www.google.com"),
INIT_OPT_DUMB_PREFIX("go", "http://www.google.com/"), INIT_OPT_DUMB_PREFIX("fm", "http://freshmeat.sourceforge.net"),
INIT_OPT_DUMB_PREFIX("fm", "http://freshmeat.net/"), INIT_OPT_DUMB_PREFIX("sf", "https://sourceforge.net"),
INIT_OPT_DUMB_PREFIX("sf", "http://www.sourceforge.net/"), INIT_OPT_DUMB_PREFIX("dbug", "https://www.debian.org/Bugs/"),
INIT_OPT_DUMB_PREFIX("dbug", "http://bugs.debian.org/"), INIT_OPT_DUMB_PREFIX("dpkg", "https://www.debian.org/distrib/packages"),
INIT_OPT_DUMB_PREFIX("dpkg", "http://packages.debian.org/"), INIT_OPT_DUMB_PREFIX("lua", "file:///usr/share/doc/lua/contents.html#index"),
/* Hm, is this Debian-centric? -- Miciah */ INIT_OPT_DUMB_PREFIX("pycur", "https://www.python.org/doc/"),
/* Well, does anyone but Debian use lua40 naming convention? --pasky */ INIT_OPT_DUMB_PREFIX("pydev", "https://docs.python.org/dev/"),
/* lua5.1 may be a more standard format. --KON */ INIT_OPT_DUMB_PREFIX("e2", "https://www.everything2.org"),
INIT_OPT_DUMB_PREFIX("lua", "file:///usr/share/doc/lua5.1-doc/doc/contents.html#index"), INIT_OPT_DUMB_PREFIX("sd", "https://slashdot.org/"),
INIT_OPT_DUMB_PREFIX("pycur", "http://www.python.org/doc/current/"), INIT_OPT_DUMB_PREFIX("vhtml", "https://validator.w3.org/nu/?doc=%c"),
INIT_OPT_DUMB_PREFIX("pydev", "http://www.python.org/dev/doc/devel/"), INIT_OPT_DUMB_PREFIX("vcss", "https://jigsaw.w3.org/css-validator/validator?uri=%c"),
INIT_OPT_DUMB_PREFIX("e2", "http://www.everything2.org/"),
INIT_OPT_DUMB_PREFIX("sd", "http://slashdot.org/"),
INIT_OPT_DUMB_PREFIX("vhtml", "http://validator.w3.org/check?uri=%c"),
INIT_OPT_DUMB_PREFIX("vcss", "http://jigsaw.w3.org/css-validator/validator?uri=%c"),
#define INIT_OPT_SMART_PREFIX(prefix, uri) \ #define INIT_OPT_SMART_PREFIX(prefix, uri) \
INIT_OPT_STRING("protocol.rewrite.smart", NULL, prefix, 0, uri, NULL) INIT_OPT_STRING("protocol.rewrite.smart", NULL, prefix, 0, uri, NULL)
#define bugzilla_prefix(prefix) (ELINKS_BUGS_URL prefix)
INIT_OPT_SMART_PREFIX("bug", bugzilla_prefix("show_bug.cgi?id=%s")), INIT_OPT_SMART_PREFIX("arc", "https://web.archive.org/web/*/%s"),
INIT_OPT_SMART_PREFIX("aur", "https://aur.archlinux.org/packages/?K=%s"),
#ifdef CONFIG_DEBUG INIT_OPT_SMART_PREFIX("aw", "https://wiki.archlinux.org/index.php?search=%s"),
INIT_OPT_SMART_PREFIX("milestone-bugs", bugzilla_prefix("buglist.cgi?target_milestone=%s")), INIT_OPT_SMART_PREFIX("bug", ELINKS_BUGS_URL "?q=is:issue+%s"),
INIT_OPT_SMART_PREFIX("search-bugs", bugzilla_prefix("buglist.cgi?short_desc_type=allwordssubstr&short_desc=%s")), INIT_OPT_SMART_PREFIX("cambridge", "https://dictionary.cambridge.org/dictionary/english/%s"),
#endif
INIT_OPT_SMART_PREFIX("arc", "http://web.archive.org/web/*/%s"),
INIT_OPT_SMART_PREFIX("cambridge", "http://dictionary.cambridge.org/results.asp?searchword=%s"),
INIT_OPT_SMART_PREFIX("cliki", "http://www.cliki.net/site/search?words=%s"), INIT_OPT_SMART_PREFIX("cliki", "http://www.cliki.net/site/search?words=%s"),
INIT_OPT_SMART_PREFIX("d", "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"), INIT_OPT_SMART_PREFIX("d", "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"),
INIT_OPT_SMART_PREFIX("ddg", "http://duckduckgo.com/?q=%s&t=elinks"), INIT_OPT_SMART_PREFIX("ddg", "https://duckduckgo.com/lite?q=%s"),
INIT_OPT_SMART_PREFIX("dmoz", "http://search.dmoz.org/cgi-bin/search?search=%s"),
INIT_OPT_SMART_PREFIX("foldoc", "http://foldoc.org/?%s"), INIT_OPT_SMART_PREFIX("foldoc", "http://foldoc.org/?%s"),
INIT_OPT_SMART_PREFIX("g", "http://www.google.com/search?q=%s&btnG=Google+Search"), INIT_OPT_SMART_PREFIX("g", "https://www.google.com/search?q=%s"),
/* Whose idea was it to use 'gg' for websearches? -- Miciah */ /* Whose idea was it to use 'gg' for websearches? -- Miciah */
/* INIT_OPT_SMART_PREFIX("gg", "http://groups.google.com/groups?q=%s"), */ /* INIT_OPT_SMART_PREFIX("gg", "https://groups.google.com/forum/#!search/%s"), */
INIT_OPT_SMART_PREFIX("gg", "http://www.google.com/search?q=%s&btnG=Google+Search"), INIT_OPT_SMART_PREFIX("gg", "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("gi", "http://images.google.com/images?q=%s"), INIT_OPT_SMART_PREFIX("gi", "https://www.google.com/search?q=%s&tbm=isch"),
INIT_OPT_SMART_PREFIX("gn", "http://news.google.com/news?q=%s"), INIT_OPT_SMART_PREFIX("gn", "https://news.google.com/search?q=%s&hl=en-US&gl=US&ceid=US:en"),
INIT_OPT_SMART_PREFIX("go", "http://www.google.com/search?q=%s&btnG=Google+Search"), INIT_OPT_SMART_PREFIX("go", "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("gr", "http://groups.google.com/groups?q=%s"), INIT_OPT_SMART_PREFIX("gr", "https://groups.google.com/forum/#!search/%s"),
INIT_OPT_SMART_PREFIX("google", "http://www.google.com/search?q=%s"), INIT_OPT_SMART_PREFIX("google", "https://www.google.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("gwho", "http://www.googlism.com/search/?ism=%s&type=1"), INIT_OPT_SMART_PREFIX("gwho", "http://www.googlism.com/search/?ism=%s&type=1"),
INIT_OPT_SMART_PREFIX("gwhat", "http://www.googlism.com/search/?ism=%s&type=2"), INIT_OPT_SMART_PREFIX("gwhat", "http://www.googlism.com/search/?ism=%s&type=2"),
INIT_OPT_SMART_PREFIX("gwhere", "http://www.googlism.com/search/?ism=%s&type=3"), INIT_OPT_SMART_PREFIX("gwhere", "http://www.googlism.com/search/?ism=%s&type=3"),
INIT_OPT_SMART_PREFIX("gwhen", "http://www.googlism.com/search/?ism=%s&type=4"), INIT_OPT_SMART_PREFIX("gwhen", "http://www.googlism.com/search/?ism=%s&type=4"),
INIT_OPT_SMART_PREFIX("fm", "http://freshmeat.net/search/?q=%s"), INIT_OPT_SMART_PREFIX("savannah", "https://savannah.nongnu.org/search/?words=%s&type_of_search=soft&exact=1"),
INIT_OPT_SMART_PREFIX("savannah", "http://savannah.nongnu.org/search/?words=%s&type_of_search=soft&exact=1"), INIT_OPT_SMART_PREFIX("sf", "https://sourceforge.net/search/?q=%s"),
INIT_OPT_SMART_PREFIX("sf", "http://sourceforge.net/search/?q=%s"), INIT_OPT_SMART_PREFIX("sfp", "https://sourceforge.net/projects/%s"),
INIT_OPT_SMART_PREFIX("sfp", "http://sourceforge.net/projects/%s"), INIT_OPT_SMART_PREFIX("dbug", "https://bugs.debian.org/%s"),
INIT_OPT_SMART_PREFIX("dbug", "http://bugs.debian.org/%s"), INIT_OPT_SMART_PREFIX("dpkg", "https://packages.debian.org/search?keywords=%s"),
INIT_OPT_SMART_PREFIX("dpkg", "http://packages.debian.org/%s"), INIT_OPT_SMART_PREFIX("emacs", "https://www.emacswiki.org/emacs?match=%s&pages=on&permanentanchors=on"),
INIT_OPT_SMART_PREFIX("emacs", "http://www.emacswiki.org/cgi-bin/wiki.pl?search=%s"), INIT_OPT_SMART_PREFIX("onelook", "https://onelook.com/?w=%s"),
INIT_OPT_SMART_PREFIX("lxr", "http://lxr.linux.no/ident?i=%s"), INIT_OPT_SMART_PREFIX("e2", "https://www.everything2.org/?node=%s"),
INIT_OPT_SMART_PREFIX("onelook", "http://onelook.com/?w=%s&ls=a"), INIT_OPT_SMART_PREFIX("encz", "https://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=0&ecd_lines=15&ecd_hptxt=0"),
INIT_OPT_SMART_PREFIX("e2", "http://www.everything2.org/?node=%s"), INIT_OPT_SMART_PREFIX("czen", "https://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=1&ecd_lines=15&ecd_hptxt=0"),
INIT_OPT_SMART_PREFIX("encz", "http://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=0&ecd_lines=15&ecd_hptxt=0"), INIT_OPT_SMART_PREFIX("dict", "https://dictionary.reference.com/search?q=%s"),
INIT_OPT_SMART_PREFIX("czen", "http://www.slovnik.cz/bin/ecd?ecd_il=1&ecd_vcb=%s&ecd_trn=translate&ecd_trn_dir=1&ecd_lines=15&ecd_hptxt=0"), INIT_OPT_SMART_PREFIX("thes", "https://www.thesaurus.com/browse/%s"),
INIT_OPT_SMART_PREFIX("dict", "http://dictionary.reference.com/search?q=%s"), INIT_OPT_SMART_PREFIX("a", "https://www.acronymfinder.com/~/search/af.aspx?String=exact&Acronym=%s"),
INIT_OPT_SMART_PREFIX("thes", "http://thesaurus.reference.com/search?q=%s"), INIT_OPT_SMART_PREFIX("imdb", "https://www.imdb.com/find?q=%s"),
INIT_OPT_SMART_PREFIX("a", "http://www.acronymfinder.com/af-query.asp?String=exact&Acronym=%s"), INIT_OPT_SMART_PREFIX("mw", "https://www.merriam-webster.com/dictionary?s=%s"),
INIT_OPT_SMART_PREFIX("imdb", "http://www.imdb.com/find?q=%s"), INIT_OPT_SMART_PREFIX("mwt", "https://www.merriam-webster.com/thesaurus/%s"),
INIT_OPT_SMART_PREFIX("mw", "http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=%s"), INIT_OPT_SMART_PREFIX("wiki", "https://en.wikipedia.org/w/index.php?search=%s"),
INIT_OPT_SMART_PREFIX("mwt", "http://www.m-w.com/cgi-bin/thesaurus?book=Thesaurus&va=%s"),
INIT_OPT_SMART_PREFIX("wiki", "http://en.wikipedia.org/w/wiki.phtml?search=%s"),
INIT_OPT_SMART_PREFIX("wn", "http://wordnetweb.princeton.edu/perl/webwn?s=%s"), INIT_OPT_SMART_PREFIX("wn", "http://wordnetweb.princeton.edu/perl/webwn?s=%s"),
/* Search the Free Software Directory */ /* Search the Free Software Directory */
INIT_OPT_SMART_PREFIX("fsd", "http://directory.fsf.org/wiki?title=Special%3ASearch&search=%s"), INIT_OPT_SMART_PREFIX("fsd", "https://directory.fsf.org/wiki?title=Special%3ASearch&search=%s"),
/* rfc by number */ /* rfc by number */
INIT_OPT_SMART_PREFIX("rfc", "http://www.rfc-editor.org/rfc/rfc%s.txt"), INIT_OPT_SMART_PREFIX("rfc", "https://www.rfc-editor.org/rfc/rfc%s.txt"),
/* rfc search */ /* rfc search */
INIT_OPT_SMART_PREFIX("rfcs", "http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=%s&filefmt=txt&format=http&abstract=abson&keywords=keyon&num=25"), INIT_OPT_SMART_PREFIX("rfcs", "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s"),
INIT_OPT_SMART_PREFIX("cr", "http://www.rfc-editor.org/cgi-bin/rfcsearch.pl?searchwords=%s&filefmt=txt&format=http&abstract=abson&keywords=keyon&num=25"), INIT_OPT_SMART_PREFIX("cr", "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s"),
NULL_OPTION_INFO, NULL_OPTION_INFO,
}; };