From 49ab5e718e8b1648b39df86327f1ae1ea4a00886 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 16 Mar 2015 17:30:23 +0200 Subject: [PATCH] Add "name" and vendor links to frameworks --- docs/frameworks/arduino.rst | 2 ++ docs/frameworks/cmsis.rst | 2 ++ docs/frameworks/energia.rst | 2 ++ docs/frameworks/mbed.rst | 2 ++ docs/frameworks/opencm3.rst | 4 +++- docs/frameworks/spl.rst | 2 ++ platformio/builder/scripts/frameworks/arduino.py | 2 ++ platformio/builder/scripts/frameworks/cmsis.py | 2 ++ platformio/builder/scripts/frameworks/energia.py | 2 ++ platformio/builder/scripts/frameworks/mbed.py | 2 ++ platformio/builder/scripts/frameworks/opencm3.py | 4 +++- platformio/builder/scripts/frameworks/spl.py | 2 ++ platformio/util.py | 7 ++++--- scripts/docspregen.py | 14 ++++++++------ 14 files changed, 38 insertions(+), 11 deletions(-) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index b5784935..024431da 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -4,6 +4,8 @@ Framework ``arduino`` ===================== Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/cmsis.rst b/docs/frameworks/cmsis.rst index 2af8b34c..1fda61fc 100644 --- a/docs/frameworks/cmsis.rst +++ b/docs/frameworks/cmsis.rst @@ -4,6 +4,8 @@ Framework ``cmsis`` =================== The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and simple software interfaces to the processor for interface peripherals, real-time operating systems, and middleware. It simplifies software re-use, reducing the learning curve for new microcontroller developers and cutting the time-to-market for devices. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/energia.rst b/docs/frameworks/energia.rst index a864e7a9..0284ab8c 100644 --- a/docs/frameworks/energia.rst +++ b/docs/frameworks/energia.rst @@ -4,6 +4,8 @@ Framework ``energia`` ===================== Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index 1bf010c6..c70b5ee5 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -4,6 +4,8 @@ Framework ``mbed`` ================== The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/docs/frameworks/opencm3.rst b/docs/frameworks/opencm3.rst index e8b54fb1..a38e646c 100644 --- a/docs/frameworks/opencm3.rst +++ b/docs/frameworks/opencm3.rst @@ -2,7 +2,9 @@ Framework ``opencm3`` ===================== -The libopencm3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. +The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. + +For more detailed information please visit `vendor site `_. .. contents:: diff --git a/docs/frameworks/spl.rst b/docs/frameworks/spl.rst index 47946970..1bcf0576 100644 --- a/docs/frameworks/spl.rst +++ b/docs/frameworks/spl.rst @@ -4,6 +4,8 @@ Framework ``spl`` ================= The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers. +For more detailed information please visit `vendor site `_. + .. contents:: Boards diff --git a/platformio/builder/scripts/frameworks/arduino.py b/platformio/builder/scripts/frameworks/arduino.py index ba3871bc..f9e5e741 100644 --- a/platformio/builder/scripts/frameworks/arduino.py +++ b/platformio/builder/scripts/frameworks/arduino.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +Arduino + Arduino Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. diff --git a/platformio/builder/scripts/frameworks/cmsis.py b/platformio/builder/scripts/frameworks/cmsis.py index 1b9c0236..6410c10f 100644 --- a/platformio/builder/scripts/frameworks/cmsis.py +++ b/platformio/builder/scripts/frameworks/cmsis.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +CMSIS + The ARM Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex-M processor series and specifies debugger interfaces. The CMSIS enables consistent and diff --git a/platformio/builder/scripts/frameworks/energia.py b/platformio/builder/scripts/frameworks/energia.py index d240aa6a..67b4cc10 100644 --- a/platformio/builder/scripts/frameworks/energia.py +++ b/platformio/builder/scripts/frameworks/energia.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +Energia + Energia framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start diff --git a/platformio/builder/scripts/frameworks/mbed.py b/platformio/builder/scripts/frameworks/mbed.py index fec239f4..a53eeb0e 100644 --- a/platformio/builder/scripts/frameworks/mbed.py +++ b/platformio/builder/scripts/frameworks/mbed.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +mbed + The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, diff --git a/platformio/builder/scripts/frameworks/opencm3.py b/platformio/builder/scripts/frameworks/opencm3.py index d89fe44c..ebc23c4d 100644 --- a/platformio/builder/scripts/frameworks/opencm3.py +++ b/platformio/builder/scripts/frameworks/opencm3.py @@ -2,7 +2,9 @@ # See LICENSE for details. """ -The libopencm3 framework aims to create a free/libre/open-source +libOpenCM3 + +The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. diff --git a/platformio/builder/scripts/frameworks/spl.py b/platformio/builder/scripts/frameworks/spl.py index 21394b82..fb7abbbb 100644 --- a/platformio/builder/scripts/frameworks/spl.py +++ b/platformio/builder/scripts/frameworks/spl.py @@ -2,6 +2,8 @@ # See LICENSE for details. """ +SPL + The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal diff --git a/platformio/util.py b/platformio/util.py index 95e7a623..f536bf24 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -284,10 +284,11 @@ def get_frameworks(type_=None): _doc_start = fcontent.index('"""') + 3 fdoc = fcontent[ _doc_start:fcontent.index('"""', _doc_start)].strip() - description = " ".join(fdoc.split("\n")[:-2]) + doclines = [l.strip() for l in fdoc.splitlines() if l.strip()] frameworks[_type] = { - "description": description, - "url": fdoc.split("\n")[-1].strip(), + "name": doclines[0], + "description": " ".join(doclines[1:-1]), + "url": doclines[-1], "script": script_path } get_frameworks._cache = frameworks # pylint: disable=W0212 diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 71e1009a..9b223b8b 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -103,7 +103,6 @@ def generate_platform(name): lines.append(""" For more detailed information please visit `vendor site <%s>`_.""" % p.get_vendor_url()) - lines.append(""" .. contents::""") lines.append(""" @@ -146,18 +145,21 @@ def update_platform_docs(): f.write(generate_platform(name)) -def generate_framework(name, data): - print "Processing framework: %s" % name +def generate_framework(type_, data): + print "Processing framework: %s" % type_ lines = [] - lines.append(".. _framework_%s:" % name) + lines.append(".. _framework_%s:" % type_) lines.append("") - _title = "Framework ``%s``" % name + _title = "Framework ``%s``" % type_ lines.append(_title) lines.append("=" * len(_title)) lines.append(data['description']) lines.append(""" +For more detailed information please visit `vendor site <%s>`_.""" % + data['url']) + lines.append(""" .. contents:: Boards @@ -173,7 +175,7 @@ Boards for board, data in util.get_boards().items(): frameworks = data['frameworks'] vendor = data['vendor'] - if name in frameworks: + if type_ in frameworks: if vendor in vendors: vendors[vendor].append({board: data}) else: