From f4cf9d1d4b47ac71086909a1feb21ee4438357a8 Mon Sep 17 00:00:00 2001 From: Bashamega Date: Sat, 20 Jan 2024 14:02:10 +0200 Subject: [PATCH] Added Documentation --- docs/author/index.html | 7 ++++ docs/cmdExamples/index.html | 61 ++++++++++++++++++++++++++++++ docs/commenting/index.html | 55 +++++++++++++++++++++++++++ docs/contributing/index.html | 7 ++++ docs/general/index.html | 55 +++++++++++++++++++++++++++ docs/gettingstarted/index.html | 7 ++++ docs/import/index.html | 58 ++++++++++++++++++++++++++++ docs/key/index.html | 69 ++++++++++++++++++++++++++++++++++ docs/license/index.html | 7 ++++ docs/newpackage/index.html | 50 ++++++++++++++++++++++++ docs/packages/index.html | 7 ++++ docs/properties/index.html | 52 +++++++++++++++++++++++++ docs/support/index.html | 7 ++++ index.html | 7 ++++ style.css | 2 + 15 files changed, 451 insertions(+) create mode 100644 docs/cmdExamples/index.html create mode 100644 docs/commenting/index.html create mode 100644 docs/general/index.html create mode 100644 docs/import/index.html create mode 100644 docs/key/index.html create mode 100644 docs/newpackage/index.html create mode 100644 docs/properties/index.html diff --git a/docs/author/index.html b/docs/author/index.html index fd7aab0..202aeab 100644 --- a/docs/author/index.html +++ b/docs/author/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/docs/cmdExamples/index.html b/docs/cmdExamples/index.html new file mode 100644 index 0000000..7680fda --- /dev/null +++ b/docs/cmdExamples/index.html @@ -0,0 +1,61 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    Commandline examples

    +
    +

    Get the list of allowed commands

    +
    april -h
    +

    Get info of the language

    +
    april -a
    +

    Compile an .apl file (april file):

    +
      +
    • This converts the april code to python3 code
    • +
    • Compiled file is saved as filename without extention apl + '_apl.py'
    • +
    +
    april -c file.apl
    +

    Run an .apl file (start the API server):

    +
      +
    • Format for the command is - april -r host:port
    • +
    +
    april -r file.apl 0.0.0.0:8080
    +

    Get the version of april:

    +
    april -v
    +
    +
    + + + \ No newline at end of file diff --git a/docs/commenting/index.html b/docs/commenting/index.html new file mode 100644 index 0000000..0c9b72d --- /dev/null +++ b/docs/commenting/index.html @@ -0,0 +1,55 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    License

    +
    +
      +
    • This can be done by using '//'
    • +
    • There is only single line commenting
    • +
    +

    Example:

    +
    + // Program 1 +
    +
    + IMPORT X // importing x +
    +
    +
    + + + \ No newline at end of file diff --git a/docs/contributing/index.html b/docs/contributing/index.html index 31da46b..08e9ce6 100644 --- a/docs/contributing/index.html +++ b/docs/contributing/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/docs/general/index.html b/docs/general/index.html new file mode 100644 index 0000000..92cd978 --- /dev/null +++ b/docs/general/index.html @@ -0,0 +1,55 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    License

    +
    +
    • General format:
    +

    <request_type eg: get,post..>(<the api endpoint, use '{var-name}' when there is a variable in the endpoint url eg: '/home/page/{}'>) : +

    +

    Examples

    +

    Making a GET end point:

    +
    get('/home') : python3 home.py
    +

    Making a Get endpoint with 1/more variables:

    +
    get('/home/page/{x}/para/{y}') : python3 home.py
    +

    Then the rest is done with the help of packages made for integrating april with them. You can find the list of packages here.

    + + +
    +
    + + + \ No newline at end of file diff --git a/docs/gettingstarted/index.html b/docs/gettingstarted/index.html index 40fa9ef..990401f 100644 --- a/docs/gettingstarted/index.html +++ b/docs/gettingstarted/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/docs/import/index.html b/docs/import/index.html new file mode 100644 index 0000000..ab84a92 --- /dev/null +++ b/docs/import/index.html @@ -0,0 +1,58 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    Import

    +
    +
      +
    • You can import other april files into an april program +
    • +
    • Importing an other apl code would ignore the keyword commands from the imported file +
    • +
    • Importing can be used to apply the same endpoints in your apl file +
    • +
    • You just need to mention the file name without extention +
    • +
    • The file should be saved with an .apl extention +
    • +
    +

    Example:

    +
    IMPORT code // the imported code should be saved as code.apl
    +
    +
    + + + \ No newline at end of file diff --git a/docs/key/index.html b/docs/key/index.html new file mode 100644 index 0000000..47090d6 --- /dev/null +++ b/docs/key/index.html @@ -0,0 +1,69 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    Keyword commands

    +
    +
      +
    • +

      Generate Documentation ( 'GEN_DOC {eg : /e/e/doc }' )

      +
    • +
    • +

      Rate Limiting ( 'RATE_LIMIT {how many per min}' )

      +
    • +
    • +

      Disallow Private IP ( 'DISALLOW_PRIVATE_IP' )

      +
    • +
    • +

      Not Allowed IP ( 'NOT_ALLOWED_IP {textfile.txt each ip sep by \n}' )

      +
    • +
    • +

      Import april files ( 'IMPORT {filename}' )

      +
    • +
    • +

      Other keywords:

      +
        +
      • TITLE '{}'
      • +
      • VERSION {}
      • +
      • DESC '{}'
      • +
      +
    • +
    +
    +
    + + + \ No newline at end of file diff --git a/docs/license/index.html b/docs/license/index.html index 782c4ae..96b2716 100644 --- a/docs/license/index.html +++ b/docs/license/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/docs/newpackage/index.html b/docs/newpackage/index.html new file mode 100644 index 0000000..5bfedf8 --- /dev/null +++ b/docs/newpackage/index.html @@ -0,0 +1,50 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    Make a package your self

    +
    +
      +
    • The packages are used to connect the april program and the program dedicated to the endpoint. +
    • +
    • When the program pointed to the endpoint is called the program is suplied with a call ID in the form of commandline argument (last argument). The program can access details related to the request in the json file "." + call ID + ".input". And the output of the program can be put in to the json file "." + call ID + ".output". +
    • +
    +
    +
    + + + \ No newline at end of file diff --git a/docs/packages/index.html b/docs/packages/index.html index df02c5f..cfc78f6 100644 --- a/docs/packages/index.html +++ b/docs/packages/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/docs/properties/index.html b/docs/properties/index.html new file mode 100644 index 0000000..f41def0 --- /dev/null +++ b/docs/properties/index.html @@ -0,0 +1,52 @@ + + + + + + April | Documentation + + + + +
    +
    + + +
    +

    Properties

    +
    +

    These are attributes which can be added to general commands

    +
    +

    Uses '--'

    +
      +
    • --L = {call-per-min} (set limiting for a single endpoint)
    • +
    • --N = {Name for the end point} (to put in docs)
    • +
    • --D = {Desc for the end point} (to put in docs)
    • +
    +
    +
    + + + \ No newline at end of file diff --git a/docs/support/index.html b/docs/support/index.html index faaa7ba..89390b9 100644 --- a/docs/support/index.html +++ b/docs/support/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/index.html b/index.html index 730d531..2a6782e 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,13 @@ About
  • Getting Started
  • +
  • Commandline examples
  • +
  • Key Words
  • +
  • General Commands
  • +
  • Properties
  • +
  • Importing
  • +
  • Creating new package
  • +
  • Commenting
  • Packages
  • Contibuting
  • Support
  • diff --git a/style.css b/style.css index cbd6bbe..665625f 100644 --- a/style.css +++ b/style.css @@ -29,6 +29,8 @@ nav { bottom: 0; left: 0; padding-block: 2rem; + overflow: auto; + } .nav-list {