diff --git a/description/index.md b/description/index.md new file mode 100644 index 0000000..6f3db21 --- /dev/null +++ b/description/index.md @@ -0,0 +1,21 @@ +#Pinout! + +###The comprehensive Raspberry Pi Pinout guide for the Raspberry Pi, now with Model B+ and Pi 2 + +Pinout isn't meant to be printable, but it's a great quick-reference and a comprehensive starter guide to learning about your Raspberry Pi's GPIO pins. + +##What do these numbers mean, anyway? + +* BCM - Broadcom pin number, these are the ones you probably want to use with RPi.GPIO +* WiringPi - Wiring Pi pin number, for Gordon's Wiring Pi library +* Physical - Number corresponding to the pins physical location on the header + +##Pi 2+ + +To celebrate the launch of the Pi 2 and the new Pi-enthusiasts it'll bring, Pinout has been updated to be cleaner, more comprehensive and more accurate. + +##Model B+ + +Now that the Raspberry Pi Model B Plus is here, I've updated Pinout with the 14 extra pins you'll find on your shiny new board. + +Note: While I've placed a gap to visually separate the additional 14 pins on the B+, you wont find this gap on the actual board! diff --git a/description/pins/pin-1.md b/description/pins/pin-1.md index 8f9af8b..f83da60 100644 --- a/description/pins/pin-1.md +++ b/description/pins/pin-1.md @@ -1,5 +1,3 @@ -#3v3 Power - ###The 3v3, 3.3 volt, supply pin on the Pi has a max available current of about 50 mA. Enough to power a couple of LEDs or a microprocessor, but not much more. You should generally use the 5v supply, coupled with a 3v3 regulator for 3.3v projects. diff --git a/description/pins/pin-14.md b/description/pins/pin-14.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-14.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/description/pins/pin-2.md b/description/pins/pin-2.md index e6ecaf3..a5ea7cb 100644 --- a/description/pins/pin-2.md +++ b/description/pins/pin-2.md @@ -1,5 +1,3 @@ -#5v Power - ###The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself. With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A. diff --git a/description/pins/pin-20.md b/description/pins/pin-20.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-20.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/description/pins/pin-25.md b/description/pins/pin-25.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-25.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/description/pins/pin-3.md b/description/pins/pin-3.md new file mode 100644 index 0000000..af930f8 --- /dev/null +++ b/description/pins/pin-3.md @@ -0,0 +1,23 @@ +It's easy to get started writing a digital HIGH or LOW to a GPIO pin, but you've got to remember a few things: + +* Run your script as root +* Set your pin's mode to OUTPUT (1) + +Assuming you've installed WiringPi2-Python ( pip install wiringpi2 ) then try pasting the following into a .py file: + +```python +import wiringpi2 as wiringpi +HIGH = 1 +LOW = 0 +OUTPUT = 1 +INPUT = 0 +wiringpi.wiringPiSetup() +wiringpi.pinMode(8,OUTPUT) +wiringpi.digitalWrite(8,HIGH) +``` + +Then run it with: + +```bash +sudo python myscript.py +``` \ No newline at end of file diff --git a/description/pins/pin-30.md b/description/pins/pin-30.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-30.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/description/pins/pin-34.md b/description/pins/pin-34.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-34.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/description/pins/pin-39.md b/description/pins/pin-39.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-39.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/description/pins/pin-4.md b/description/pins/pin-4.md deleted file mode 100644 index 8b13789..0000000 --- a/description/pins/pin-4.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/description/pins/pin-4.md b/description/pins/pin-4.md new file mode 120000 index 0000000..253c8f3 --- /dev/null +++ b/description/pins/pin-4.md @@ -0,0 +1 @@ +pin-2.md \ No newline at end of file diff --git a/description/pins/pin-5.md b/description/pins/pin-5.md new file mode 100644 index 0000000..ca9b3a5 --- /dev/null +++ b/description/pins/pin-5.md @@ -0,0 +1,10 @@ +```python +require 'wiringpi2' +HIGH = 1 +LOW = 0 +OUTPUT = 1 +INPUT = 0 +io = WiringPi::GPIO.new +io.pin_mode(9,OUTPUT) +io.digital_write(9,HIGH) +``` \ No newline at end of file diff --git a/description/pins/pin-6.md b/description/pins/pin-6.md new file mode 100644 index 0000000..e3458e6 --- /dev/null +++ b/description/pins/pin-6.md @@ -0,0 +1 @@ +Ground! \ No newline at end of file diff --git a/description/pins/pin-9.md b/description/pins/pin-9.md new file mode 120000 index 0000000..d0abe28 --- /dev/null +++ b/description/pins/pin-9.md @@ -0,0 +1 @@ +pin-6.md \ No newline at end of file diff --git a/generate-html.py b/generate-html.py index 360fa2b..15f381e 100755 --- a/generate-html.py +++ b/generate-html.py @@ -1,6 +1,6 @@ #!/usr/bin/env python import json -import markdown, gfm +import markdown import unicodedata import re @@ -24,19 +24,25 @@ def load_overlay(overlay): except IOError: return None - loaded['long_description'] = load_text(overlay) + loaded['long_description'] = load_md('description/overlay/{}.md'.format(overlay)) return loaded -def load_text(overlay): +def load_md(filename): try: - return markdown.markdown(open('description/overlay/{}.md'.format(overlay)).read(), extensions=[gfm.HiddenHiliteExtension([]),'fenced_code']) + html = markdown.markdown(open(filename).read(), extensions=['fenced_code']) + + return html + #return markdown.markdown(open(filename).read(), extensions=[gfm.HiddenHiliteExtension([]),'fenced_code']) except IOError: return None +def render_pin_text(pin_num, pin_url, pin_name, pin_subtext): + return '

{}

{}{}
'.format(pin_url,pin_name,pin_subtext,load_md('description/pins/pin-{}.md'.format(pin_num))) + def render_overlay_page(overlay): if overlay == None: return '' - return '
{}
'.format(slugify(overlay['name']),overlay['long_description']) + return '
{}
'.format(slugify(overlay['name']),overlay['long_description']) db = json.load(open('pi-pinout.json')) @@ -45,9 +51,11 @@ pins = db['pins'] html_odd = '' html_even = '' -overlay_text = map(load_text,overlays) overlays = map(load_overlay,overlays) +pages = [render_overlay_page({'name':'Index','long_description':load_md('description/index.md')})] +pages += map(render_overlay_page,overlays) + def render_alternate(handle, name): handle = slugify(handle.lower()) return '{}'.format(handle,name) @@ -57,8 +65,14 @@ def render_pin(pin_num): pin_type = list([x.strip() for x in pin['type'].lower().split('/')]) pin_url = pin['name'] pin_name = pin['name'] + pin_text_name = pin['name'] + + pin_subtext = [] alternates = [] + + pin_subtext.append('Physical pin {}'.format(pin_num)) + for overlay in overlays: if overlay != None: if str(pin_num) in overlay['pin']: @@ -68,22 +82,36 @@ def render_pin(pin_num): if 'bcm' in pin['scheme']: bcm = pin['scheme']['bcm'] pin_subname = '' + pin_subname_text = '' #if pin_url == '': pin_url = 'gpio{}'.format(bcm) if pin['name'] != '': pin_subname = '({})'.format(pin['name']) - pin_name = 'GPIO {} {}'.format(bcm, pin_subname) + pin_subname_text = '({})'.format(pin['name']) + pin_name = 'BCM {} {}'.format(bcm, pin_subname) + pin_text_name = 'BCM {} {}'.format(bcm, pin_subname_text) + pin_subtext.append('BCM pin {}'.format(bcm)) if 'wiringpi' in pin['scheme']: wiringpi = pin['scheme']['wiringpi'] + pin_subtext.append('Wiring Pi pin {}'.format(wiringpi)) alternates.append(render_alternate('wiringpi','Wiring Pi pin {}'.format(wiringpi))) + if 'bcmAlt' in pin['scheme']: + bcmAlt = pin['scheme']['bcmAlt'] + pin_subtext.append('BCM pin {} on Rev 1 ( very early ) Pi'.format(bcmAlt)) + #print(pin_type) - return '
  • {} {}\n{}
  • \n'.format( + pin_url = slugify('pin{}_{}'.format(pin_num,pin_url)) + + pin_text = render_pin_text(pin_num,pin_url,pin_text_name,''.format('
  • '.join(pin_subtext))) + if pin_text != None: + pages.append(pin_text) + + return '
  • {} {}\n{}
  • \n'.format( pin_num, ' '.join(map(slugify,pin_type)), - pin_num, - slugify(pin_url), + pin_url, pin_num, pin_name, '\n'.join(alternates) @@ -93,7 +121,6 @@ for odd in range(1,len(pins),2): html_odd += render_pin(odd) html_even += render_pin(odd+1) -pages = map(render_overlay_page,overlays) html = ''' diff --git a/output/pinout.css b/output/pinout.css index b9f79d5..cbdf03e 100644 --- a/output/pinout.css +++ b/output/pinout.css @@ -174,23 +174,23 @@ div#pinbasebplus { left:162px; top:401px; } -h1 { +.logo { width:250px; font-size:34px; color:#888888; margin-bottom:5px; cursor:pointer; } -h1 img {float:left;position:relative;top:0px;margin:0 13px; +.logo img {float:left;position:relative;top:0px;margin:0 13px; -moz-transform:rotate(-45deg); -webkit-transform:rotate(-45deg); transform:rotate(-45deg); width:30px; } -h1 span { +.logo span { color:#D6264E; } -h1 span.out { +.logo span.out { color:#5FB12D; } .pin27, .pin28 {margin-top:16px;} diff --git a/output/pinout.js b/output/pinout.js index fed2ba6..26ec1da 100644 --- a/output/pinout.js +++ b/output/pinout.js @@ -1,12 +1,14 @@ jQuery(document).ready(function(){ var History = window.History; - var homepage = jQuery('article.homepage').index(); + var homepage = jQuery('article.page_index').index(); var pincount = 40; History.Adapter.bind(window,'statechange',function(){ var State = History.getState(); var url = State.url.replace('http://pi.gadgetoid.com',''); + + console.log(State); if( url == '/pinout' ) { jQuery('h1').click(); @@ -37,7 +39,7 @@ jQuery(document).ready(function(){ jQuery('span.alternate').hide(); var legend = jQuery(this).parent().attr('class'); - var page = jQuery('article.' + legend).index(); + var page = jQuery('article.page_' + legend).index(); var pins = []; if( jQuery(this).parent().data('pins') ){ pins = jQuery(this).parent().data('pins').split(','); @@ -54,20 +56,30 @@ jQuery(document).ready(function(){ History.pushState({legend:jQuery(this).attr('class'),url:jQuery(this).attr('href')}, 'Raspberry Pi Pinout - ' + title, url) }); - function showPage(object,offset){ + function showPage(object){ + var url; + var page; + jQuery('span.default').show(); jQuery('span.alternate').hide(); jQuery('nav#gpio li').removeClass('legend active'); - jQuery('#pages').cycle(offset+object.parent().index()); + + url = object.attr('href').split('/'); + url = url[url.length-1]; + + page = jQuery('article.' + url).index(); + + jQuery('#pages').cycle(page); + object.parent().addClass('active'); title = 'Pin ' + object.find('span.default').text().replace(' ',': '); - History.pushState({pin:offset+object.parent().index(),url:object.attr('href')}, title, object.attr('href')); + History.pushState({pin:page,url:object.attr('href')}, title, object.attr('href')); } jQuery('nav#gpio ul.bottom a').on('click',function(e){ - e.preventDefault();showPage(jQuery(this),0);}); + e.preventDefault();showPage(jQuery(this));}); jQuery('nav#gpio ul.top a').on('click',function(e){ - e.preventDefault();showPage(jQuery(this),pincount/2);}); + e.preventDefault();showPage(jQuery(this));}); jQuery('h1').on('click',function(){ jQuery('span.default').show(); diff --git a/output/prettify/lang-apollo.js b/output/prettify/lang-apollo.js new file mode 100644 index 0000000..7098baf --- /dev/null +++ b/output/prettify/lang-apollo.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/, +null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]); diff --git a/output/prettify/lang-asm.js b/output/prettify/lang-asm.js new file mode 100644 index 0000000..ca3be64 --- /dev/null +++ b/output/prettify/lang-asm.js @@ -0,0 +1,19 @@ +var a=null; +PR.registerLangHandler(PR.createSimpleLexer( +[ +["com",/^@[^\n\r]*/,a,"@"], +["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"], +["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"'] +], +[ +["typ",/^(?:\.ascii|\.long)\b/,a], +["cls",/^(?:\.data|\.text|\.globl|\.code)\b/,a], +["fun",/^b(eq|le)?[\ \t]*(?:[A-Za-z_]*)\b/,a], +["kwd",/^(?:mov|ldr|svc|cmp|beq|add|ble|b|LSL|LSR)\b/,a], +["cls",/^r\d/], +["fun",/^[A-Za-z_]*:/], +["fun",/^\=[A-Za-z_]*\b/], +["arg",/^\#\dx[\d]+/] +] +),["asm"] +); diff --git a/output/prettify/lang-bash.js b/output/prettify/lang-bash.js new file mode 100644 index 0000000..3ddf6a2 --- /dev/null +++ b/output/prettify/lang-bash.js @@ -0,0 +1,19 @@ +/** + * @fileoverview + * Registers a language handler for Ruby. + * When in doubt, this module attempts to mimic vim. + * Ruby grammar: http://www.cse.buffalo.edu/~regan/cse305/RubyBNF.pdf + * + * @author matthew.y.king@gmail.com + */ + +PR.registerLangHandler(PR.createSimpleLexer([], [ + + + +['fun', /^\b(?:sudo)\b/], + +[PR['PR_KEYWORD'], /^\b(?:grep|awk|apt-get|chkconfig|vi|modprobe)\b/] + + +]), ['bash']); \ No newline at end of file diff --git a/output/prettify/lang-clj.js b/output/prettify/lang-clj.js new file mode 100644 index 0000000..542a220 --- /dev/null +++ b/output/prettify/lang-clj.js @@ -0,0 +1,18 @@ +/* + Copyright (C) 2011 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +var a=null; +PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], +["typ",/^:[\dA-Za-z-]+/]]),["clj"]); diff --git a/output/prettify/lang-css.js b/output/prettify/lang-css.js new file mode 100644 index 0000000..041e1f5 --- /dev/null +++ b/output/prettify/lang-css.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", +/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/output/prettify/lang-go.js b/output/prettify/lang-go.js new file mode 100644 index 0000000..fc18dc0 --- /dev/null +++ b/output/prettify/lang-go.js @@ -0,0 +1 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]); diff --git a/output/prettify/lang-hs.js b/output/prettify/lang-hs.js new file mode 100644 index 0000000..9d77b08 --- /dev/null +++ b/output/prettify/lang-hs.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, +null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); diff --git a/output/prettify/lang-lisp.js b/output/prettify/lang-lisp.js new file mode 100644 index 0000000..02a30e8 --- /dev/null +++ b/output/prettify/lang-lisp.js @@ -0,0 +1,3 @@ +var a=null; +PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], +["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); diff --git a/output/prettify/lang-lua.js b/output/prettify/lang-lua.js new file mode 100644 index 0000000..e83a3c4 --- /dev/null +++ b/output/prettify/lang-lua.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i], +["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]); diff --git a/output/prettify/lang-ml.js b/output/prettify/lang-ml.js new file mode 100644 index 0000000..6df02d7 --- /dev/null +++ b/output/prettify/lang-ml.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/], +["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]); diff --git a/output/prettify/lang-n.js b/output/prettify/lang-n.js new file mode 100644 index 0000000..6c2e85b --- /dev/null +++ b/output/prettify/lang-n.js @@ -0,0 +1,4 @@ +var a=null; +PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, +a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, +a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); diff --git a/output/prettify/lang-proto.js b/output/prettify/lang-proto.js new file mode 100644 index 0000000..f006ad8 --- /dev/null +++ b/output/prettify/lang-proto.js @@ -0,0 +1 @@ +PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); diff --git a/output/prettify/lang-rb.js b/output/prettify/lang-rb.js new file mode 100644 index 0000000..1069ee7 --- /dev/null +++ b/output/prettify/lang-rb.js @@ -0,0 +1,60 @@ +/** + * @fileoverview + * Registers a language handler for Ruby. + * When in doubt, this module attempts to mimic vim. + * Ruby grammar: http://www.cse.buffalo.edu/~regan/cse305/RubyBNF.pdf + * + * @author matthew.y.king@gmail.com + */ + +PR.registerLangHandler(PR.createSimpleLexer([ + // # comment + [PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'] + // 'foo', "foo", `foo` + // String interpolation is unsupported. +, [PR['PR_STRING'], /^([\'\"\`])(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)/, null, '\'\"\`'] +], [ + // =begin + // comment + // =end + // `=begin` must be located at the beginning of the line. + // At this time, the case where `=begin` begins a source file is not accounted for. + [PR['PR_COMMENT'], /^[\r\n]=begin\b[\s\S]*?(?:=end|$)/] + // %q{}, %q[], %q(), %q<> (balanced quotes) + // Nested balanced quotes are unsupported. +, [PR['PR_STRING'], /^%[qQ](?:\{(?:[^\}\\]|\\[\s\S])*?(?:\}|$)|\[(?:[^\]\\]|\\[\s\S])*?(?:\]|$)|\((?:[^\)\\]|\\[\s\S])*?(?:\)|$)|\<(?:[^\>\\]|\\[\s\S])*?(?:\>|$))/] + // %q||, etc (generic non-balanced quotes) +, [PR['PR_STRING'], /^%[qQ](.)(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)/] + // <|\/=?|::?|<>?>?=?|,|;|\?|@|\[|~|{|\^\^?=?|\|\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof|when)\s*(\/(?:[^\/\\]|\\[\s\S])+?(?:\/|$)[a-z]*)/] + // %r{}, %r[], %r{}, %r<> (balanced delimiters) +, [PR['PR_STRING'], /^%r(?:\{(?:[^\}\\]|\\[\s\S])*?(?:\}|$)|\[(?:[^\]\\]|\\[\s\S])*?(?:\]|$)|\((?:[^\)\\]|\\[\s\S])*?(?:\)|$)|\<(?:[^\>\\]|\\[\s\S])*?(?:\>|$))[a-z]*/] + // %r||, etc (generic non-balanced delimiters) +, [PR['PR_STRING'], /^%r(.)(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)[a-z]*/] + // :symbol, :'symbol', symbol: +, [PR['PR_LITERAL'], /^(?::[\w\?!]+|:([\'\"\`])(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)|[\w\?!]+:(?!:))/] + // Exclude `::` (as in Foo::method) +, [PR['PR_PLAIN'], /^::/] + // ?a (the character 'a') +, [PR['PR_LITERAL'], /^(?:\?.)\b/] + // Exclude `method?` +, [PR['PR_PLAIN'], /^\w\?/] + // 0b01, 0x1aA, 1.2e12 + // Accept `_` within numbers. +, [PR['PR_LITERAL'], /^\b(?:0b[_01]+|0x[_a-f0-9]+|\d+[_\d]*\.?(?:\d[_\d]*)?(?:e[+\-]?\d[_\d]*)?)\b/i] + // Exclude `method1` +, [PR['PR_PLAIN'], /^\w\d+/] + // scope variables (@foo, @@foo, $foo), capitalized types, CONSTANTs, built-in dollar variables +, [PR['PR_TYPE'], /^(?:(?:@|@@|\$)\w+|[A-Z]+[a-z]\w+|[A-Z][_A-Z0-9]*)\b|\$./] + // keywords +, [PR['PR_KEYWORD'], /^\b(?:BEGIN|END|alias|and|begin|break|case|class|def|do|else|elsif|end|ensure|extend|false|for|if|lambda|in|include|module|next|nil|not|or|private|proc|protected|redo|require|rescue|retry|return|self|super|true|undef|unless|until|when|while|yield)\b/] +]), ['rb']); \ No newline at end of file diff --git a/output/prettify/lang-ruby.js b/output/prettify/lang-ruby.js new file mode 100644 index 0000000..04721b5 --- /dev/null +++ b/output/prettify/lang-ruby.js @@ -0,0 +1,66 @@ +/** + * @fileoverview + * Registers a language handler for Ruby. + * When in doubt, this module attempts to mimic vim. + * Ruby grammar: http://www.cse.buffalo.edu/~regan/cse305/RubyBNF.pdf + * + * @author matthew.y.king@gmail.com + */ + +PR.registerLangHandler(PR.createSimpleLexer([ + // # comment + [PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'] + // 'foo', "foo", `foo` + // String interpolation is unsupported. +, [PR['PR_STRING'], /^([\'\"\`])(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)/, null, '\'\"\`'] +], [ + // =begin + // comment + // =end + // `=begin` must be located at the beginning of the line. + // At this time, the case where `=begin` begins a source file is not accounted for. + [PR['PR_COMMENT'], /^[\r\n]=begin\b[\s\S]*?(?:=end|$)/] + // %q{}, %q[], %q(), %q<> (balanced quotes) + // Nested balanced quotes are unsupported. +, [PR['PR_STRING'], /^%[qQ](?:\{(?:[^\}\\]|\\[\s\S])*?(?:\}|$)|\[(?:[^\]\\]|\\[\s\S])*?(?:\]|$)|\((?:[^\)\\]|\\[\s\S])*?(?:\)|$)|\<(?:[^\>\\]|\\[\s\S])*?(?:\>|$))/] + // %q||, etc (generic non-balanced quotes) + // <|\/=?|::?|<>?>?=?|,|;|\?|@|\[|~|{|\^\^?=?|\|\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof|when)\s*(\/(?:[^\/\\]|\\[\s\S])+?(?:\/|$)[a-z]*)/] + // %r{}, %r[], %r{}, %r<> (balanced delimiters) +, [PR['PR_STRING'], /^%r(?:\{(?:[^\}\\]|\\[\s\S])*?(?:\}|$)|\[(?:[^\]\\]|\\[\s\S])*?(?:\]|$)|\((?:[^\)\\]|\\[\s\S])*?(?:\)|$)|\<(?:[^\>\\]|\\[\s\S])*?(?:\>|$))[a-z]*/] + // %r||, etc (generic non-balanced delimiters) +, [PR['PR_STRING'], /^%r(.)(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)[a-z]*/] + // :symbol, :'symbol', symbol: +, [PR['PR_LITERAL'], /^(?::[\w\?!]+|:([\'\"\`])(?:(?!\1)|[^\\]|\\[\s\S])*?(?:\1|$)|[\w\?!]+:(?!:))/] + + // Exclude `::` (as in Foo::method) +, [PR['PR_PLAIN'], /^::/] + // ?a (the character 'a') +, [PR['PR_LITERAL'], /^(?:\?.)\b/] + // Exclude `method?` +, [PR['PR_PLAIN'], /^\w\?/] + // 0b01, 0x1aA, 1.2e12 + // Accept `_` within numbers. +, [PR['PR_LITERAL'], /^\b(?:0b[_01]+|0x[_a-f0-9]+|\d+[_\d]*\.?(?:\d[_\d]*)?(?:e[+\-]?\d[_\d]*)?)\b/i] + + // Exclude `method1` +, [PR['PR_PLAIN'], /^\w\d+/] + // scope variables (@foo, @@foo, $foo), capitalized types, CONSTANTs, built-in dollar variables +, [PR['PR_TYPE'], /^(?:(?:@|@@|\$)\w+|[A-Z]+[a-z]\w+|[A-Z][_A-Z0-9]*)\b|\$./] + // keywords +, ['pun', /^(?:\||\{|\}|\(|\)|\[|\]|\,|\.)/] +, ['fun', /^(?:read|write|shiftout|mode)/] +, [PR['PR_KEYWORD'], /^\b(?:BEGIN|END|alias|and|begin|break|case|class|def|do|else|elsif|end|ensure|extend|false|for|if|lambda|in|include|module|next|nil|not|or|private|proc|protected|redo|require|rescue|retry|return|self|super|true|undef|unless|until|when|while|yield)\b/] +]), ['ruby']); \ No newline at end of file diff --git a/output/prettify/lang-scala.js b/output/prettify/lang-scala.js new file mode 100644 index 0000000..60d034d --- /dev/null +++ b/output/prettify/lang-scala.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/], +["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]); diff --git a/output/prettify/lang-sql.js b/output/prettify/lang-sql.js new file mode 100644 index 0000000..da705b0 --- /dev/null +++ b/output/prettify/lang-sql.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i, +null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]); diff --git a/output/prettify/lang-tex.js b/output/prettify/lang-tex.js new file mode 100644 index 0000000..ce96fbb --- /dev/null +++ b/output/prettify/lang-tex.js @@ -0,0 +1 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]); diff --git a/output/prettify/lang-vb.js b/output/prettify/lang-vb.js new file mode 100644 index 0000000..07506b0 --- /dev/null +++ b/output/prettify/lang-vb.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \xa0

"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“”'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i, +null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]); diff --git a/output/prettify/lang-vhdl.js b/output/prettify/lang-vhdl.js new file mode 100644 index 0000000..128b5b6 --- /dev/null +++ b/output/prettify/lang-vhdl.js @@ -0,0 +1,3 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, +null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i], +["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]); diff --git a/output/prettify/lang-wiki.js b/output/prettify/lang-wiki.js new file mode 100644 index 0000000..9b0b448 --- /dev/null +++ b/output/prettify/lang-wiki.js @@ -0,0 +1,2 @@ +PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]); +PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]); diff --git a/output/prettify/lang-xq.js b/output/prettify/lang-xq.js new file mode 100644 index 0000000..e323ae3 --- /dev/null +++ b/output/prettify/lang-xq.js @@ -0,0 +1,3 @@ +PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/], +["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/], +["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]); diff --git a/output/prettify/lang-yaml.js b/output/prettify/lang-yaml.js new file mode 100644 index 0000000..c38729b --- /dev/null +++ b/output/prettify/lang-yaml.js @@ -0,0 +1,2 @@ +var a=null; +PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); diff --git a/output/prettify/prettify.css b/output/prettify/prettify.css new file mode 100644 index 0000000..deb116d --- /dev/null +++ b/output/prettify/prettify.css @@ -0,0 +1,35 @@ +.com { color: #93a1a1; } +.lit { color: #195f91; } +.pun, .opn, .clo { color: #93a1a1; } +.fun { color: #dc322f; } +.str, .atv { color: #D6264F; } +.kwd, .linenums .tag { color: #425AD6; } +.typ, .atn, .dec, .var { color: #60B22E; } +.pln { color: #778; } +.cls { color: #ff99cc; } +.arg { color: #00aadd; } +.cons {color:#112;} + +.prettyprint { + padding: 8px; + background-color: #f7f7f9; + background-color: rgba(250, 250, 250, 0.5); + border: 1px solid #e1e1e8; +} +.prettyprint.linenums { + -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; + box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin: 0; /* IE indents via margin-left */ +} +ol.linenums li { + padding-left: 12px; + color: #bebec5; + line-height: 18px; + text-shadow: 0 1px 0 #fff; + margin-bottom:0; +} \ No newline at end of file diff --git a/output/prettify/prettify.js b/output/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/output/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p - +
    -

    Pinout

    +

    Pinout

    -

    Pibrella

    +
    +

    Pinout!

    +

    The comprehensive Raspberry Pi Pinout guide for the Raspberry Pi, now with Model B+ and Pi 2

    +

    Pinout isn't meant to be printable, but it's a great quick-reference and a comprehensive starter guide to learning about your Raspberry Pi's GPIO pins.

    +

    What do these numbers mean, anyway?

    +
      +
    • BCM - Broadcom pin number, these are the ones you probably want to use with RPi.GPIO
    • +
    • WiringPi - Wiring Pi pin number, for Gordon's Wiring Pi library
    • +
    • Physical - Number corresponding to the pins physical location on the header
    • +
    +

    Pi 2+

    +

    To celebrate the launch of the Pi 2 and the new Pi-enthusiasts it'll bring, Pinout has been updated to be cleaner, more comprehensive and more accurate.

    +

    Model B+

    +

    Now that the Raspberry Pi Model B Plus is here, I've updated Pinout with the 14 extra pins you'll find on your shiny new board.

    +

    Note: While I've placed a gap to visually separate the additional 14 pins on the B+, you wont find this gap on the actual board!

    +

    Pibrella

    The all-in-one light, sound, input and output add-on board from Pimoroni vs Cyntech uses lots of IO on the Pi but leaves both Serial and I2C free leaving plenty of room for expansion if you get creative.

    Pibrella is easy to use, first you should install the module using LXTerminal/Command Line:

    -
    sudo apt-get install python-pip
    -sudo pip install pibrella
    - +
    sudo apt-get install python-pip
    +sudo pip install pibrella
    +

    Then import it into your Python script and start tinkering:

    -
    import pibrella
    -pibrella.light.red.on()
    +
    import pibrella
    +pibrella.light.red.on()
    +
    +

    3v3 Power

    • Physical pin 1

    The 3v3, 3.3 volt, supply pin on the Pi has a max available current of about 50 mA. Enough to power a couple of LEDs or a microprocessor, but not much more.

    +

    You should generally use the 5v supply, coupled with a 3v3 regulator for 3.3v projects.

    +

    5v Power

    • Physical pin 2

    The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself.

    +

    With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A.

    +

    Don't be disuaded by what sounds like a measly low voltage. You can do a lot with 5v. Power Arduinos, and even run a small Electroluminescent wire inverter right off the 5v pin!

    +

    BCM 2 (SDA)

    • Physical pin 3
    • BCM pin 2
    • Wiring Pi pin 8
    • BCM pin 0 on Rev 1 ( very early ) Pi

    It's easy to get started writing a digital HIGH or LOW to a GPIO pin, but you've got to remember a few things:

    +
      +
    • Run your script as root
    • +
    • Set your pin's mode to OUTPUT (1)
    • +
    +

    Assuming you've installed WiringPi2-Python ( pip install wiringpi2 ) then try pasting the following into a .py file:

    +
    import wiringpi2 as wiringpi
    +HIGH = 1
    +LOW = 0
    +OUTPUT = 1
    +INPUT = 0
    +wiringpi.wiringPiSetup()
    +wiringpi.pinMode(8,OUTPUT)
    +wiringpi.digitalWrite(8,HIGH)
    +
    + +

    Then run it with:

    +
    sudo python myscript.py
    +
    +

    5v Power

    • Physical pin 4

    The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself.

    +

    With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A.

    +

    Don't be disuaded by what sounds like a measly low voltage. You can do a lot with 5v. Power Arduinos, and even run a small Electroluminescent wire inverter right off the 5v pin!

    +

    BCM 3 (SCL)

    • Physical pin 5
    • BCM pin 3
    • Wiring Pi pin 9
    • BCM pin 1 on Rev 1 ( very early ) Pi
    require 'wiringpi2'
    +HIGH = 1
    +LOW = 0
    +OUTPUT = 1
    +INPUT = 0
    +io = WiringPi::GPIO.new
    +io.pin_mode(9,OUTPUT)
    +io.digital_write(9,HIGH)
    +
    +

    Ground

    • Physical pin 6

    Ground!

    +

    BCM 4 (GPCLK0)

    • Physical pin 7
    • BCM pin 4
    • Wiring Pi pin 7
    None
    +

    BCM 14 (TXD)

    • Physical pin 8
    • BCM pin 14
    • Wiring Pi pin 15
    None
    +

    Ground

    • Physical pin 9

    Ground!

    +

    BCM 15 (RXD)

    • Physical pin 10
    • BCM pin 15
    • Wiring Pi pin 16
    None
    +

    BCM 17

    • Physical pin 11
    • BCM pin 17
    • Wiring Pi pin 0
    None
    +

    BCM 18 (PCM_C)

    • Physical pin 12
    • BCM pin 18
    • Wiring Pi pin 1
    None
    +

    BCM 27 (PCM_D)

    • Physical pin 13
    • BCM pin 27
    • Wiring Pi pin 2
    • BCM pin 21 on Rev 1 ( very early ) Pi
    None
    +

    Ground

    • Physical pin 14

    Ground!

    +

    BCM 22

    • Physical pin 15
    • BCM pin 22
    • Wiring Pi pin 3
    None
    +

    BCM 23

    • Physical pin 16
    • BCM pin 23
    • Wiring Pi pin 4
    None
    +

    3v3 Power

    • Physical pin 17
    None
    +

    BCM 24

    • Physical pin 18
    • BCM pin 24
    • Wiring Pi pin 5
    None
    +

    BCM 10 (MOSI)

    • Physical pin 19
    • BCM pin 10
    • Wiring Pi pin 12
    None
    +

    Ground

    • Physical pin 20

    Ground!

    +

    BCM 9 (MISO)

    • Physical pin 21
    • BCM pin 9
    • Wiring Pi pin 13
    None
    +

    BCM 25

    • Physical pin 22
    • BCM pin 25
    • Wiring Pi pin 6
    None
    +

    BCM 11 (SCKL)

    • Physical pin 23
    • BCM pin 11
    • Wiring Pi pin 14
    None
    +

    BCM 8 (CE0)

    • Physical pin 24
    • BCM pin 8
    • Wiring Pi pin 10
    None
    +

    Ground

    • Physical pin 25

    Ground!

    +

    BCM 7 (CE1)

    • Physical pin 26
    • BCM pin 7
    • Wiring Pi pin 11
    None
    +

    ID_SD

    • Physical pin 27
    None
    +

    ID_SC

    • Physical pin 28
    None
    +

    BCM 5

    • Physical pin 29
    • BCM pin 5
    • Wiring Pi pin 0
    None
    +

    Ground

    • Physical pin 30

    Ground!

    +

    BCM 6

    • Physical pin 31
    • BCM pin 6
    • Wiring Pi pin 0
    None
    +

    BCM 12

    • Physical pin 32
    • BCM pin 12
    • Wiring Pi pin 0
    None
    +

    BCM 13

    • Physical pin 33
    • BCM pin 13
    • Wiring Pi pin 0
    None
    +

    Ground

    • Physical pin 34

    Ground!

    +

    BCM 19 (MISO)

    • Physical pin 35
    • BCM pin 19
    • Wiring Pi pin 0
    None
    +

    BCM 16

    • Physical pin 36
    • BCM pin 16
    • Wiring Pi pin 0
    None
    +

    BCM 26

    • Physical pin 37
    • BCM pin 26
    • Wiring Pi pin 0
    None
    +

    BCM 20 (MOSI)

    • Physical pin 38
    • BCM pin 20
    • Wiring Pi pin 0
    None
    +

    Ground

    • Physical pin 39

    Ground!

    +

    BCM 21 (SCLK)

    • Physical pin 40
    • BCM pin 21
    • Wiring Pi pin 0
    None
    - - - +
    + + + - - + + - +NREUMQ.push(["nrfj","bam.nr-data.net","3cd5994c2d","2368869","Jl1cQ0MODVRUSho1DAtTRkVQTiBIQRdyIzFFQltZXhQVFxlja0laRm8ZHg==",0,1,new Date().getTime(),"","","","",""]);} + diff --git a/template/layout.html b/template/layout.html index 73ef581..7c8a3df 100644 --- a/template/layout.html +++ b/template/layout.html @@ -6,7 +6,7 @@ - +
    -

    Pinout

    +

    Pinout

    +
    {{content}}
    - - - +
    + + + - - + + - +NREUMQ.push(["nrfj","bam.nr-data.net","3cd5994c2d","2368869","Jl1cQ0MODVRUSho1DAtTRkVQTiBIQRdyIzFFQltZXhQVFxlja0laRm8ZHg==",0,1,new Date().getTime(),"","","","",""]);} +