mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Enhance "platformio search" command
This commit is contained in:
@ -35,27 +35,72 @@ Examples
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ platformio search
|
$ platformio search
|
||||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
atmelavr (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
atmelsam - An embedded platform for Atmel SAM microcontrollers (with Arduino Framework)
|
--------
|
||||||
stm32 - An embedded platform for STMicroelectronics ARM microcontrollers
|
Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance...
|
||||||
teensy - An embedded platform for Teensy boards (with Arduino Framework)
|
|
||||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
atmelsam (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia and OpenCM3 Frameworks)
|
--------
|
||||||
...
|
Atmel | SMART offers Flash- based ARM products based on the ...
|
||||||
|
|
||||||
|
freescalekinetis (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
----------------
|
||||||
|
Freescale Kinetis Microcontrollers is family of multiple hardware- and ...
|
||||||
|
|
||||||
|
nordicnrf51 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
-----------
|
||||||
|
The Nordic nRF51 Series is a family of highly flexible, multi-protocol ...
|
||||||
|
|
||||||
|
nxplpc (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
------
|
||||||
|
The NXP LPC is a family of 32-bit microcontroller integrated circuits ...
|
||||||
|
|
||||||
|
ststm32 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
-------
|
||||||
|
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M ...
|
||||||
|
|
||||||
|
teensy (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
------
|
||||||
|
Teensy is a complete USB-based microcontroller development syste ...
|
||||||
|
|
||||||
|
timsp430 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
--------
|
||||||
|
MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are ...
|
||||||
|
|
||||||
|
titiva (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
------
|
||||||
|
Texas Instruments TM4C12x MCUs offer the industrys most popular ...
|
||||||
|
|
||||||
2. Search for TI development platforms
|
2. Search for TI development platforms
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ platformio search ti
|
$ platformio search ti
|
||||||
timsp430 - An embedded platform for TI MSP430 microcontrollers (with Energia Framework)
|
timsp430 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
titiva - An embedded platform for TI TIVA C ARM microcontrollers (with Energia Framework)
|
--------
|
||||||
|
MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are ...
|
||||||
|
|
||||||
3. Search for development platforms which support "Arduino Framework"
|
titiva (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
------
|
||||||
|
Texas Instruments TM4C12x MCUs offer the industrys most popular ...
|
||||||
|
|
||||||
|
3. Search for development platforms which support "mbed Framework"
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ platformio search arduino
|
$ platformio search mbed
|
||||||
atmelavr - An embedded platform for Atmel AVR microcontrollers (with Arduino Framework)
|
freescalekinetis (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
atmelsam - An embedded platform for Atmel SAM microcontrollers (with Arduino Framework)
|
----------------
|
||||||
teensy - An embedded platform for Teensy boards (with Arduino Framework)
|
Freescale Kinetis Microcontrollers is family of multiple hardware- and ...
|
||||||
|
|
||||||
|
nordicnrf51 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
-----------
|
||||||
|
The Nordic nRF51 Series is a family of highly flexible, multi-protocol ...
|
||||||
|
|
||||||
|
nxplpc (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
------
|
||||||
|
The NXP LPC is a family of 32-bit microcontroller integrated circuits ...
|
||||||
|
|
||||||
|
ststm32 (available packages: ldscripts, toolchain-gccarmnoneeabi, tool-lm4flash, framework-opencm3, framework-energiativa)
|
||||||
|
-------
|
||||||
|
The STM32 family of 32-bit Flash MCUs based on the ARM Cortex-M ...
|
||||||
|
@ -24,18 +24,23 @@ def cli(query, json_output):
|
|||||||
if query == "all":
|
if query == "all":
|
||||||
query = ""
|
query = ""
|
||||||
|
|
||||||
search_data = "%s %s %s" % (name, info, p.get_installed_packages())
|
search_data = "%s %s %s" % (name, info, p.get_packages())
|
||||||
if query and query.lower() not in search_data.lower():
|
if query and query.lower() not in search_data.lower():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
data.append({
|
data.append({
|
||||||
"name": name,
|
"name": name,
|
||||||
"info": info
|
"info": info,
|
||||||
|
"packages": p.get_packages()
|
||||||
})
|
})
|
||||||
|
|
||||||
if json_output:
|
if json_output:
|
||||||
click.echo(json.dumps(data))
|
click.echo(json.dumps(data))
|
||||||
else:
|
else:
|
||||||
for item in data:
|
for item in data:
|
||||||
click.echo("{name:<20} - {info}".format(
|
click.secho(item['name'], fg="cyan", nl=False)
|
||||||
name=click.style(item['name'], fg="cyan"), info=item['info']))
|
click.echo(" (available packages: %s)" % ", ".join(
|
||||||
|
p.get_packages().keys()))
|
||||||
|
click.secho("-" * len(item['name']), fg="cyan")
|
||||||
|
click.echo(item['info'])
|
||||||
|
click.echo()
|
||||||
|
Reference in New Issue
Block a user