shortcut-links-0.5.1.1: Link shortcuts for use in text markup
Copyright(c) 2015-2019 Aelve
(c) 2019-2021 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellSafe-Inferred
LanguageHaskell2010

ShortcutLinks.All

Description

 
Synopsis

Documentation

data Result a Source #

Resulting data type over the work of shortcut-links

Constructors

Failure String 
Warning [String] a 
Success a 

Instances

Instances details
Monad Result Source # 
Instance details

Defined in ShortcutLinks.All

Methods

(>>=) :: Result a -> (a -> Result b) -> Result b #

(>>) :: Result a -> Result b -> Result b #

return :: a -> Result a #

Functor Result Source # 
Instance details

Defined in ShortcutLinks.All

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

MonadFail Result Source # 
Instance details

Defined in ShortcutLinks.All

Methods

fail :: String -> Result a #

Applicative Result Source # 
Instance details

Defined in ShortcutLinks.All

Methods

pure :: a -> Result a #

(<*>) :: Result (a -> b) -> Result a -> Result b #

liftA2 :: (a -> b -> c) -> Result a -> Result b -> Result c #

(*>) :: Result a -> Result b -> Result b #

(<*) :: Result a -> Result b -> Result a #

Show a => Show (Result a) Source # 
Instance details

Defined in ShortcutLinks.All

Methods

showsPrec :: Int -> Result a -> ShowS #

show :: Result a -> String #

showList :: [Result a] -> ShowS #

type Shortcut = Maybe Text -> Text -> Result Text Source #

Type alias for shortcut links Result functions.

allShortcuts :: [([Text], Shortcut)] Source #

A list of all functions included in this module, together with suggested names for them.

Encyclopedias

wikipedia :: Shortcut Source #

Wikipedia (shortcut: “w” or “wikipedia”)

Link to an article in English Wikipedia:

\[grey-headed flying fox\](@w)
https://en.wikipedia.org/wiki/Grey-headed_flying_fox

You can link to Wikipedia-in-another-language if you give language code as an option:

\[Haskell\](@w(ru))
https://ru.wikipedia.org/wiki/Haskell
>>> useShortcut "wikipedia" Nothing ""
Success "https://en.wikipedia.org/wiki/"
>>> useShortcut "w" (Just "ru") ""
Success "https://ru.wikipedia.org/wiki/"
>>> useShortcut "wikipedia" Nothing "Query"
Success "https://en.wikipedia.org/wiki/Query"
>>> useShortcut "w" Nothing "multiple words query"
Success "https://en.wikipedia.org/wiki/Multiple_words_query"
>>> useShortcut "wikipedia" Nothing "grey-headed flying fox"
Success "https://en.wikipedia.org/wiki/Grey-headed_flying_fox"
>>> useShortcut "w" Nothing "pattern matching#primitive patterns"
Success "https://en.wikipedia.org/wiki/Pattern_matching#Primitive_patterns"

tvtropes :: Shortcut Source #

TV Tropes (shortcut: “tvtropes”)

Link to a trope:

\[so bad, it's good\](@tvtropes)
http://tvtropes.org/pmwiki/pmwiki.php/Main/SoBadItsGood

Link to anything else (a series, for example):

\[Elementary\](@tvtropes(series))
http://tvtropes.org/pmwiki/pmwiki.php/Series/Elementary

Or something on Sugar Wiki:

\[awesome music\](@tvtropes(sugar wiki))
http://tvtropes.org/pmwiki/pmwiki.php/SugarWiki/AwesomeMusic

Social networks

facebook :: Shortcut Source #

Facebook (shortcut: “fb” or “facebook”)

Link by username:

\[green\](@fb)
https://facebook.com/green

Or by profile ID (are there still people without usernames, actually?):

\[someone something\](@fb:164680686880529)
https://facebook.com/profile.php?id=164680686880529

vk :: Shortcut Source #

Vkontakte (Вконтакте) (shortcut: “vk” or “vkontakte”)

Link by username:

\[green\](@vk)
https://vk.com/green

Or by ID:

\[Durov\](@vk:1)
https://vk.com/id1

googleplus :: Shortcut Source #

Google+ (shortcut: “gp”, “gplus”, or “googleplus”)

Link by username:

\[SergeyBrin\](@gp)
https://plus.google.com/+SergeyBrin

It's alright if the username already starts with a “+”:

\[+SergeyBrin\](@gp)
https://plus.google.com/+SergeyBrin

Since many usernames are just “your full name without spaces”, in many cases you can give a name and it's easy to make a username from it:

\[Sergey Brin\](@gp)
https://plus.google.com/+SergeyBrin

You can also link by ID:

\[Sergey Brin\](@gp:109813896768294978296)
https://plus.google.com/109813896768294978296

Finally, there are different links for hashtags:

\[#Australia\](@gp)
https://plus.google.com/explore/Australia

telegram :: Shortcut Source #

Telegram (shortcut: "tg", "tme" or "telegram")

Link by username:

\[Kowainik telegram channel\](@t:kowainik)
https://t.me/kowainik

It's alright if the username already starts with a “@”:

\[\@kowainik\](@t)
https://t.me/kowainik
>>> useShortcut "telegram" Nothing ""
Success "https://t.me"
>>> useShortcut "tme" Nothing "@kowainik"
Success "https://t.me/kowainik"
>>> useShortcut "telegram" Nothing "kowainik"
Success "https://t.me/kowainik"

Microblogs

twitter :: Shortcut Source #

Twitter (shortcut: “t” or “twitter”)

Link by username:

\[Edward Kmett\](@t:kmett)
https://twitter.com/kmett

It's alright if the username already starts with a “@”:

\[\@kmett\](@t)
https://twitter.com/kmett

There are different links for hashtags:

\[#haskell\](@t)
https://twitter.com/hashtag/haskell

juick :: Shortcut Source #

Juick (shortcut: “juick”)

Link by username:

\[thefish\](@juick)
https://juick.com/thefish

It's alright if the username already starts with a “@”:

\[\@thefish\](@juick)
https://juick.com/thefish

There are different links for tags (which start with “*” and not with “#”, by the way):

\[*Haskell\](@juick)
https://juick.com/tag/Haskell

Major search engines

google :: Shortcut Source #

Google (shortcut: “google”)

Search results:

\[random query\](@google)
https://www.google.com/search?nfpr=1&q=random+query

duckduckgo :: Shortcut Source #

Duckduckgo (shortcut: “ddg” or “duckduckgo”)

Search results:

\[random query\](@ddg)
https://duckduckgo.com/?q=random+query

yandex :: Shortcut Source #

Yandex (Russian search engine) (shortcut: “yandex”)

Search results:

\[random query\](@yandex)
http://yandex.ru/search/?noreask=1&text=random+query

baidu :: Shortcut Source #

Baidu (Chinese search engine) (shortcut: “baidu”)

Search results:

\[random query\](@baidu)
http://baidu.com/s?nojc=1&wd=random+query

Programming language libraries

Haskell

haskell :: Shortcut Source #

Haskellhttps://haskell.org (shortcut: “haskell hs”)

Link to ghcup:

\[ghcup\](@haskell)
https://haskell.org/ghcup
>>> useShortcut "haskell" Nothing ""
Success "https://haskell.org/"
>>> useShortcut "hs" Nothing "ghcup"
Success "https://haskell.org/ghcup"

hackage :: Shortcut Source #

HaskellHackage (shortcut: “hackage hk”)

Link to a package:

\[shortcut-links\](@hackage)
https://hackage.haskell.org/package/shortcut-links
>>> useShortcut "hackage" Nothing ""
Success "https://hackage.haskell.org"
>>> useShortcut "hk" Nothing "shortcut-links"
Success "https://hackage.haskell.org/package/shortcut-links"

stackage :: Shortcut Source #

HaskellStackage (shortcut: “stackage”)

Link to a package:

\[colourista\](@stackage)
https://stackage.org/lts/package/colourista
>>> useShortcut "stackage" Nothing ""
Success "https://stackage.org"
>>> useShortcut "stackage" (Just "nightly") ""
Success "https://stackage.org/nightly"
>>> useShortcut "stackage" (Just "lts") ""
Success "https://stackage.org/lts"
>>> useShortcut "stackage" (Just "lts-15.0") ""
Success "https://stackage.org/lts-15.0"
>>> useShortcut "stackage" Nothing "colourista"
Success "https://stackage.org/lts/package/colourista"
>>> useShortcut "stackage" (Just "nightly") "colourista"
Success "https://stackage.org/nightly/package/colourista"
>>> useShortcut "stackage" (Just "lts-15.10") "colourista"
Success "https://stackage.org/lts-15.10/package/colourista"

cabal :: Shortcut Source #

HaskellCabal (shortcut: “cabal”)

Link to the intoduction package:

\[intro.html\](@hackage)
https://haskell.org/cabal/users-guide/intro.html
>>> useShortcut "cabal" Nothing "intro.html"
Success "https://haskell.org/cabal/users-guide/intro.html"

Other

npm :: Shortcut Source #

Node.jsNPM (shortcut: “npm”)

Link to a package:

\[markdown\](@npm)
https://www.npmjs.com/package/markdown

jam :: Shortcut Source #

JavascriptJam (shortcut: “jam”)

Link to a package:

\[pagedown\](@jam)
http://jamjs.org/packages/#/details/pagedown

rubygems :: Shortcut Source #

RubyRubyGems.org (shortcut: “gem”)

Link to a package:

\[github-markdown\](@gem)
https://rubygems.org/gems/github-markdown

pypi :: Shortcut Source #

PythonPyPI (shortcut: “pypi”)

Link to a package:

\[Markdown\](@pypi)
https://pypi.python.org/pypi/Markdown

metacpanPod :: Shortcut Source #

PerlMetaCPAN (modules) (shortcut: “cpan”)

Link to a module:

\[Text::Markdown\](@cpan)
https://metacpan.org/pod/Text::Markdown

To link to a release, look at metacpanRelease.

metacpanRelease :: Shortcut Source #

PerlMetaCPAN (releases) (shortcut: “cpan-r”)

Link to a release:

\[Text-Markdown\](@cpan-r)
https://metacpan.org/release/Text-Markdown

cargo :: Shortcut Source #

RustCargo (shortcut: “cargo”)

Link to a package:

\[hoedown\](@cargo)
https://crates.io/crates/hoedown

pub :: Shortcut Source #

Dartpub (shortcut: “pub”)

Link to a package:

\[md_proc\](@pub)
https://pub.dartlang.org/packages/md_proc

hex :: Shortcut Source #

ErlangHex (shortcut: “hex”)

Link to a package:

\[earmark\](@hex)
https://hex.pm/packages/earmark

cran :: Shortcut Source #

RCRAN (shortcut: “cran”)

Link to a package:

\[markdown\](@cran)
http://cran.r-project.org/web/packages/markdown

swiprolog :: Shortcut Source #

SWI-Prologpackages (shortcut: “swiprolog”)

Link to a package:

\[markdown\](@swiprolog)
http://www.swi-prolog.org/pack/list?p=markdown

dub :: Shortcut Source #

DDUB (shortcut: “dub”)

Link to a package:

\[dmarkdown\](@dub)
http://code.dlang.org/packages/dmarkdown

bpkg :: Shortcut Source #

Bashbpkg (shortcut: “bpkg”)

Link to a package:

\[markdown\](@bpkg)
http://www.bpkg.io/pkg/markdown

pear :: Shortcut Source #

PHPPEAR (shortcut: “pear”)

Link to a package:

\[Text_Wiki_Doku\](@pear)
http://pear.php.net/package/Text_Wiki_Doku

Code hosting

github :: Shortcut Source #

Github (shortcut: “gh” or “github”)

Link to a user:

\[Aelve\](@gh:aelve)
https://github.com/aelve

Link to a repository:

\[aelve/shortcut-links\](@gh)
https://github.com/aelve/shortcut-links

The repository owner can also be given as an option (to avoid mentioning them in the link text):

\[shortcut-links\](@gh(aelve))
https://github.com/aelve/shortcut-links

gitlab :: Shortcut Source #

Gitlab (shortcut: “gitlab”)

Link to a user or a team (note that links like https://gitlab.com/owner work but are going to be automatically redirected to either https://gitlab.com/u/owner or https://gitlab.com/groups/owner, depending on whether it's a user or a team – so, it's a case when the “links have to look as authentic as possible” principle is violated, but nothing can be done with that):

\[CyanogenMod\](@bitbucket)
https://gitlab.com/CyanogenMod

Link to a repository:

\[learnyou/lysa\](@gitlab)
https://gitlab.com/learnyou/lysa

The repository owner can also be given as an option (to avoid mentioning them in the link text):

\[lysa\](@gitlab(learnyou))
https://gitlab.com/learnyou/lysa

bitbucket :: Shortcut Source #

Bitbucket (shortcut: “bitbucket”)

Link to a user:

\[Bryan\](@bitbucket:bos)
https://bitbucket.org/bos

Link to a repository:

\[bos/text\](@bitbucket)
https://bitbucket.org/bos/text

The repository owner can also be given as an option (to avoid mentioning them in the link text):

\[text\](@bitbucket(bos))
https://bitbucket.org/bos/text

OS packages

Mobile

googleplay :: Shortcut Source #

AndroidGoogle Play (formerly Play Market) (shortcut: “gplay” or “googleplay”)

Link to an app:

\[Opera Mini\](@gplay:com.opera.mini.native)
https://play.google.com/store/apps/details?id=com.opera.mini.native

Windows

chocolatey :: Shortcut Source #

Chocolatey (shortcut: “chocolatey”)

Link to a package:

\[Opera\](@chocolatey)
https://chocolatey.org/packages/Opera

OS X

brew :: Shortcut Source #

Braumeister (Homebrew formulas) (shortcut: “brew”)

Link to a formula:

\[multimarkdown\](@brew)
http://braumeister.org/formula/multimarkdown

Since all Homebrew formulas are stored in a Github repo anyway, and various sites are merely convenient ways to browse that repo, the “brew” shortcut can point to some other site in the future, depending on which site seems better. Don't use it if you need specifically Braumeister.

Linux

debian :: Shortcut Source #

Debianpackages (shortcut: “debian”)

Link to a package in stable distribution:

\[ghc\](@debian)
https://packages.debian.org/stable/ghc

Distribution can be given as an option:

\[ghc\](@debian(experimental))
https://packages.debian.org/experimental/ghc

aur :: Shortcut Source #

Arch LinuxAUR (“user repository”) (shortcut: “aur”)

Link to a package:

\[ghc-git\](@aur)
https://aur.archlinux.org/packages/ghc-git

mint :: Shortcut Source #

Linux Mintpackages (shortcut: “mint”)

Link to a package:

\[ghc\](@mint)
http://community.linuxmint.com/software/view/ghc

fedora :: Shortcut Source #

Fedorapackages (shortcut: “fedora”)

Link to a package:

\[ghc\](@fedora)
https://admin.fedoraproject.org/pkgdb/package/ghc

gentoo :: Shortcut Source #

Gentoopackages (shortcut: “gentoo”)

Link to a package:

\[dev-lang/ghc\](@gentoo)
https://packages.gentoo.org/package/dev-lang/ghc

Category can be given as an option, to avoid cluttering link text:

\[ghc\](@gentoo(dev-lang))
https://packages.gentoo.org/package/dev-lang/ghc

Note that if you don't specify any category, the link would still work – but there are a lot of packages with overlapping names (like “ace”, “csv”, “http”), and such links would lead to search pages listing several packages. So, it's better to include categories.

opensuse :: Shortcut Source #

openSUSEpackages (shortcut: “opensuse”)

Link to a package:

\[ghc\](@opensuse)
http://software.opensuse.org/package/ghc

Addons

Text editors

marmalade :: Shortcut Source #

EmacsMarmalade (shortcut: “marmalade”)

Link to a package:

\[markdown-mode\](@marmalade)
https://marmalade-repo.org/packages/markdown-mode

melpa :: Shortcut Source #

EmacsMELPA (shortcut: “melpa”)

Link to a package:

\[markdown-mode\](@melpa)
http://melpa.org/#/markdown-mode

elpa :: Shortcut Source #

EmacsELPA (shortcut: “elpa”)

Link to a package:

\[undo-tree\](@elpa)
https://elpa.gnu.org/packages/undo-tree.html

packagecontrol :: Shortcut Source #

Sublime TextPackage Control (shortcut: “sublimepc”)

Link to a package:

\[MarkdownEditing\](@sublimepc)
https://packagecontrol.io/packages/MarkdownEditing

atomPackage :: Shortcut Source #

Atompackages (shortcut: “atom”)

Link to a package:

\[tidy-markdown\](@atom)
https://atom.io/packages/tidy-markdown

atomTheme :: Shortcut Source #

Atomthemes (shortcut: “atom-theme”)

Link to a theme:

\[atom-material-ui\](@atom-theme)
https://atom.io/themes/atom-material-ui

jedit :: Shortcut Source #

jEditplugins (shortcut: “jedit”)

Link to a plugin:

\[MarkdownPlugin\](@jedit)
http://plugins.jedit.org/plugins/?MarkdownPlugin

vim :: Shortcut Source #

Vimscripts (shortcut: “vim”)

Link to a script (by ID):

\[haskell.vim\](@vim:2062)
http://www.vim.org/scripts/script.php?script_id=2062

Browsers

operaExt :: Shortcut Source #

Operaextensions (shortcut: “opera”)

Link to an extension:

\[Amazon\](@opera:amazon-for-opera)
https://addons.opera.com/extensions/details/amazon-for-opera

operaTheme :: Shortcut Source #

Operathemes (shortcut: “opera-theme”)

Link to a theme:

\[Space theme\](@opera-theme:space-15)
https://addons.opera.com/en/themes/details/space-15

firefox :: Shortcut Source #

Firefoxadd-ons (shortcut: “firefox”)

Link to an extension (or a theme):

[tree-style-tab](@firefox)
https://addons.mozilla.org/firefox/addon/tree-style-tab

chrome :: Shortcut Source #

ChromeChrome Web Store (shortcut: “chrome”)

Link to an extension, app, or theme (using that weird random-looking ID):

[hdokiejnpimakedhajhdlcegeplioahd](@chrome)
https://chrome.google.com/webstore/detail/hdokiejnpimakedhajhdlcegeplioahd

Manuals

ghcExt :: Shortcut Source #

GHC (Glasgow Haskell Compiler) extensions (shortcut: “ghc-ext”)

Link to an extension's description in the user manual:

\[ViewPatterns\](@ghc-ext)
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-ViewPatterns

Standards and databases

rfc :: Shortcut Source #

RFCs (shortcut: “rfc”)

Link to an RFC:

\[RFC 2026\](@rfc)
https://tools.ietf.org/html/rfc2026

Precise format of recognised text: optional “rfc” (case-insensitive), then arbitrary amount of spaces and punctuation (or nothing), then the number. Examples: “RFC 2026”, “RFC-2026”, “rfc2026”, “rfc 2026”.

ecma :: Shortcut Source #

Ecma standards and technical reports (shortcut: “ecma”)

Link to a standard:

\[ECMA-262\](@ecma)
http://www.ecma-international.org/publications/standards/Ecma-262.htm

Link to a technical report:

\[TR/71\](@ecma)
http://ecma-international.org/publications/techreports/E-TR-071.htm

Precise format of recognised text for standards: optional “ECMA” (case-insensitive), then arbitrary amount of spaces and punctuation (or nothing), then the number. Examples: “ECMA-262”, “ECMA 262”, “ecma262”, “ECMA 262”.

Format for technical reports is the same, except that “TR” (instead of “ECMA”) is not optional (so, if there's only a number given, it's considered a standard and not a technical report).

cve :: Shortcut Source #

CVEs (Common Vulnerabilities and Exposures) (shortcut: “cve”)

Link to a CVE:

\[CVE-2014-10001\](@cve)
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-10001

Precise format of recognised text: optional “cve” (case-insensitive), then arbitrary amount of spaces and punctuation (or nothing), then the year, “-”, and a number. Examples: “CVE-2014-10001”, “cve 2014-10001”, “2014-10001”.