-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
590 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Contributor Covenant Code of Conduct | ||
## Our Pledge | ||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone. | ||
|
||
## Our Standards | ||
Examples of behaviour that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language. | ||
- Being respectful of differing viewpoints and experiences. | ||
- Gracefully accepting constructive criticism. | ||
- Focusing on what is best for the community. | ||
- Showing empathy towards other community members. | ||
|
||
Examples of unacceptable behaviour by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances. | ||
- Trolling, insulting/derogatory comments, and personal or political attacks. | ||
- Public or private harassment. | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission. | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting. | ||
|
||
## Our Responsibilities | ||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behaviour and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behaviour. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviour that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an | ||
appointed representative at an online or offline event. Representation of a | ||
project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
Instances of abusive, harassing, or otherwise unacceptable behaviour may be | ||
reported by contacting the project team at mailto:[email protected]. The | ||
project team will review and investigate all complaints, and will respond in a | ||
way that it deems appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an | ||
incident. Further details of specific enforcement policies may be posted | ||
separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 1.4, available at | ||
[http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
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,66 @@ | ||
# Contributing | ||
Please follow these guidelines if you would like to contribute to the project. | ||
|
||
--- | ||
|
||
## Table of Contents | ||
Please read through these guidelines before you get started: | ||
|
||
1. [Questions & Concerns](#questions--concerns) | ||
2. [Issues & Bugs](#issues--bugs) | ||
3. [Feature Requests](#feature-requests) | ||
4. [Submitting Pull Requests](#submitting-pull-requests) | ||
5. [Code Style](#code-style) | ||
|
||
## Questions & Concerns | ||
If you have any questions about using or developing for this project, reach out | ||
to @jfjlaros or send an [email][email]. | ||
|
||
## Issues & Bugs | ||
Submit an [issue][issues] or [pull request][compare] with a fix if you find any | ||
bugs in the project. See [below](#submitting-pull-requests) for instructions on | ||
sending in pull requests, and be sure to reference the [code style | ||
guide](#code-style) first! | ||
|
||
When submitting an issue or pull request, make sure you are as detailed as | ||
possible and fill in all answers to questions asked in the templates. For | ||
example, an issue that simply states "X/Y/Z is not working!" will be closed. | ||
|
||
## Feature Requests | ||
Submit an [issue][issues] to request a new feature. Features fall into one of | ||
two categories: | ||
|
||
1. **Major**: Major changes should be discussed with me via [email][email]. I am | ||
always open to suggestions and will get back to you as soon as I can! | ||
2. **Minor**: A minor feature can simply be added via a [pull request][compare]. | ||
|
||
## Submitting Pull Requests | ||
Before you do anything, make sure you check the current list of [pull | ||
requests][pull] to ensure you are not duplicating anyone's work. Then, do the | ||
following: | ||
|
||
1. Fork the repository and make your changes in a git branch: `git checkout -b | ||
my-branch base-branch` | ||
2. Read and follow the [code style guidelines](#code-style). | ||
3. Make sure your feature or fix does not break the project! Test thoroughly. | ||
4. Commit your changes, and be sure to leave a detailed commit message. | ||
5. Push your branch to your forked repo on GitHub: `git push origin my-branch` | ||
6. [Submit a pull request][compare] and hold tight! | ||
7. If any changes are requested by the project maintainers, make them and | ||
follow this process again until the changes are merged in. | ||
|
||
## Code Style | ||
Please follow the coding style conventions detailed below: | ||
|
||
- [Arduino Style Guide for Writing Libraries][api]. | ||
- [Google C++ Style Guide][cppguide]. | ||
- [Doxygen][doxygen]. | ||
|
||
|
||
[email]: mailto:[email protected] | ||
[issues]: https://github.com/jfjlaros/textparser/issues/new | ||
[compare]: https://github.com/jfjlaros/textparser/compare | ||
[pull]: https://github.com/jfjlaros/textparser/pulls | ||
[api]: https://www.arduino.cc/en/Reference/APIStyleGuide | ||
[cppguide]: https://google.github.io/styleguide/cppguide.html | ||
[doxygen]: http://doxygen.nl/ |
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,28 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behaviour: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. Ubuntu Desktop 18.04] | ||
- Version [e.g. 0.0.14] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always | ||
frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've | ||
considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,40 @@ | ||
# Submit a pull request | ||
Thank you for submitting a pull request. To speed up the review process, please | ||
ensure that everything below is true: | ||
|
||
1. This is not a duplicate of an [existing pull request][1]. | ||
2. No existing features have been broken without good reason. | ||
3. Your commit messages are detailed | ||
4. The code style [guidelines][2] have been followed. | ||
5. Documentation has been updated to reflect your changes. | ||
6. Tests have been added or updated to reflect your changes. | ||
7. All tests pass. | ||
|
||
Any questions should be directed to @jfjlaros. | ||
|
||
--- | ||
|
||
Replace any ":question:" below with information about your pull request. | ||
|
||
## Pull Request Details | ||
Provide details about your pull request and what it adds, fixes, or changes. | ||
|
||
:question: | ||
|
||
## Breaking Changes | ||
Describe what features are broken by this pull request and why, if any. | ||
|
||
:question: | ||
|
||
## Issues Fixed | ||
Enter the issue numbers resolved by this pull request below, if any. | ||
|
||
1. :question: | ||
|
||
## Other Relevant Information | ||
Provide any other important details below. | ||
|
||
:question: | ||
|
||
[1]: https://github.com/jfjlaros/textparser/pulls | ||
[2]: https://github.com/jfjlaros/textparser/blob/master/docs/CONTRIBUTING.md#code-style |
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,23 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install catch valgrind | ||
- name: Test with catch | ||
run: | | ||
cd tests | ||
make check |
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,6 @@ | ||
docs/xml | ||
examples/*/Makefile | ||
examples/*/build/ | ||
src/*o | ||
tests/*.o | ||
tests/run_tests |
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
version: 2 | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.9" | ||
jobs: | ||
pre_build: | ||
- doxygen docs/Doxyfile | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt | ||
|
||
sphinx: | ||
configuration: docs/conf.py |
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,19 @@ | ||
Copyright (c) 2022 by Jeroen F.J. Laros. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,68 @@ | ||
Line based text parser for Arduino. | ||
=================================== | ||
|
||
.. image:: https://img.shields.io/github/last-commit/jfjlaros/textparser.svg | ||
:target: https://github.com/jfjlaros/textparser/graphs/commit-activity | ||
.. image:: https://github.com/jfjlaros/textparser/actions/workflows/arduino-package.yml/badge.svg | ||
:target: https://github.com/jfjlaros/textparser/actions/workflows/arduino-package.yml | ||
.. image:: https://readthedocs.org/projects/arduinotextparser/badge/?version=latest | ||
:target: https://arduinotextparser.readthedocs.io/en/latest | ||
.. image:: https://img.shields.io/github/release-date/jfjlaros/textparser.svg | ||
:target: https://github.com/jfjlaros/textparser/releases | ||
.. image:: https://img.shields.io/github/release/jfjlaros/textparser.svg | ||
:target: https://github.com/jfjlaros/textparser/releases | ||
.. image:: https://www.ardu-badge.com/badge/textparser.svg | ||
:target: https://www.ardu-badge.com/textparser | ||
.. image:: https://img.shields.io/github/languages/code-size/jfjlaros/textparser.svg | ||
:target: https://github.com/jfjlaros/textparser | ||
.. image:: https://img.shields.io/github/languages/count/jfjlaros/textparser.svg | ||
:target: https://github.com/jfjlaros/textparser | ||
.. image:: https://img.shields.io/github/languages/top/jfjlaros/textparser.svg | ||
:target: https://github.com/jfjlaros/textparser | ||
.. image:: https://img.shields.io/github/license/jfjlaros/textparser.svg | ||
:target: https://raw.githubusercontent.com/jfjlaros/textparser/master/LICENSE.md | ||
|
||
---- | ||
|
||
This library provides a simple way to parse line based data. | ||
|
||
Please see ReadTheDocs_ for the latest documentation. | ||
|
||
|
||
Quick start | ||
----------- | ||
|
||
A ``TextParser`` object is initialised with a delimiter, which can consist of | ||
more than one symbol. | ||
|
||
.. code-block:: cpp | ||
#include <textparser.h> | ||
TextParser parser(", "); // Delimiter is a comma followed by a space. | ||
Optionally, an end of line string can be provided when needed. | ||
|
||
.. code-block:: cpp | ||
TextParser parser(", ", "\r\n"); // Strip end of line from strings. | ||
If all fields are of the same type, we can use an array. | ||
|
||
.. code-block:: cpp | ||
int a[5]; | ||
parser.parseLine("1, 2, 3, 4, 5", a); | ||
If the fields have different types, we can use multiple variables. | ||
|
||
.. code-block:: cpp | ||
char a[10]; | ||
int b; | ||
double c; | ||
parser.parseLine("one, 2, 3.4", a, b, c); | ||
.. _Arduino: https://www.arduino.cc | ||
.. _ReadTheDocs: https://arduinotextparser.readthedocs.io |
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,12 @@ | ||
INPUT = src/ | ||
OUTPUT_DIRECTORY = docs/ | ||
|
||
GENERATE_HTML = NO | ||
GENERATE_LATEX = NO | ||
GENERATE_XML = YES | ||
|
||
INLINE_GROUPED_CLASSES = YES | ||
INLINE_SIMPLE_STRUCTS = YES | ||
|
||
EXTENSION_MAPPING = tcc=C++ | ||
FILE_PATTERNS = *.c *.cc *.cpp *.h *.tcc |
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,14 @@ | ||
API documentation | ||
================= | ||
|
||
.. code-block:: cpp | ||
#include <textparser.h> | ||
Class definition | ||
---------------- | ||
|
||
.. doxygenclass:: TextParser | ||
:members: | ||
|
Oops, something went wrong.