Skip to content

Commit

Permalink
Merge pull request #71 from pr3d4t0r/00070-ssscore-CLI
Browse files Browse the repository at this point in the history
00070 ssscore cli
  • Loading branch information
pr3d4t0r authored Oct 16, 2024
2 parents 35d6f77 + f9f7c82 commit b89d07e
Show file tree
Hide file tree
Showing 12 changed files with 921 additions and 22 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ local:

manpage:
mkdir -p $(MANPAGES)
t=$$(mktemp) && awk -v "v=$(VERSION)" '/^%/ { $$4 = v; print; next; } { print; }' ssscore.md > "$$t" && cat "$$t" > ssscore.md && rm -f "$$t"
pandoc --standalone --to man ssscore.md -o $(MANPAGES)/ssscore.1
t=$$(mktemp) && awk -v "v=$(VERSION)" '/^%/ { $$4 = v; print; next; } { print; }' README.md > "$$t" && cat "$$t" > README.md && rm -f "$$t"
pandoc --standalone --to man README.md -o $(MANPAGES)/ssscoring.1
pandoc --standalone --to man README.md -o $(MANPAGES)/$(PACKAGE).3


nuke: ALWAYS
Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
% ssscoring(3) Version 1.8.1 | Speed Skydiving Scoring API documentation
% ssscoring(3) Version 1.8.2 | Speed Skydiving Scoring API documentation

Name
NAME
====

**SSScoring** - Speed Skydiving Scoring high level library in Python


Synopsis
SYNOPSIS
========
```bash
pip install -U ssscoring
Expand Down Expand Up @@ -37,7 +37,7 @@ resources test-data-01:v1 441 176 305 388 432 442 25.0 4
resources test-data-02:v1 451 164 295 387 441 452 25.0 453
```

![Speed run summary example](./resources/SSScoring-speed-run-summary.png)
![Speed run summary example](https://github.com/pr3d4t0r/SSScoring/blob/master/resources/SSScoring-speed-run-summary.png?raw=true)
Speed run summary example:
https://raw.githubusercontent.com/pr3d4t0r/SSScoring/refs/heads/master/resources/SSScoring-speed-run-summary.png

Expand All @@ -48,7 +48,7 @@ API documentation is available at:
https://pr3d4t0r.github.io/SSScoring/ssscoring.html


Installation and requirements
INSTALLATION AND REQUIREMENTS
=============================

- Python 3.9.9 or later
Expand All @@ -58,7 +58,7 @@ The [requirements.txt](./requirements.txt) file lists all the packages required
for running SSScoring or using the API.


Quickstart
QUICKSTART
==========

- The [SSScoring interactive quickstart](./quickstart.ipynb) notebook for
Expand All @@ -69,7 +69,7 @@ Quickstart
- SSScoring browser tools - EXPERIMENTAL


Description
DESCRIPTION
===========
SSScoring provides analsysis tools for individual or bulk processing of FlySight
GPS competition data gathered during speed skydiving training and competition.
Expand Down Expand Up @@ -154,7 +154,12 @@ representing all the training files for a competitive skydiver over 10 months.
device from a Macintosh computer


License
SEE ALSO
========
ssscore(1)


LICENSE
=======
The **SSScoring** package, documentation and examples are licensed under the
[BSD-3 open source license](https://github.com/pr3d4t0r/SSScoring/blob/master/LICENSE.txt).
Expand Down
2 changes: 1 addition & 1 deletion docs/search.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/ssscoring.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h2>Contents</h2>
<h2>Submodules</h2>
<ul>
<li><a href="ssscoring/calc.html">calc</a></li>
<li><a href="ssscoring/cli.html">cli</a></li>
<li><a href="ssscoring/constants.html">constants</a></li>
<li><a href="ssscoring/datatypes.html">datatypes</a></li>
<li><a href="ssscoring/errors.html">errors</a></li>
Expand Down Expand Up @@ -138,7 +139,7 @@ <h2 id="source-code">Source code</h2>
<section id="__VERSION__">
<div class="attr variable">
<span class="name">__VERSION__</span> =
<span class="default_value">&#39;1.8.1&#39;</span>
<span class="default_value">&#39;1.8.2&#39;</span>


</div>
Expand Down
498 changes: 498 additions & 0 deletions docs/ssscoring/cli.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/ssscoring/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h1 class="modulename">
<div class="attr variable">
<span class="name">FLYSIGHT_1_HEADER</span> =
<input id="FLYSIGHT_1_HEADER-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="FLYSIGHT_1_HEADER-view-value"></label><span class="default_value">{&#39;numSV&#39;, &#39;lat&#39;, &#39;vAcc&#39;, &#39;hAcc&#39;, &#39;heading&#39;, &#39;cAcc&#39;, &#39;time&#39;, &#39;velE&#39;, &#39;velD&#39;, &#39;hMSL&#39;, &#39;lon&#39;, &#39;gpsFix&#39;, &#39;velN&#39;, &#39;sAcc&#39;}</span>
<label class="view-value-button pdoc-button" for="FLYSIGHT_1_HEADER-view-value"></label><span class="default_value">{&#39;numSV&#39;, &#39;lon&#39;, &#39;hAcc&#39;, &#39;time&#39;, &#39;cAcc&#39;, &#39;vAcc&#39;, &#39;lat&#39;, &#39;velD&#39;, &#39;velE&#39;, &#39;heading&#39;, &#39;hMSL&#39;, &#39;velN&#39;, &#39;gpsFix&#39;, &#39;sAcc&#39;}</span>


</div>
Expand Down Expand Up @@ -461,7 +461,7 @@ <h1 class="modulename">
<div class="attr variable">
<span class="name">SKYTRAX_1_HEADER</span> =
<input id="SKYTRAX_1_HEADER-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1">
<label class="view-value-button pdoc-button" for="SKYTRAX_1_HEADER-view-value"></label><span class="default_value">{&#39;numSV&#39;, &#39;lat&#39;, &#39;vAcc&#39;, &#39;hAcc&#39;, &#39;heading&#39;, &#39;cAcc&#39;, &#39;time&#39;, &#39;velE&#39;, &#39;velD&#39;, &#39;hMSL&#39;, &#39;lon&#39;, &#39;gpsFix&#39;, &#39;velN&#39;, &#39;sAcc&#39;}</span>
<label class="view-value-button pdoc-button" for="SKYTRAX_1_HEADER-view-value"></label><span class="default_value">{&#39;numSV&#39;, &#39;lon&#39;, &#39;hAcc&#39;, &#39;time&#39;, &#39;cAcc&#39;, &#39;vAcc&#39;, &#39;lat&#39;, &#39;velD&#39;, &#39;velE&#39;, &#39;heading&#39;, &#39;hMSL&#39;, &#39;velN&#39;, &#39;gpsFix&#39;, &#39;sAcc&#39;}</span>


</div>
Expand Down
111 changes: 111 additions & 0 deletions manpages/ssscore.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
.\" Automatically generated by Pandoc 3.1.3
.\"
.\" Define V font for inline verbatim, using C font in formats
.\" that render this, and otherwise B font.
.ie "\f[CB]x\f[]"x" \{\
. ftr V B
. ftr VI BI
. ftr VB B
. ftr VBI BI
.\}
.el \{\
. ftr V CR
. ftr VI CI
. ftr VB CB
. ftr VBI CBI
.\}
.TH "ssscore" "1" "" "Version 1.8.2" "Speed Skydiving Scoring command line tool"
.hy
.SH NAME
.PP
\f[B]sscore\f[R] - Speed Skydiving Scoring tool for processing spped
dive FlySight files
.SH SYNOPSIS
.IP
.nf
\f[C]
pip install -U ssscoring
\f[R]
.fi
.PP
\f[V]ssscore\f[R] will be located in either of these paths:
.IP \[bu] 2
\f[V]$VIRTUAL_ENV/bin/ssscore\f[R]
.IP \[bu] 2
\f[V]/usr/local/bin/ssscore\f[R]
.PP
Command after installation:
.IP
.nf
\f[C]
ssscore datalake
\f[R]
.fi
.PP
Where \f[V]datalake\f[R] is a directory containing one or more speed
skydiving tracks, either in the topmost level or nested.
\f[V]ssscore\f[R] ignores all files present in the data lake that
aren\[cq]t speed skydives, even if they are FlySight-compatible CSV
files.
.PP
Examples:
.PP
Scores all of Joe\[cq]s files in his speed skydiving directory:
.IP
.nf
\f[C]
ssscore /Users/joe/speed-skydiving/tracks
\f[R]
.fi
.PP
Score all the files present in the FlySight device mounted at
\f[V]/mnt\f[R]:
.IP
.nf
\f[C]
mount /dev/sda1 /mnt/FLYSIGHT1
ssscore /mnt/FLYSIGHT1
umount /mnt/FLYSIGHT1
\f[R]
.fi
.SH DESCRIPTION
.PP
\f[V]ssscore\f[R] processes speed skydiving FlySight files in bulk.
Track files can be in versions 1 or 2, or even in SkyTrax format.
The program scores files according to the International Skydiving
Commission, the International Speed Skydiving Association, and the
United States Parachute Association scoring and competition rules.
.PP
\f[V]ssscore\f[R] writes only to stdout.
It\[cq]s output may be redicrected or piped as required.
.SH ARGUMENTS
.PP
\f[V]datalake\f[R] is a directory containing one or more speed skydiving
tracks, either at the topmost level or nested.
\f[V]ssscore\f[R] ignores all files present in the data lake that
aren\[cq]t speed skydives, even if they are FlySight-compatible CSV
files.
.PP
The man page or README.md file for the SSScoring API have a longer
description of what a data lake is and how \f[V]ssscore\f[R] treats it.
.SH OOPTIONS
.PP
None.
.SH FILES
.PP
/usr/local/bin/ssscore if installed via \f[V]pip\f[R] to the derault
Python run-time $VIRTUAL_ENV/bin/ssscore if installed to an active
virtual environment
.SH BUGS AND NOTES
.PP
None.
.SH SEE ALSO
.PP
ssscoring(3)
.PP
Project: https://github.com/pr3d4t0r/SSScoring
.SH LICENSE
.PP
The \f[B]SSScoring\f[R] package, documentation and examples are licensed
under the BSD-3 open source
license (https://github.com/pr3d4t0r/SSScoring/blob/master/LICENSE.txt).
17 changes: 10 additions & 7 deletions manpages/ssscoring.1 → manpages/ssscoring.3
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
. ftr VB CB
. ftr VBI CBI
.\}
.TH "ssscoring" "3" "" "Version 1.8.1" "Speed Skydiving Scoring API documentation"
.TH "ssscoring" "3" "" "Version 1.8.2" "Speed Skydiving Scoring API documentation"
.hy
.SH Name
.SH NAME
.PP
\f[B]SSScoring\f[R] - Speed Skydiving Scoring high level library in
Python
.SH Synopsis
.SH SYNOPSIS
.IP
.nf
\f[C]
Expand Down Expand Up @@ -66,15 +66,15 @@ It aggregates and summarizes the results.
Full API documentation is available at:
.PP
https://pr3d4t0r.github.io/SSScoring/ssscoring.html
.SH Installation and requirements
.SH INSTALLATION AND REQUIREMENTS
.IP \[bu] 2
Python 3.9.9 or later
.IP \[bu] 2
pandas and NumPy
.PP
The requirements.txt file lists all the packages required for running
SSScoring or using the API.
.SH Quickstart
.SH QUICKSTART
.IP \[bu] 2
The SSScoring interactive quickstart notebook for Jupyter/Lucyfer is the
fastest way to learn how to use the library
Expand All @@ -85,7 +85,7 @@ speed skydives from the command line with minimum installation -
EXPERIMENTAL
.IP \[bu] 2
SSScoring browser tools - EXPERIMENTAL
.SH Description
.SH DESCRIPTION
.PP
SSScoring provides analsysis tools for individual or bulk processing of
FlySight GPS competition data gathered during speed skydiving training
Expand Down Expand Up @@ -187,7 +187,10 @@ FlySight file file systems
.IP \[bu] 2
\f[V]umountFlySight\f[R] Mac app and shell script for safe unmounting of
a FlySight device from a Macintosh computer
.SH License
.SH SEE ALSO
.PP
ssscore(1)
.SH LICENSE
.PP
The \f[B]SSScoring\f[R] package, documentation and examples are licensed
under the BSD-3 open source
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ license = { text = 'BSD-3-Clause' }
name = "ssscoring" # $(PACKAGE) and package.txt
readme = "README.md"
requires-python = ">=3.9.9"
version = '1.8.1'
version = '1.8.2'


[project.scripts]
ssscoring = "ssscoring:_main"
ssscoring = "ssscoring.cli:ssscoreCommand"


[tool.pytest.ini_options]
Expand Down
99 changes: 99 additions & 0 deletions ssscore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
% ssscore(1) Version 1.8.2 | Speed Skydiving Scoring command line tool

NAME
====

**sscore** - Speed Skydiving Scoring tool for processing spped dive FlySight
files


SYNOPSIS
========
```bash
pip install -U ssscoring
```

`ssscore` will be located in either of these paths:

- `$VIRTUAL_ENV/bin/ssscore`
- `/usr/local/bin/ssscore`

Command after installation:

```bash
ssscore datalake
```

Where `datalake` is a directory containing one or more speed skydiving tracks,
either in the topmost level or nested. `ssscore` ignores all files present in
the data lake that aren't speed skydives, even if they are FlySight-compatible
CSV files.

Examples:

Scores all of Joe's files in his speed skydiving directory:

```bash
ssscore /Users/joe/speed-skydiving/tracks
```

Score all the files present in the FlySight device mounted at `/mnt`:

```bash
mount /dev/sda1 /mnt/FLYSIGHT1
ssscore /mnt/FLYSIGHT1
umount /mnt/FLYSIGHT1
```


DESCRIPTION
===========
`ssscore` processes speed skydiving FlySight files in bulk. Track files can
be in versions 1 or 2, or even in SkyTrax format. The program scores files
according to the International Skydiving Commission, the International Speed
Skydiving Association, and the United States Parachute Association scoring and
competition rules.

`ssscore` writes only to stdout. It's output may be redicrected or piped as
required.


ARGUMENTS
=========
`datalake` is a directory containing one or more speed skydiving tracks,
either at the topmost level or nested. `ssscore` ignores all files present in
the data lake that aren't speed skydives, even if they are FlySight-compatible
CSV files.

The man page or README.md file for the SSScoring API have a longer description
of what a data lake is and how `ssscore` treats it.


OOPTIONS
========
None.


FILES
=====
/usr/local/bin/ssscore if installed via `pip` to the derault Python run-time
$VIRTUAL_ENV/bin/ssscore if installed to an active virtual environment


BUGS AND NOTES
==============
None.


SEE ALSO
========
ssscoring(3)

Project: https://github.com/pr3d4t0r/SSScoring


LICENSE
=======
The **SSScoring** package, documentation and examples are licensed under the
[BSD-3 open source license](https://github.com/pr3d4t0r/SSScoring/blob/master/LICENSE.txt).

Loading

0 comments on commit b89d07e

Please sign in to comment.