Updated docs.

development
Shawn Davis 4 years ago
parent c41b509385
commit 2ad8759147
  1. 4
      Makefile
  2. 2
      VERSION.txt
  3. 4
      docs/generate_command_signatures.py
  4. 333
      docs/source/_includes/overlays.rst
  5. 25
      docs/source/getting-started.rst
  6. 25
      docs/source/project.rst
  7. 9
      docs/source/topics-configuration.rst
  8. 3
      docs/source/topics-overlays.rst
  9. 8
      scripttease/version.py
  10. 8
      setup.py

@ -54,6 +54,10 @@ lines:
publish: publish:
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*; twine upload --repository-url https://upload.pypi.org/legacy/ dist/*;
#> secure - Run security checks on the code base.
secure:
bandit -r $(PACKAGE_NAME);
#> tests - Run unit tests and generate coverage report. #> tests - Run unit tests and generate coverage report.
tests: tests:
coverage run --source=. -m pytest; coverage run --source=. -m pytest;

@ -1 +1 @@
6.6.1-d 6.7.0

@ -116,10 +116,11 @@ print_mapping(PGSQL_MAPPINGS)
print_heading("POSIX") print_heading("POSIX")
print_description("Posix commands form the basis of overlays for nix platforms.") print_description("Posix commands form the basis of overlays for nix platforms.")
print_mapping(POSIX_MAPPINGS) print_mapping(POSIX_MAPPINGS, excludes=["func"])
exclude_from_centos = COMMON_MAPPINGS.copy() exclude_from_centos = COMMON_MAPPINGS.copy()
exclude_from_centos.update(DJANGO_MAPPINGS) exclude_from_centos.update(DJANGO_MAPPINGS)
exclude_from_centos.update(MYSQL_MAPPINGS)
exclude_from_centos.update(PGSQL_MAPPINGS) exclude_from_centos.update(PGSQL_MAPPINGS)
exclude_from_centos.update(POSIX_MAPPINGS) exclude_from_centos.update(POSIX_MAPPINGS)
print_heading("Cent OS") print_heading("Cent OS")
@ -129,6 +130,7 @@ print_mapping(CENTOS_MAPPINGS, excludes=exclude_from_centos)
exclude_from_ubuntu = COMMON_MAPPINGS.copy() exclude_from_ubuntu = COMMON_MAPPINGS.copy()
exclude_from_ubuntu.update(DJANGO_MAPPINGS) exclude_from_ubuntu.update(DJANGO_MAPPINGS)
exclude_from_ubuntu.update(MYSQL_MAPPINGS)
exclude_from_ubuntu.update(PGSQL_MAPPINGS) exclude_from_ubuntu.update(PGSQL_MAPPINGS)
exclude_from_ubuntu.update(POSIX_MAPPINGS) exclude_from_ubuntu.update(POSIX_MAPPINGS)
print_heading("Ubuntu") print_heading("Ubuntu")

@ -659,17 +659,6 @@ Extract a file archive.
to_path: None to_path: None
view: False view: False
func
----
A function that may be used to organize related commands to be called together.
.. code-block:: ini
[run func command]
func: name
commands: None
comment: None
mkdir mkdir
----- -----
@ -957,167 +946,6 @@ Install a system-level package.
[run install command] [run install command]
install: name install: name
mysql.create
------------
Create a MySQL database.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- owner (str): The owner (user/role name) of the new database.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.create command]
mysql.create: database
host: localhost
owner: None
password: None
port: 3306
user: root
mysql.drop
----------
Drop (remove) a MySQL database.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.drop command]
mysql.drop: database
host: localhost
password: None
port: 3306
user: root
mysql.dump
----------
Dump (export) a MySQL database.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.dump command]
mysql.dump: database
file_name: None
host: localhost
inserts: False
password: None
port: 3306
user: root
mysql.exists
------------
Determine if a MySQL database exists.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.exists command]
mysql.exists: database
host: localhost
password: None
port: 3306
user: root
mysql.grant
-----------
Grant privileges to a user.
- to (str): The user name to which privileges are granted.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- privileges (str): The privileges to be granted.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.grant command]
mysql.grant: to
database: None
host: localhost
password: None
port: 3306
privileges: ALL
user: root
mysql.sql
---------
Execute a MySQL statement.
- sql (str): The SQL to run.
- database (str): The name of the database.
- host (str): The host name.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.sql command]
mysql.sql: sql
database: default
host: localhost
password: None
port: 3306
user: root
mysql.user
----------
Work with a MySQL user.
- name (str): The user name.
- host (str): The host name.
- op (str): The operation to perform: ``create``, ``drop``, ``exists``.
- passwd (str): The password for a new user.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.user command]
mysql.user: name
host: localhost
op: create
passwd: None
password: None
port: 3306
user: root
reload reload
------ ------
@ -1317,167 +1145,6 @@ Install a system-level package.
[run install command] [run install command]
install: name install: name
mysql.create
------------
Create a MySQL database.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- owner (str): The owner (user/role name) of the new database.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.create command]
mysql.create: database
host: localhost
owner: None
password: None
port: 3306
user: root
mysql.drop
----------
Drop (remove) a MySQL database.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.drop command]
mysql.drop: database
host: localhost
password: None
port: 3306
user: root
mysql.dump
----------
Dump (export) a MySQL database.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.dump command]
mysql.dump: database
file_name: None
host: localhost
inserts: False
password: None
port: 3306
user: root
mysql.exists
------------
Determine if a MySQL database exists.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.exists command]
mysql.exists: database
host: localhost
password: None
port: 3306
user: root
mysql.grant
-----------
Grant privileges to a user.
- to (str): The user name to which privileges are granted.
- database (str): The database name.
- host (str): The database host name or IP address.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number of the MySQL service running on the host.
- privileges (str): The privileges to be granted.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.grant command]
mysql.grant: to
database: None
host: localhost
password: None
port: 3306
privileges: ALL
user: root
mysql.sql
---------
Execute a MySQL statement.
- sql (str): The SQL to run.
- database (str): The name of the database.
- host (str): The host name.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.sql command]
mysql.sql: sql
database: default
host: localhost
password: None
port: 3306
user: root
mysql.user
----------
Work with a MySQL user.
- name (str): The user name.
- host (str): The host name.
- op (str): The operation to perform: ``create``, ``drop``, ``exists``.
- passwd (str): The password for a new user.
- password (str): The password for the user with sufficient access privileges to execute the command.
- port (int): The TCP port number.
- user (str): The name of the user with sufficient access privileges to execute the command.
.. code-block:: ini
[run mysql.user command]
mysql.user: name
host: localhost
op: create
passwd: None
password: None
port: 3306
user: root
reload reload
------ ------

@ -7,32 +7,21 @@ Getting Started
System Requirements System Requirements
=================== ===================
TODO Python 3.6 or greater is required.
Install Install
======= =======
TODO To install:
Configuration .. code-block:: bash
=============
TODO
Examples
========
TODO pip install python-scripttease;
Next Steps Configuration
========== =============
TODO
Resources
=========
TODO See :ref:`topics-configuration` for creating a command configuration file.
FAQs FAQs
==== ====

@ -32,11 +32,6 @@ Pull Requests
Pull requests are welcome. Such requests should be associated with an issue. We may ignore pull requests that do not have a corresponding issue, so create an issue if one does not already exist. Pull requests are welcome. Such requests should be associated with an issue. We may ignore pull requests that do not have a corresponding issue, so create an issue if one does not already exist.
Translations
------------
TODO: Translations help make Script Tease available to more people around the world.
Blogging Blogging
-------- --------
@ -44,7 +39,7 @@ You may help spread awareness of Script Tease by writing blog posts. We are happ
You may also provide us with a guest post to be included on our blog. You may also provide us with a guest post to be included on our blog.
.. _Let us know if you've created a blog post: https://develmaycare.com/contact/?product=ScriptTease .. _Let us know if you've created a blog post: https://develmaycare.com/contact/?product=Script%20Tease
.. note:: .. note::
We reserve the right to proof and approve or decline all content posted on our web site. We reserve the right to proof and approve or decline all content posted on our web site.
@ -52,12 +47,12 @@ You may also provide us with a guest post to be included on our blog.
Development Development
=========== ===========
TODO
Setting Up For Development Setting Up For Development
-------------------------- --------------------------
TODO 1. Clone the repo at https://github.com/develmaycare/python-scripttease
2. Create a virtual environment and install the requirements from ``requirements.pip``
3. See :ref:`how-to`.
Style Guide Style Guide
----------- -----------
@ -72,16 +67,6 @@ We *do* make a few exceptions and provide additional guidance which is documente
.. _developer docs: https://docs.develmaycare.com/en/developer/ .. _developer docs: https://docs.develmaycare.com/en/developer/
Tips for Successful Development
-------------------------------
TODO
Getting Help
------------
TODO
Dependencies Dependencies
============ ============
@ -105,7 +90,7 @@ Script Tease follows a loose form of `semantic versioning`_. The use of semantic
Cadence Cadence
------- -------
Prior to the 1.0 release, new features may be released at any time. After the 1.0 release, new features are planned for release every 3 months. Patch-level changes (to fix bugs or security issues) are always released as needed. New features (and especially new overlays) are planned for release every 3 months. Patch-level changes (to fix bugs or security issues) are always released as needed.
Long-Term Support Long-Term Support
----------------- -----------------

@ -67,9 +67,14 @@ Example of an "itemized" command:
.. code-block:: ini .. code-block:: ini
[create multiple directories]
mkdir: /var/www/domains/example_com/$item
items: www, www/assets, www/content
recursive: yes
[touch a bunch of files] [touch a bunch of files]
touch = /var/www/domains/example_com/www/$item touch: /var/www/domains/example_com/www/$item
items = index.html, assets/index.html, content/index.html items: index.html, assets/index.html, content/index.html
.. note:: .. note::
Command itemization may vary with the command type. Command itemization may vary with the command type.

@ -6,10 +6,11 @@ Overlays
An overlay is a collection of functions that provide an interface to command creation. An overlay allows configuration files to specify commands in a generic way. When the file is loaded, an overlay may be specified which Script Tease uses to generate commands that are specific to a given operating system. An overlay is a collection of functions that provide an interface to command creation. An overlay allows configuration files to specify commands in a generic way. When the file is loaded, an overlay may be specified which Script Tease uses to generate commands that are specific to a given operating system.
There are currently four (4) general and re-usable overlays: There are currently four (5) general and re-usable overlays:
- common - common
- django - django
- mysql
- pgsql - pgsql
- posix - posix

@ -1,5 +1,5 @@
DATE = "2020-09-24" DATE = "2020-10-06"
VERSION = "6.6.1-d" VERSION = "6.7.0"
MAJOR = 6 MAJOR = 6
MINOR = 6 MINOR = 7
PATCH = 1 PATCH = 0

@ -19,7 +19,13 @@ setup(
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
author='Shawn Davis', author='Shawn Davis',
author_email='shawn@develmaycare.com', author_email='shawn@develmaycare.com',
url='https://github.com/develmaycare/python-scripttease', url='https://develmaycare.com/products/python/scripttease/',
download_url='https://github.com/develmaycare/python-scripttease',
project_urls={
'Documentation': "https://docs.develmaycare.com/en/python-scripttease/latest/",
'Source': "https://github.com/develmaycare/python-scripttease",
'Tracker': "https://github.com/develmaycare/python-scripttease/issues/"
},
packages=find_packages(exclude=["tests", "tests.*"]), packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[

Loading…
Cancel
Save