Skip to content

Commit

Permalink
doc api reference
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Johnson <[email protected]>
  • Loading branch information
najohnsn committed Sep 18, 2023
1 parent 773cf4c commit 5a7c25c
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 92 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/mkdocs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: mkdocs-build
on:
push:
branches:
- master
- main
jobs:
deploy:
Expand All @@ -12,5 +11,5 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-minify-plugin
- run: pip install --disable-pip-version-check -r requirements.txt
- run: mkdocs gh-deploy --force
5 changes: 2 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ jobs:

- name: Install dependencies
run: |
pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install --disable-pip-version-check -r requirements.txt
- name: Lint
run: |
Expand All @@ -44,7 +43,7 @@ jobs:

- name: Install dependencies
run: |
pip install wheel build twine
pip install --disable-pip-version-check -r requirements.txt
- name: Build dist
run: |
Expand Down
7 changes: 7 additions & 0 deletions docs/ati-compat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ati (compatability)
::: tnz.ati
options:
filters:
- "!^_"
- "!^Ati"
group_by_category: false
6 changes: 6 additions & 0 deletions docs/ati.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# ati
::: tnz.ati
options:
members:
- "ati"
- "Ati"
29 changes: 5 additions & 24 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@
title: Introduction
---

Use a standard terminal emulator as a 3270 terminal interface.

Write
scripts to automate 3270 terminal interaction.

This is both a 3270
terminal emulator and a Python libary.

The zti module provides a 3270
Use a standard terminal emulator as a 3270 terminal interface. Write
scripts to automate 3270 terminal interaction. This is both a 3270
terminal emulator and a Python libary. The zti module provides a 3270
user interface through a Windows Command Prompt or a unix/ascii
terminal.

The tnz module handles the interface to the 3270 data
stream.

The ati module allows for easier 3270 terminal automation.
terminal. The tnz module handles the interface to the 3270 data
stream. The ati module allows for easier 3270 terminal automation.

#### Features
* Runs on many platforms (including z/OS)
Expand Down Expand Up @@ -109,10 +99,6 @@ select text. Once the text is selected, press Enter to copy the
text.** There are other ways to select text, but I this to be the
easiest.

Do NOT use Control-menu->Edit->Paste to paste text (unless the
text in the clipboard has ONLY printable characters - no line
breaks). Instead, **use Shift+Insert to paste**.

Before establishing a session, get the window sized the way you want
it. Window resizing is not handled well in Windows. If you _do_
resize, just use Esc to get to the command prompt then `goto` to get
Expand All @@ -123,11 +109,6 @@ terminal. The character size and font can be set. I recommend
**Lucida Console** - it is readable and the graphic symbols are
fairly good at connecting like they are supposed to.


## Documentation

For additional details, see docstrings in source code.

## Contributing
See [CONTRIBUTING.md](https://github.com/IBM/tnz/blob/main/CONTRIBUTING.md).

Expand Down
2 changes: 2 additions & 0 deletions docs/tnz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# tnz
::: tnz.tnz
7 changes: 7 additions & 0 deletions docs/zti.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# zti
::: tnz.zti
options:
group_by_category: false
members:
- "create"
- "main"
30 changes: 28 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
nav:
- Introduction: index.md
- Colors: colors.md
- Screen Sizing: screen-sizing.md
- Security: security.md
- API Reference:
- ati: ati.md
- ati (compatability): ati-compat.md
- tnz: tnz.md
- zti: zti.md
site_name: Tn3270 to Z Python library
site_url: https://ibm.github.io/tnz
repo_url: https://github.com/IBM/tnz/
edit_uri: edit/main/docs/ # required for GHE, theme will not do Enterprise automatically
# Theme
theme:
name: material
features:
- navigation.expand
palette:
- primary: default
toggle:
Expand All @@ -21,13 +33,27 @@ theme:
# Plugins
plugins:
- search
- mkdocstrings:
handlers:
python:
options:
filters:
- "!^_"
inherited_members: true
separate_signature: true
show_category_heading: true
show_root_toc_entry: false
show_source: false
show_symbol_type_heading: true
show_symbol_type_toc: true
show_if_no_docstring: true
- minify:
minify_html: true

# Markdown extensions
markdown_extensions:
- markdown.extensions.toc:
slugify: !!python/name:pymdownx.slugs.uslugify
slugify: !!python/object/apply:pymdownx.slugs.slugify {kwds: {case: lower}}
permalink: §
- markdown.extensions.admonition:
- markdown.extensions.smarty:
Expand Down Expand Up @@ -63,4 +89,4 @@ markdown_extensions:
- pymdownx.details:
- pymdownx.tabbed:

copyright: Copyright &copy; IBM 2022
copyright: Copyright &copy; IBM 2022, 2023
15 changes: 11 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
ebcdic
pycodestyle
pylint
pytest
black >= 23.3.0; python_version >= "3.8"
build >= 1.0.3
ebcdic >= 1.1.1; sys_platform != "zos"
mkdocs-material >= 9.2.8; python_version >= "3.8"
mkdocs-minify-plugin >= 0.7.1; python_version >= "3.8"
mkdocstrings-python >= 1.1.2; python_version >= "3.8"
pycodestyle >= 2.10.0
pylint >= 2.17.5
pytest >= 7.4.2
twine >= 4.0.2; sys_platform != "zos"
wheel >= 0.41.2
109 changes: 54 additions & 55 deletions tnz/ati.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,18 @@ class Ati():
Automate a set of 3270 terminal sessions.
Methods with ATI function equivalents:
drop
extract
logwrt
num
say
scrhas
send
set
share <called GLOBAL in ATI>
value
wait
when
- drop
- extract
- logwrt
- num
- say
- scrhas
- send
- set
- share <called GLOBAL in ATI>
- value
- wait
- when
Methods from tnz.rexx with ATI function equivalents:
copies
Expand All @@ -181,50 +181,49 @@ class Ati():
words
Methods from Python with ATI function equivalents:
stripl
stript
upper
- stripl
- stript
- upper
ATI functions with no equivalent method implemented:
chr
cms
include
keywait
ord
pull
push
- chr
- cms
- include
- keywait
- ord
- pull
- push
Properties with internal ATI variable equivalents:
age
curcol
currow
date
datetime
display
hitcol
hitrow
hitstr
keylock
keyunlock
logdest
maxcol
maxrow
maxlostwarn
maxwait
milliage
onerror
rc
sendstr
seslost
session
sessionid
sessions
session24
showline
showtype
time
trace
waitsleep
- curcol
- currow
- date
- datetime
- display
- hitcol
- hitrow
- hitstr
- keylock
- keyunlock
- logdest
- maxcol
- maxrow
- maxlostwarn
- maxwait
- milliage
- onerror
- rc
- sendstr
- seslost
- session
- sessionid
- sessions
- session24
- showline
- showtype
- time
- trace
- waitsleep
"""

# dunder methods
Expand Down Expand Up @@ -2818,8 +2817,8 @@ def date(self):
def datetime(self):
"""Current Date/Time
Contains the current date and time in the form yy/mm/dd
hh:mm:ss. To get the date in yyyy/mm/dd hh:mm:ss form, set
Contains the current date and time in the form `yy/mm/dd
hh:mm:ss`. To get the date in `yyyy/mm/dd hh:mm:ss` form, set
the DATEFORM environment variable to LONG (in any case).
"""
if self.__century():
Expand Down Expand Up @@ -2925,7 +2924,7 @@ def sessions(self):
def time(self):
"""Current Time
Contains the current time in the form hh:mm:ss.
Contains the current time in the form `hh:mm:ss`.
"""
return time.strftime("%H:%M:%S")

Expand Down
4 changes: 2 additions & 2 deletions tnz/zti.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Z terminal interface
Like ATI Session Manager.
```
Command usage:
zti [-h] [--nolog] [--noztirc | --rcfile rcfile] [host]
Expand All @@ -13,7 +13,7 @@
--nolog Do not set LOGDEST to zti.log
--noztirc Do not SOURCE .ztirc in home directory
--rcfile rcfile Filename to run using SOURCE
```
Create a command plugin by creating a "zti.commands" entry
point through setup.py that takes a single argument of a
command line string.
Expand Down

0 comments on commit 5a7c25c

Please sign in to comment.