Browse Source

Add short help text and manpage for nsm-data

master
Nils 3 years ago
parent
commit
151e2056c9
  1. 2
      README.md
  2. 3
      documentation/build.py
  3. 15
      documentation/nsm-data.1
  4. 2
      documentation/out/english.html
  5. 2
      documentation/out/german.html
  6. 20
      tools/nsm-data

2
README.md

@ -1,5 +1,5 @@
[//]: # (Generated 2020-05-16T18:52:43.880845. Changes belong into template/documentation/readme.template)
[//]: # (Generated 2020-05-17T23:16:59.789529. Changes belong into template/documentation/readme.template)
#Argodejo
Program version 0.1

3
documentation/build.py

@ -120,6 +120,9 @@ with open ("manpageinclude.h2m", "w") as w:
command = f"help2man ../{METADATA['shortName']} --no-info --include manpageinclude.h2m > {METADATA['shortName']}.1"
subprocess.run(command, capture_output=True, text=True, shell=True)
#help2man for the much simpler nsm-data
commandNsmDataMNan = "help2man ../tools/nsm-data --no-info > nsm-data.1"
subprocess.run(commandNsmDataMNan, capture_output=True, text=True, shell=True)
print ("Built. You still need to run")
print ("sh build-documentation.sh")

15
documentation/nsm-data.1

@ -0,0 +1,15 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.15.
.TH NSM-DATA "1" "May 2020" "nsm-data 1.0" "User Commands"
.SH NAME
nsm-data \- manual page for nsm-data 1.0
.SH DESCRIPTION
usage: nsm\-data [\-h] [\-v]
.PP
nsm\-data is a module for Argodejo. It only communicates over OSC in an NSMSession and has no standalone functionality.
.SS "optional arguments:"
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-v\fR, \fB\-\-version\fR
show program's version number and exit

2
documentation/out/english.html

@ -1241,7 +1241,7 @@ The easiest way is to contact the developers and they will setup the new languag
</div>
<div id="footer">
<div id="footer-text">
Last updated 2020-05-16 18:52:43 +0200
Last updated 2020-05-17 23:16:59 +0200
</div>
</div>
</body>

2
documentation/out/german.html

@ -1247,7 +1247,7 @@ Ansonsten starten Sie argodejo mit diesem Befehl, Sprachcode ändern, vom Termin
</div>
<div id="footer">
<div id="footer-text">
Last updated 2020-05-16 18:52:43 +0200
Last updated 2020-05-17 23:16:59 +0200
</div>
</div>
</body>

20
tools/nsm-data

@ -22,16 +22,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging; logger = logging.getLogger("nsm-data"); logger.info("import")
URL="https://www.laborejo.org/argodejo/nsm-data"
HARD_LIMIT = 512 # no single message longer than this
VERSION= 1.0
#In case the user tries to run this standalone.
import argparse
parser = argparse.ArgumentParser(description="nsm-data is a module for Argodejo. It only communicates over OSC in an NSM-Session and has no standalone functionality.")
parser.add_argument("-v", "--version", action='version', version=str(VERSION))
args = parser.parse_args()
import json
import pathlib
from time import sleep
from sys import exit as sysexit
from nsmclient import NSMClient
URL="https://www.laborejo.org/argodejo/nsm-data"
VERSION= 1.0
HARD_LIMIT = 512 # no single message longer than this
from nsmclient import NSMNotRunningError
def chunkstring(string):
return [string[0+i:HARD_LIMIT+i] for i in range(0, len(string), HARD_LIMIT)]
@ -289,4 +296,7 @@ class DataClient(object):
if __name__ == '__main__':
"""Creating an instance starts the client and does not return"""
DataClient()
try:
DataClient()
except NSMNotRunningError:
parser.print_help()

Loading…
Cancel
Save