Help Topics for info

Sample CLI

gway awg find-cable

References

Signature

(*, meters: Union[int, str, NoneType] = None, amps: Union[int, str] = '40', volts: Union[int, str] =
'220', material: Literal['cu', 'al', '?'] = 'cu', max_lines: Union[int, str] = '1', phases:
Literal['1', '3', 1, 3] = '2', conduit: Union[str, bool, NoneType] = None, ground: Union[int, str] =
'1')

Docstring

Calculate the type of cable needed for an electrical system. Args: meters: Cable length (one line) in meters. Required keyword. amps: Load in Amperes. Default: 40 A. volts: System voltage. Default: 220 V. material: 'cu' (copper) or 'al' (aluminum). Default: cu. max_lines: Maximum number of line conductors allowed. Default: 1 phases: Number of phases for AC (1, 2 or 3). Default: 2 conduit: Conduit type or None. ground: Number of ground wires. Returns: dict with cable selection and voltage drop info, or {'awg': 'n/a'} if not possible.

cdv · copy

Sample CLI

gway cdv copy

References

Signature

(table_path: str, old_entry: str, new_entry: str, **kwargs) -> bool

Docstring

Copy a record from old_entry to new_entry, optionally updating fields.

cdv · credit

Sample CLI

gway cdv credit

References

Signature

(table_path: str, entry: str, *, field: str = 'balance', **kwargs) -> bool

Docstring

Add 1 (or amount from kwargs) to the given field for a record.

cdv · debit

Sample CLI

gway cdv debit

References

Signature

(table_path: str, entry: str, *, field: str = 'balance', **kwargs) -> bool

Docstring

Subtract 1 (or amount from kwargs) from the given field for a record.

cdv · delete

Sample CLI

gway cdv delete

References

Signature

(table_path: str, entry_id: str)

Docstring

Remove a record by ID from the CDV table.

cdv · move

Sample CLI

gway cdv move

References

Signature

(table_path: str, old_entry: str, new_entry: str, **kwargs) -> bool

Docstring

Move a record from old_entry to new_entry, optionally updating fields.

cdv · quote

Sample CLI

gway cdv quote

Signature

(string, safe='/', encoding=None, errors=None)

Docstring

quote('abc def') -> 'abc%20def' Each part of a URL, e.g. the path info, the query, etc., has a different set of reserved characters that must be quoted. The quote function offers a cautious (not minimal) way to quote a string for most of these parts. RFC 3986 Uniform Resource Identifier (URI): Generic Syntax lists the following (un)reserved characters. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" Each of the reserved characters is reserved in some component of a URL, but not necessarily in all of them. The quote function %-escapes all characters that are neither in the unreserved chars ("always safe") nor the additional chars set via the safe arg. The default for the safe arg is '/'. The character is reserved, but in typical usage the quote function is being called on a path where the existing slash characters are to be preserved. Python 3.7 updates from using RFC 2396 to RFC 3986 to quote URL strings. Now, "~" is included in the set of unreserved characters. string and safe may be either str or bytes objects. encoding and errors must not be specified if string is a bytes object. The optional encoding and errors parameters specify how to deal with non-ASCII characters, as accepted by the str.encode method. By default, encoding='utf-8' (characters are encoded with UTF-8), and errors='strict' (unsupported characters raise a UnicodeEncodeError).

cdv · update

Sample CLI

gway cdv update

References

Signature

(table_path: str, entry_id: str, **fields)

Docstring

Append or update a record in the CDV table, preserving unspecified fields.

clip · purge

Sample CLI

gway clip purge

References

Signature

(*, history=False)

Docstring

Clears clipboard and optionally wipes history file.

Sample CLI

gway clip track-history

References

Signature

(interval: int = 5, *, stop_after=None, notify=True)

Docstring

Tracks clipboard history by polling at regular intervals. Args: interval (int): Seconds to wait between checks. Default is 5 seconds. stop_after (int | None): Optional maximum duration (in seconds) before stopping. notify (bool): Whether to show GUI notifications for new entries. Writes: Appends new clipboard entries to 'work/clip/history.txt', separated by ' ... '.

Sample CLI

gway etron extract-records

References

Signature

(location, *, add_days=0, after=None, before=None, batch=None)

Docstring

Load data from EV IOCHARGER .json files to CSV format. > gway etron extract_records san-pedro > gway etron extract_records calzada-del-valle > gway etron extract_records porsche-centre This assumes the files are at work/etron/records/<location>.

Sample CLI

gway mail search

References

Signature

(subject_fragment, body_fragment=None)

Docstring

Search emails by subject and optionally body. Use "*" to match any subject.

mtg · search

Sample CLI

gway mtg search

Signature

(query, *, show=True, limit=5, **kwargs)

Docstring

Search for Magic: The Gathering cards using Scryfall API. Parameters: query (str): The search query (name, text, type, etc.) show (bool): If True, print the card(s) info; else, return the results. **kwargs: Extra parameters for the Scryfall search API. Returns: list of dict: List of matching card data dicts if show=False. None: If show=True (prints results directly).

Sample CLI

gway odoo execute-kw

References

Signature

(*args, model: str, method: str, **kwargs) -> dict

Docstring

A generic function to directly interface with Odoo's execute_kw method. Parameters: model (str): The Odoo model to interact with (e.g., 'sale.order'). method (str): The method to call on the model (e.g., 'read', 'write'). args (list): Positional arguments to pass to the method. kwargs (dict): Keyword arguments to pass to the method. Returns: dict: The result of the execute_kw call.

Sample CLI

gway odoo fetch-order

Signature

(order_id)

Docstring

Fetch the details of a specific order by its ID from Odoo, including all line details.

Sample CLI

gway odoo find-quotes

References

Signature

(*, product, quantity: int = 1, state: str = 'draft', **kwargs)

Docstring

Find all sale quotes that contain a given product (by id or name substring) with at least the given quantity. Parameters: product (str or int): Product ID or partial name. quantity (int): Minimum quantity of the product in the quote. Default is 1. state (str): Odoo sale order state (default: 'draft' for quotations). **kwargs: Additional domain filters for sale.order. Returns: list: List of matching sale orders (quotes) with product line details.

Sample CLI

gway odoo get-user-info

References

Signature

(*, username: str) -> dict

Docstring

Retrieve Odoo user information by username.

Sample CLI

gway odoo read-chat

References

Signature

(*, unread: bool = True, username: str = '[ODOO_USERNAME]') -> list[dict]

Docstring

Read chat messages from an Odoo user by username. If unread is True, only return unread messages.

Sample CLI

gway odoo send-chat

Signature

(message: str, *, username: str = '[ODOO_USERNAME]') -> bool

Docstring

Send a chat message to an Odoo user by username.

Sample CLI

gway release build

References

Signature

(*, bump: bool = False, dist: bool = False, twine: bool = False, help_db: bool = True, projects:
bool = False, git: bool = False, all: bool = False, force: bool = False) -> None

Docstring

Build the project and optionally upload to PyPI. Args: bump (bool): Increment patch version if True. dist (bool): Build distribution package if True. twine (bool): Upload to PyPI if True. force (bool): Skip version-exists check on PyPI if True. git (bool): Require a clean git repo and commit/push after release if True. vscode (bool): Build the vscode extension.

Sample CLI

gway screen notify

References

Signature

(message, *, title='GWAY Notice', timeout: int = 10)

Docstring

Show a user interface notification with the specified title and message. Falls back to a visible console printout if GUI notification fails.

Sample CLI

gway screen reminder

References

Signature

(message, *, interval: float = 20.0, daemon=False, lines: int = 2)

Docstring

Starts a thread that periodically takes screenshots. If the screen hasn't changed between intervals, overlays a reminder message and waits for user interaction before resuming.

Sample CLI

gway sql close-connection

References

Signature

(datafile=None, *, sql_engine='sqlite', all=False)

Docstring

Explicitly close one or all cached database connections. Shuts down writer thread if all connections closed.

Sample CLI

gway sql load-csv

References

Signature

(*, connection=None, folder='data', force=False)

Docstring

Recursively loads CSVs from a folder into SQLite tables. Table names are derived from folder/file paths.

Sample CLI

gway sql open-connection

References

Signature

(datafile=None, *, sql_engine='sqlite', autoload=False, force=False, row_factory=False, **dbopts)

Docstring

Initialize or reuse a database connection. Caches connections by sql_engine, file path, and thread ID (if required). Starts writer thread for SQLite.

Sample CLI

gway vbox open-remote

References

Signature

(server_url: str = '[SERVER_URL]', *, path: str = 'vbox', email: str = '[ADMIN_EMAIL]')

Docstring

Create a vbox on a remote system, retrieve the upload link from email, and store it locally. - server_url: Base URL of the remote server (e.g., 'https://example.com') - path: Path on remote server where vbox upload is handled (default 'vbox') - email: Email address to receive the upload link (should be accessible by local mail.search) Returns: dict of stored record fields, or None if unsuccessful.

Sample CLI

gway vbox poll-remote

References

Signature

(server_url: str = '[SERVER_URL]', *, target='work/vbox/remote', interval=3600)

Docstring

Poll the remote vbox for files and download new/updated ones to the local target directory. - server_url: Remote GWAY instance base URL - target: Local directory to save downloaded files - interval: Seconds between polls (runs forever unless interval=None) Skips files already downloaded by using the modified_since parameter.

Sample CLI

gway vbox view-downloads

References

Signature

(*hashes: tuple[str], vbid: str = None, modified_since=None, **kwargs)

Docstring

GET: Show list of files in the box (with hash), allow selection/downloads. If a single hash is provided, return that file. Multiple hashes are not supported yet. - Allows access via full vbid (short.long) or short-only (just the folder name). - If full vbid is used, shows link to upload more files. - If modified_since is passed (as iso or epoch seconds), only send file if newer, else 304.

TODOs

# TODO: Support multiple hashes by checking them one by one. If the first doesn't exist, # try the next and so forth. Give up when every hash fails to match. First matches is chosen first.



Sample CLI

gway ocpp.csms view-charger-status

References

Signature

(*, action=None, charger_id=None, **_)

Docstring

Card-based OCPP dashboard: summary of all charger connections.

Sample CLI

gway ocpp.sink setup-sink-app

References

Signature

(*, app=None)

Docstring

Basic OCPP passive sink for messages, acting as a dummy CSMS server. This won't pass compliance or provide authentication. It just accepts and logs all. Note: This version of the app was tested at the EVCS with real EVs.

Sample CLI

gway web.app setup

References

Signature

(*, app=None, project='web.site', path=None, home: str = None, views: str = 'view', apis: str =
'api', static='static', shared='shared', css='global', js='global', auth_required=False,
engine='bottle')

Docstring

Setup Bottle web application with symmetrical static/shared public folders. Only one project per app. CSS/JS params are used as the only static includes.

Sample CLI

gway web.auth config-basic

References

Signature

(*, allow='work/basic_auth.cdv', engine='auto', optional=False)

Docstring

Register a basic authentication challenge using username/password pairs from a CDV. Username is the key, password is the value under 'b64' (base64-encoded). - If optional=True, failure does not block unless strict=True.

Sample CLI

gway web.auth create-user

References

Signature

(username, password, *, allow='work/basic_auth.cdv', overwrite=False, **fields)

Docstring

Create (or update if overwrite=True) a user in the CDV file for basic auth. Stores password as b64 field (base64 encoded). You can pass extra fields as kwargs.

Sample CLI

gway web.cookies view-my-mask

Signature

(*, claim=None, set_mask=None)

Docstring

View and manage mask linking for cookies. - GET: Shows current mask and allows claim or update. - POST (claim/set_mask): Claim a mask and save/load cookies to/from masks.cdv. If user claims an existing mask AND already has a mask cookie, ALL existing cookies (except cookies_accepted) are wiped before restoring the claimed mask. No wipe is performed when creating a new mask.

Sample CLI

gway web.error view-debug-error

References

Signature

(*, title='GWAY Debug Error', message='An error occurred.', err=None, status=500, default=None)

Docstring

Render a debug error view with detailed traceback and request info.

Sample CLI

gway web.nav style-selector-form

Signature

(all_styles, selected_style, cookies_enabled, cookies_accepted, project)

Sample CLI

gway web.server start-app

References

Signature

(*, host='[WEBSITE_HOST|127.0.0.1]', port='[WEBSITE_PORT|8888]', ws_port='[WEBSOCKET_PORT|9000]',
debug=False, proxy=None, app=None, daemon=True, threaded=True, is_worker=False, workers=None)

Docstring

Start an HTTP (WSGI) or ASGI server to host the given application. - If `app` is a FastAPI instance, runs with Uvicorn (optionally on ws_port if set). - If `app` is a WSGI app, uses Paste+ws4py or Bottle. - If `app` is a zero-arg factory, it will be invoked (supporting sync or async factories). - If `app` is a list of apps, each will be run in its own thread (each on an incremented port; FastAPI uses ws_port if set).

Sample CLI

gway web.site view-help

References

Signature

(topic='', *args, **kwargs)

Docstring

Render dynamic help based on GWAY introspection and search-style links. If there is an exact match in the search, show it at the top (highlighted).

TODOs

# TODO: Change the wat the help system works: Instead of just using the results of # gw.gelp at all times, compliment this result with other information.


Sample CLI

gway test

References

Signature

(*, root: str = 'tests', filter=None, project=None)

Docstring

Execute all automatically detected test suites, logging to logs/test.log.

TODOs

# TODO: Implement a 'project' mode. Instead of performing the hard-coded GWAY test # suite, run an abstract test battery against the project or collection of projects