-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update landing pages, plus doc fixes (#2443)
This PR fixes some dodgy headings in the library listings, but mainly it's intended to try and highlight some of the more distinctive features of the framework in the main README file (both repository and readthedocs).
- Loading branch information
Showing
9 changed files
with
161 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Sming/Libraries/.patches/Adafruit_BME280_Library/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Adafruit BME280 Library | ||
|
||
[](https://github.com/adafruit/Adafruit_BME280_Library/actions)[](http://adafruit.github.io/Adafruit_BME280_Library/html/index.html) | ||
|
||
<a href="http://www.adafruit.com/products/2652"><img src="https://raw.githubusercontent.com/adafruit/Adafruit_BME280_Library/master/assets/board.jpg" width="500"/></a> | ||
|
||
This is a library for the Adafruit BME280 Humidity, Barometric Pressure + Temp sensor | ||
|
||
Designed specifically to work with the [Adafruit BME280 Breakout](http://www.adafruit.com/products/2652). | ||
|
||
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! | ||
|
||
## About this Driver | ||
Written by Ladyada for Adafruit Industries. | ||
|
||
BSD license, check license.txt for more information | ||
|
||
All text above must be included in any redistribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# | ||
# Build map of output files to source URLs so that edit links are created correctly | ||
# | ||
|
||
import os | ||
import sys | ||
import subprocess | ||
import shutil | ||
|
||
SMINGDIR = "../.." | ||
GIT = shutil.which('git') | ||
|
||
|
||
def gitcmd(args, **kwargs): | ||
kwargs['stdout'] = subprocess.PIPE | ||
with subprocess.Popen([GIT] + args, **kwargs) as child: | ||
return child.stdout.read().decode() | ||
|
||
|
||
def urljoin(elements): | ||
res = '' | ||
for e in elements: | ||
if e == '': | ||
continue | ||
if res != '' and not res.endswith('/'): | ||
res += '/' | ||
res += e | ||
return res | ||
|
||
|
||
def getRemotePath(srcdir): | ||
return gitcmd(['rev-parse', '--show-prefix'], cwd=srcdir).strip() | ||
|
||
|
||
def getRemoteUrl(srcdir): | ||
return gitcmd(['config', '--get', 'remote.origin.url'], cwd=srcdir).strip() | ||
|
||
|
||
def getRemoteCommit(srcdir): | ||
return gitcmd(['describe', '--always', 'HEAD'], cwd=srcdir).strip() | ||
|
||
|
||
# Get map of directories to submodule URLs | ||
def buildFileMap(ctx): | ||
# index.rst files may be generated from README.md or README.rst | ||
def getSourceFilename(srcdir, filename): | ||
if filename != 'index.rst': | ||
return filename | ||
if os.path.exists(f"{srcdir}/README.md"): | ||
return 'README.md' | ||
if os.path.exists(f"{srcdir}/README.rst"): | ||
return 'README.rst' | ||
return filename | ||
|
||
filemap = {} | ||
for dirpath, dirnames, filenames in os.walk('_inc'): | ||
srcpath = dirpath[5:] # skip '_inc/' | ||
srcdir = os.path.join(SMINGDIR, srcpath) | ||
# print(f"srcdir = {srcdir}", file=sys.stderr) | ||
remotePath = getRemotePath(srcdir) | ||
url = os.path.splitext(getRemoteUrl(srcdir))[0] | ||
commit = getRemoteCommit(srcdir) | ||
for f in filenames: | ||
s = urljoin([url, 'blob', commit, remotePath, getSourceFilename(srcdir, f)]) | ||
filemap[f"{dirpath}/{f}"] = s | ||
|
||
# for k, v in filemap.items(): | ||
# print(f"{k}: {v}", file=sys.stderr) | ||
|
||
return filemap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters