Metadata-Version: 2.1
Name: trytond-web-shortener
Version: 6.0.1
Summary: Tryton module to plug a URL to an action
Home-page: http://www.tryton.org/
Download-URL: http://downloads.tryton.org/6.0/
Author: Tryton
Author-email: bugs@tryton.org
License: GPL-3
Project-URL: Bug Tracker, https://bugs.tryton.org/
Project-URL: Documentation, https://docs.tryton.org/
Project-URL: Forum, https://www.tryton.org/forum
Project-URL: Source Code, https://hg.tryton.org/modules/web_shortener
Keywords: tryton url
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Natural Language :: Bulgarian
Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: Finnish
Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Hungarian
Classifier: Natural Language :: Indonesian
Classifier: Natural Language :: Italian
Classifier: Natural Language :: Persian
Classifier: Natural Language :: Polish
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Romanian
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Natural Language :: Turkish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Office/Business
Requires-Python: >=3.6
License-File: LICENSE

Web Shortener Module
####################

The web_shortener module allows URLs to be shortened. It counts the number of
times the URL is accessed and optionally triggers action.

The module defines a route `/s/<shortened_id>`
which will redirect the queries to the URL registered previously with
`ShortenedURL.get_url`.

Models that need to be callable from a shortened URL must define the method
`shortened_url_execute`. This class method will be called from the underlying
queue with the record and the keywords arguments transmitted when calling
`get_url`.

Shortened URL
*************

- Shortened URL: The shortened URL
- Redirect URL: The URL the request is redirected to
- Record: The record on which `method` will be executed
- Method: The name of the method to call on `record`
- Count: The number of times this shortened URL has been triggered

Configuration
*************

The web_shortener modules uses the parameter from the section:

- `[web]`:

    - `shortener_base`: The base URL without path for shortened URL.
      The default value is composed with the configuration `[web]` `hostname`.


