Moved defines to tools dir, added readme, generate-html now obeys lang arg
This commit is contained in:
parent
642fb6a234
commit
28350d691a
|
@ -5,11 +5,15 @@ import unicodedata
|
|||
import re
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
|
||||
lang = "en-GB"
|
||||
base_url = '/pinout/'
|
||||
resource_url = '/resources/'
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
lang = sys.argv[1]
|
||||
|
||||
default_desc = 'The comprehensive Raspberry Pi GPIO Pinout guide for the original Raspberry Pi, B+ and Pi 2'
|
||||
default_title = 'Raspberry Pi GPIO Pinout - Pi 1, B+, Pi 2'
|
||||
title_suffix = ' at Raspberry Pi GPIO Pinout'
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#Tools
|
||||
|
||||
Example tools which use the Pinout database to do handy dandy things!
|
|
@ -78,7 +78,7 @@ def physical_to(pin, scheme='bcm'):
|
|||
return pin
|
||||
return None
|
||||
|
||||
db = json.load(open('src/{}/pi-pinout.json'.format(lang)))
|
||||
db = json.load(open('../src/{}/pi-pinout.json'.format(lang)))
|
||||
pins = db['pins']
|
||||
|
||||
define = {}
|
||||
|
@ -95,7 +95,7 @@ if len(sys.argv) >= 3:
|
|||
pin_scheme = sys.argv[2]
|
||||
output_lang = sys.argv[3]
|
||||
|
||||
overlay = json.load(open('src/{}/overlay/{}.json'.format(lang,overlay_file)))
|
||||
overlay = json.load(open('../src/{}/overlay/{}.json'.format(lang,overlay_file)))
|
||||
|
||||
if 'i2c' in overlay:
|
||||
for addr in overlay['i2c']:
|
Loading…
Reference in New Issue