├── .gitignore ├── .landscape.yml ├── MANIFEST.in ├── Makefile ├── botslogo.bmp ├── complete.yaml ├── compose ├── bots_complete │ ├── Dockerfile │ ├── README.md │ ├── crontab │ ├── postinstall.py │ └── supervisord.conf ├── bots_py27 │ └── Dockerfile ├── bots_py34 │ └── Dockerfile ├── mysql │ └── whatisthis.md └── postgres │ └── whatisthis.md ├── docker-compose.yaml ├── docs ├── .gitignore ├── Makefile ├── advanced-deployment │ ├── bots-https.rst │ ├── change-management.rst │ ├── index.rst │ ├── performance.rst │ ├── use-apache2.rst │ ├── use-as2.rst │ ├── use-mysql.rst │ └── user-rights.rst ├── change-migrate │ ├── bots210.rst │ ├── bots220.rst │ ├── bots300.rst │ ├── bots310.rst │ ├── bots320.rst │ ├── index.rst │ ├── migrate-db.rst │ ├── migrate-django.rst │ └── migrate-kid.rst ├── changes.rst ├── conf.py ├── configuration │ ├── acknowledgements.rst │ ├── channel │ │ ├── channel-ports.rst │ │ ├── channel-scripting.rst │ │ ├── database.rst │ │ ├── file-locking.rst │ │ ├── filenames.rst │ │ ├── index.rst │ │ └── standard-comms.rst │ ├── charsets.rst │ ├── document-view.rst │ ├── grammars │ │ ├── edifact-charsets.rst │ │ ├── get-grammars.rst │ │ ├── index.rst │ │ ├── nextmessage.rst │ │ ├── nextmessageblock.rst │ │ ├── recorddefs.rst │ │ ├── structure.rst │ │ ├── syntax-params.rst │ │ └── xml-namespaces.rst │ ├── how-to-configuration.rst │ ├── index.rst │ ├── mapping-scripts │ │ ├── calculate-count.rst │ │ ├── change-delete.rst │ │ ├── code-conversion.rst │ │ ├── eanupc-check.rst │ │ ├── get-from-msg.rst │ │ ├── how-it-works.rst │ │ ├── index.rst │ │ ├── mapping-functions.rst │ │ ├── persist.rst │ │ └── put-in-msg.rst │ ├── partner │ │ ├── index.rst │ │ ├── organize-partner-translation.rst │ │ ├── partner-groups.rst │ │ ├── partner-lookup.rst │ │ ├── partner-syntax.rst │ │ └── partner-translation.rst │ ├── route │ │ ├── composite-routes.rst │ │ ├── index.rst │ │ ├── passthrough.rst │ │ └── route-scripting.rst │ ├── split-merge.rst │ ├── translation │ │ ├── chained-translations.rst │ │ ├── howitworks.rst │ │ ├── index.rst │ │ ├── multiple-versions.rst │ │ └── whatwhen.rst │ └── user-scripting.rst ├── debugging.rst ├── deployment │ ├── archiving.rst │ ├── email-notifications.rst │ ├── index.rst │ ├── multiple-environments.rst │ ├── production-errors.rst │ ├── run-as-service.rst │ └── run-botsengine.rst ├── documentation.rst ├── external-reference.rst ├── get-bots-running.rst ├── guide-for-botsmonitor │ ├── how-to-rereceive.rst │ └── index.rst ├── images │ ├── CCaslist.png │ ├── CCbytype.png │ ├── ChannelScheme.png │ ├── CreateWinSrv1.png │ ├── MappingScheme.png │ ├── Myfirst_details.png │ ├── Myfirst_incoming_all.png │ ├── Myfirst_incoming_last_run.png │ ├── Myfirst_outgoing_last_run.png │ ├── Myfirst_runs.png │ ├── Overviewtechnical.png │ ├── RouteDiagram.png │ ├── RouteDiagram2.png │ ├── RouteDiagramComp.png │ ├── StartChannels.png │ ├── StartRoutes.png │ ├── StartTranslations.png │ ├── TranslationScreenshot1.png │ ├── as2-b2b-implementation.gif │ ├── botslogo_square2.png │ └── favicon.ico ├── index.rst ├── installation.rst ├── introduction.rst ├── make.bat ├── new-to-python.rst ├── overview │ ├── configuration-files.rst │ ├── directories-files.rst │ ├── glossary.rst │ ├── index.rst │ ├── techincal-overview.rst │ └── the-name-bots.rst ├── plugins │ ├── index.rst │ ├── install-plugin.rst │ ├── make-plugin.rst │ ├── plugins-explained.rst │ └── plugins-sourceforge.rst ├── quick-start-guide │ ├── index.rst │ ├── view-results.rst │ ├── walkthrough-setup.rst │ └── what-happened.rst ├── readme.rst ├── troubleshooting.rst ├── tutorials │ ├── edi-basics.rst │ ├── index.rst │ └── odoo-integration.rst └── useful-tools.rst ├── etc └── requirements.txt ├── license.rst ├── postinstallation.py ├── profile-engine.py ├── readme.rst ├── scripts ├── bots-dirmonitor.py ├── bots-engine.py ├── bots-engine2.py ├── bots-grammarcheck.py ├── bots-job2queue.py ├── bots-jobqueueserver.py ├── bots-jobqueueserver.sh ├── bots-plugoutindex.py ├── bots-updatedb.py ├── bots-webserver.py ├── bots-webserverd.sh ├── bots-xml2botsgrammar.py ├── build_rpm.sh ├── build_tar.sh ├── build_win.bat └── build_win64.bat ├── setup.cfg ├── setup.py ├── setup_rpm.py ├── setup_tar.py ├── setup_win.py ├── src └── bots │ ├── __init__.py │ ├── admin.py │ ├── apachewebserver.py │ ├── automaticmaintenance.py │ ├── bots_context.py │ ├── botsconfig.py │ ├── botsglobal.py │ ├── botsinit.py │ ├── botslib.py │ ├── botssqlite.py │ ├── botsupdatedb.py │ ├── cleanup.py │ ├── communication.py │ ├── config │ ├── __init__.py │ ├── bots.ini │ └── settings.py │ ├── dirmonitor.py │ ├── engine.py │ ├── engine2.py │ ├── envelope.py │ ├── forms.py │ ├── grammar.py │ ├── grammarcheck.py │ ├── inmessage.py │ ├── install │ ├── bots.ini │ ├── botsdb │ └── settings.py │ ├── job2queue.py │ ├── jobqueueserver.py │ ├── locale │ └── nl │ │ └── LC_MESSAGES │ │ ├── django.mo │ │ └── django.po │ ├── media │ ├── admin │ │ ├── css │ │ │ ├── base.css │ │ │ ├── changelists.css │ │ │ ├── dashboard.css │ │ │ ├── forms.css │ │ │ ├── ie.css │ │ │ ├── login.css │ │ │ ├── rtl.css │ │ │ └── widgets.css │ │ ├── img │ │ │ ├── changelist-bg.gif │ │ │ ├── changelist-bg_rtl.gif │ │ │ ├── chooser-bg.gif │ │ │ ├── chooser_stacked-bg.gif │ │ │ ├── default-bg-reverse.gif │ │ │ ├── default-bg.gif │ │ │ ├── deleted-overlay.gif │ │ │ ├── gis │ │ │ │ ├── move_vertex_off.png │ │ │ │ └── move_vertex_on.png │ │ │ ├── icon-no.gif │ │ │ ├── icon-unknown.gif │ │ │ ├── icon-yes.gif │ │ │ ├── icon_addlink.gif │ │ │ ├── icon_alert.gif │ │ │ ├── icon_calendar.gif │ │ │ ├── icon_changelink.gif │ │ │ ├── icon_clock.gif │ │ │ ├── icon_deletelink.gif │ │ │ ├── icon_error.gif │ │ │ ├── icon_searchbox.png │ │ │ ├── icon_success.gif │ │ │ ├── inline-delete-8bit.png │ │ │ ├── inline-delete.png │ │ │ ├── inline-restore-8bit.png │ │ │ ├── inline-restore.png │ │ │ ├── inline-splitter-bg.gif │ │ │ ├── nav-bg-grabber.gif │ │ │ ├── nav-bg-reverse.gif │ │ │ ├── nav-bg-selected.gif │ │ │ ├── nav-bg.gif │ │ │ ├── selector-icons.gif │ │ │ ├── selector-search.gif │ │ │ ├── sorting-icons.gif │ │ │ ├── tool-left.gif │ │ │ ├── tool-left_over.gif │ │ │ ├── tool-right.gif │ │ │ ├── tool-right_over.gif │ │ │ ├── tooltag-add.gif │ │ │ ├── tooltag-add_over.gif │ │ │ ├── tooltag-arrowright.gif │ │ │ └── tooltag-arrowright_over.gif │ │ └── js │ │ │ ├── LICENSE-JQUERY.txt │ │ │ ├── SelectBox.js │ │ │ ├── SelectFilter2.js │ │ │ ├── actions.js │ │ │ ├── actions.min.js │ │ │ ├── admin │ │ │ ├── DateTimeShortcuts.js │ │ │ ├── RelatedObjectLookups.js │ │ │ └── ordering.js │ │ │ ├── calendar.js │ │ │ ├── collapse.js │ │ │ ├── collapse.min.js │ │ │ ├── compress.py │ │ │ ├── core.js │ │ │ ├── getElementsBySelector.js │ │ │ ├── inlines.js │ │ │ ├── inlines.min.js │ │ │ ├── jquery.init.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ ├── prepopulate.js │ │ │ ├── prepopulate.min.js │ │ │ ├── timeparse.js │ │ │ └── urlify.js │ ├── css │ │ ├── bots.css │ │ ├── jquery-ui-timepicker-addon.css │ │ └── jquery-ui.css │ ├── images │ │ ├── botslogo.png │ │ ├── favicon.ico │ │ ├── icon-pass.gif │ │ ├── icon-pass_parse.gif │ │ ├── logfiler.png │ │ ├── star.png │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ └── ui-icons_888888_256x240.png │ └── js │ │ ├── jquery-ui-timepicker-addon.js │ │ └── jquery-ui.min.js │ ├── message.py │ ├── models.py │ ├── node.py │ ├── outmessage.py │ ├── persistfilters.py │ ├── pluglib.py │ ├── plugoutindex.py │ ├── preprocess.py │ ├── py2html.py │ ├── router.py │ ├── sql │ ├── mutex.mysql.sql │ ├── mutex.postgresql_psycopg2.sql │ ├── mutex.sqlite3.sql │ ├── persist.mysql.sql │ ├── persist.postgresql_psycopg2.sql │ ├── persist.sqlite3.sql │ ├── ta.mysql.sql │ ├── ta.postgresql_psycopg2.sql │ ├── ta.sqlite3.sql │ └── uniek.sql │ ├── templates │ ├── 404.html │ ├── 500.html │ ├── admin │ │ ├── base.html │ │ └── submit_line.html │ └── bots │ │ ├── about.html │ │ ├── botslogo.html │ │ ├── confirm.html │ │ ├── delete.html │ │ ├── detail.html │ │ ├── document.html │ │ ├── filer.html │ │ ├── incoming.html │ │ ├── logfiler.html │ │ ├── menu.html │ │ ├── outgoing.html │ │ ├── paginator.html │ │ ├── plugin.html │ │ ├── plugin_index.html │ │ ├── plugout.html │ │ ├── process.html │ │ ├── reports.html │ │ ├── selectform.html │ │ └── srcfiler.html │ ├── templatetags │ ├── __init__.py │ └── botsfilters.py │ ├── transform.py │ ├── urls.py │ ├── usersys │ ├── __init__.py │ ├── charsets │ │ ├── __init__.py │ │ ├── unoa.py │ │ └── unob.py │ ├── communicationscripts │ │ └── __init__.py │ ├── envelopescripts │ │ ├── __init__.py │ │ ├── csv │ │ │ └── __init__.py │ │ ├── database │ │ │ └── __init__.py │ │ ├── edifact │ │ │ └── __init__.py │ │ ├── fixed │ │ │ └── __init__.py │ │ ├── idoc │ │ │ └── __init__.py │ │ ├── json │ │ │ └── __init__.py │ │ ├── jsonnocheck │ │ │ └── __init__.py │ │ ├── template │ │ │ └── __init__.py │ │ ├── tradacoms │ │ │ └── __init__.py │ │ ├── x12 │ │ │ └── __init__.py │ │ ├── xml │ │ │ └── __init__.py │ │ └── xmlnocheck │ │ │ └── __init__.py │ ├── grammars │ │ ├── __init__.py │ │ ├── csv │ │ │ └── __init__.py │ │ ├── edifact │ │ │ └── __init__.py │ │ ├── excel │ │ │ └── __init__.py │ │ ├── fixed │ │ │ └── __init__.py │ │ ├── idoc │ │ │ └── __init__.py │ │ ├── json │ │ │ └── __init__.py │ │ ├── jsonnocheck │ │ │ └── __init__.py │ │ ├── templatehtml │ │ │ ├── __init__.py │ │ │ └── templates │ │ │ │ └── __init__.py │ │ ├── test │ │ │ └── __init__.py │ │ ├── tradacoms │ │ │ └── __init__.py │ │ ├── x12 │ │ │ └── __init__.py │ │ ├── xml │ │ │ └── __init__.py │ │ └── xmlnocheck │ │ │ └── __init__.py │ ├── mappings │ │ ├── __init__.py │ │ ├── csv │ │ │ └── __init__.py │ │ ├── db │ │ │ └── __init__.py │ │ ├── edifact │ │ │ └── __init__.py │ │ ├── excel │ │ │ └── __init__.py │ │ ├── fixed │ │ │ └── __init__.py │ │ ├── idoc │ │ │ └── __init__.py │ │ ├── json │ │ │ └── __init__.py │ │ ├── jsonnocheck │ │ │ └── __init__.py │ │ ├── raw │ │ │ └── __init__.py │ │ ├── tradacoms │ │ │ └── __init__.py │ │ ├── x12 │ │ │ └── __init__.py │ │ ├── xml │ │ │ └── __init__.py │ │ └── xmlnocheck │ │ │ └── __init__.py │ ├── partners │ │ ├── __init__.py │ │ ├── csv │ │ │ └── __init__.py │ │ ├── edifact │ │ │ └── __init__.py │ │ ├── fixed │ │ │ └── __init__.py │ │ ├── idoc │ │ │ └── __init__.py │ │ ├── json │ │ │ └── __init__.py │ │ ├── jsonnocheck │ │ │ └── __init__.py │ │ ├── template │ │ │ └── __init__.py │ │ ├── tradacoms │ │ │ └── __init__.py │ │ ├── x12 │ │ │ └── __init__.py │ │ ├── xml │ │ │ └── __init__.py │ │ └── xmlnocheck │ │ │ └── __init__.py │ └── routescripts │ │ └── __init__.py │ ├── validate_email.py │ ├── viewlib.py │ ├── views.py │ ├── webserver.py │ └── xml2botsgrammar.py └── tests ├── __init__.py ├── unit_multi_1.py ├── unitconfirm.py ├── uniterrorcharsets.py ├── unitfilenameout.py ├── unitformats.py ├── unitgrammar.py ├── unitinisout.py ├── unitnode.py ├── unitretry.py ├── unittranslateutils.py ├── unittranslateutils2.py ├── uniturl.py └── utilsunit.py /.gitignore: -------------------------------------------------------------------------------- 1 | # This is a comment. 2 | 3 | # This file contains a list of generic and python-related files to exclude 4 | # from the git-repository. 5 | # Official documentation can be found at https://git-scm.com/docs/gitignore 6 | # See also: 7 | # - https://github.com/github/gitignore/blob/master/Python.gitignore 8 | # - https://raw.githubusercontent.com/pypa/sampleproject/master/.gitignore 9 | # - https://stackoverflow.com/questions/tagged/gitignore 10 | 11 | # bots-specific 12 | bots/botssys/* 13 | bots/djangolink/ 14 | bots/installwin/ 15 | bots/profile.tmp 16 | bots-webserver_dev.pid 17 | bots/usersys/index.py 18 | copy* 19 | 20 | # vi swap-files 21 | *.swp 22 | 23 | # Backup files 24 | *.~ 25 | 26 | # Byte-compiled / optimized / DLL files 27 | __pycache__ 28 | *.py[cod] 29 | *$py.class 30 | 31 | # C extensions 32 | *.so 33 | 34 | # Distribution / packaging 35 | .eggs/ 36 | *.egg 37 | *.egg-info/ 38 | .installed.cfg 39 | MANIFEST 40 | bin/ 41 | build/ 42 | develop-eggs/ 43 | dist/ 44 | eggs/ 45 | lib/ 46 | lib64/ 47 | parts/ 48 | sdist/ 49 | var/ 50 | 51 | # dotenv 52 | .env 53 | 54 | # Eclipe + PyDev 55 | .pydevproject/ 56 | 57 | # Installer logs 58 | pip-log.txt 59 | pip-delete-this-directory.txt 60 | 61 | # IPython Notebook 62 | .ipynb_checkpoints 63 | 64 | # mr.developer 65 | .mr.developer.cfg 66 | .project 67 | 68 | # PyBuilder 69 | target/ 70 | 71 | # Pycharm setting 72 | .idea/ 73 | 74 | # PyInstaller 75 | # Usually these files are written by a python script from a template 76 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 77 | *.manifest 78 | *.spec 79 | 80 | # pyenv 81 | .python-version 82 | 83 | # Sphinx documentation 84 | docs/_build/ 85 | 86 | # Spyder project settings 87 | .spyderproject 88 | 89 | # Rope project settings 90 | .ropeproject 91 | 92 | # Translations 93 | *.mo 94 | *.pot 95 | 96 | # Unit test / coverage reports 97 | .coverage 98 | .coverage.* 99 | .cache 100 | *,cover 101 | .hypothesis/ 102 | .tox/ 103 | htmlcov/ 104 | nosetests.xml 105 | coverage.xml 106 | 107 | # virtualenv 108 | venv/ 109 | ENV/ 110 | -------------------------------------------------------------------------------- /.landscape.yml: -------------------------------------------------------------------------------- 1 | # Thi is a comment. 2 | 3 | # For documentation on this file, please see 4 | # https://docs.landscape.io/configuration.html 5 | 6 | doc-warnings: yes 7 | test-warnings: no 8 | strictness: high 9 | max-line-length: 160 10 | 11 | #uses: 12 | # - Django 13 | 14 | autodetect: yes 15 | 16 | requirements: 17 | - etc/requirements.txt 18 | 19 | pep8: 20 | full: true 21 | 22 | ignore-paths: 23 | - docs 24 | 25 | ignore-patterns: 26 | - ^example/doc_.*\.py$ 27 | - (^|/)docs(/|$) 28 | 29 | python-targets: 30 | - 2 31 | - 3 32 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.txt 2 | include *.rst 3 | 4 | recursive-include src/bots * 5 | recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif 6 | recursive-include etc * 7 | recursive-include scripts * 8 | recursive-include tests * 9 | 10 | recursive-exclude * __pycache__ 11 | recursive-exclude * *.py[co] 12 | 13 | # prune src/bots/botssys/logging 14 | # prune src/bots/botssys/infile 15 | # prune src/bots/botssys/outfile 16 | # prune src/bots/botssys/archive 17 | # prune src/bots/botssys/data 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | GH_PAGES_SOURCES = docs license.rst setup.py 2 | ghpages: 3 | git checkout gh-pages 4 | rm -rf _build _sources _static _modules 5 | git checkout master $(GH_PAGES_SOURCES) 6 | git reset HEAD 7 | cd docs; 8 | make -f Makefile html; 9 | mv -fv _build/html/* ../; 10 | cd ..; 11 | rm -rf $(GH_PAGES_SOURCES) _build 12 | git add -A 13 | git commit -m "Generated gh-pages" && git push origin gh-pages ; git checkout master 14 | -------------------------------------------------------------------------------- /botslogo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/botslogo.bmp -------------------------------------------------------------------------------- /complete.yaml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | # Running BOTS with Dirmonitor and JobQueue Server enabled. 4 | # The Supervisor uses environment variables SUPERVUSER for HTTP user login and 5 | # SUPERVPASS for password. 6 | 7 | 8 | services: 9 | bots-complete: 10 | build: 11 | context: . 12 | dockerfile: ./compose/bots_complete/Dockerfile 13 | ports: 14 | - "0.0.0.0:8080:8080" 15 | - "0.0.0.0:9001:9001" 16 | environment: 17 | - SUPERVUSER=bots 18 | - SUPERVPASS=botsbots 19 | command: /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf 20 | -------------------------------------------------------------------------------- /compose/bots_complete/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | ENV DEBIAN_FRONTEND noninteractive 3 | 4 | RUN apt-get update 5 | RUN apt-get install -y apt-utils 6 | 7 | # Install requirements for Paramiko (Cryptography) library for SFTP 8 | RUN apt-get install -y build-essential libssl-dev libffi-dev 9 | 10 | # Install Python and Basic Python Tools 11 | RUN apt-get install -y python 12 | RUN apt-get install -y python-dev 13 | RUN apt-get install -y python-distribute 14 | RUN apt-get install -y python-pip 15 | RUN pip install --upgrade pip 16 | 17 | # Copy requirements from source 18 | COPY ./etc /requirements 19 | RUN pip install -r /requirements/requirements.txt 20 | 21 | # Install additional/optional packages 22 | RUN pip install suds-jurko==0.6 23 | RUN pip install paramiko==2.0.2 24 | RUN pip install pycrypto==2.6.1 25 | RUN pip install supervisor==3.3.1 26 | RUN pip install m3-cdecimal==2.3 27 | 28 | # Copy complete source 29 | COPY . /bots 30 | WORKDIR /bots 31 | 32 | # Install BOTS and create directories 33 | RUN pip install /bots 34 | RUN mkdir /usr/local/lib/python2.7/dist-packages/bots/botssys 35 | RUN mkdir /usr/local/lib/python2.7/dist-packages/bots/botssys/sqlitedb 36 | RUN mkdir /dirmon 37 | COPY ./src/bots/install/bots.ini /usr/local/lib/python2.7/dist-packages/bots/config/ 38 | COPY ./src/bots/install/settings.py /usr/local/lib/python2.7/dist-packages/bots/config/ 39 | COPY ./src/bots/install/botsdb /usr/local/lib/python2.7/dist-packages/bots/botssys/sqlitedb/ 40 | 41 | COPY ./compose/bots_complete/postinstall.py /bots 42 | RUN python /bots/postinstall.py 43 | 44 | 45 | # Install DevCron 46 | # failed, missing hg/mercurial : RUN pip install -e hg+https://bitbucket.org/dbenamy/devcron#egg=devcron 47 | RUN pip install devcron 48 | 49 | # Copy Supervisord.conf file 50 | COPY ./compose/bots_complete/supervisord.conf /etc/supervisor/supervisord.conf 51 | 52 | # Add Crontab file 53 | COPY ./compose/bots_complete/crontab /usr/local/lib/python2.7/dist-packages/bots/config/ 54 | 55 | CMD [ /usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf" ] 56 | 57 | EXPOSE 8080 58 | EXPOSE 9001 59 | -------------------------------------------------------------------------------- /compose/bots_complete/README.md: -------------------------------------------------------------------------------- 1 | # The BOTS "Complete" Dockerfile 2 | 3 | ## Introduction 4 | This dockerized version should provide a quick installable version of BOTS that runs "out of the box". 5 | 6 | The file contains a dockerized version with all optional functionalities activiated in BOTS: 7 | 8 | 1. Web-Server (default) 9 | 2. Directory Monitor 10 | 3. Job-Queue 11 | 12 | In addition, following tools are used to control the environment: 13 | 14 | 1. Supervisor to manage start up services 15 | 2. Devcron to manage cron-like jobs 16 | 17 | 18 | ## Docker Compose File 19 | The docker compose file stored at the root of this repo, may be used to create the instance of BOTS by issueing: 20 | 21 | docker-composer -f complete.yaml up 22 | 23 | 24 | Docker will then build BOTS based on Ubuntu 16:04 and Python 2.7. 25 | Supervisor's http log-in can be passwort protected through environment variables, here defined as SUPERVUSER and SUPERVPASS. 26 | 27 | Port 8080 is used to provide BOTS Web interface 28 | Port 9001 is used for Supervisor HTTP interface 29 | 30 | version: '2' 31 | services: 32 | bots-complete: 33 | build: 34 | context: . 35 | dockerfile: ./compose/bots_complete/Dockerfile 36 | ports: 37 | - "0.0.0.0:8080:8080" 38 | - "0.0.0.0:9001:9001" 39 | environment: 40 | - SUPERVUSER=bots 41 | - SUPERVPASS=botsbots 42 | command: /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf 43 | After the build, one can connect to the terminal as follows: 44 | 45 | docker exec -i -t bots_bots-complete_1 /bin/bash 46 | 47 | To share local direcotires with the dockerized BOTS instance, add following to the corresponding entries (example below)docker-compose file. 48 | 49 | volumes: 50 | - ./config:/usr/local/lib/python2.7/dist-packages/bots/config 51 | - ./botssys:/usr/local/lib/python2.7/dist-packages/bots/botssys 52 | - ./usersys:/usr/local/lib/python2.7/dist-packages/bots/usersys 53 | 54 | 55 | 56 | ## The postinstall file 57 | The postinstall changes the default bots.ini to enable: 58 | - job-queue 59 | - map directory monitor to /dirmon directory. To make real use of that, the postinstall file should be amended to provide a route that is called when a file is stored. Currently the route argument remains empty. 60 | 61 | 62 | ## Supervisord 63 | Startup definitions are defined in the supervisord file. 64 | Read more here: [Supervisord.org](http://supervisord.org) 65 | 66 | 67 | ## crontab 68 | The crontab file is copied to the bots/config directory from where the dev-cron is started. When the file is changed, the service may require to be restarted to get the updates (untested..., but definitly if the host is shared from the host). 69 | Read more here: [DevCron](https://bitbucket.org/dbenamy/devcron/overview) 70 | -------------------------------------------------------------------------------- /compose/bots_complete/crontab: -------------------------------------------------------------------------------- 1 | # Edit this file to introduce tasks to be run by cron. 2 | # 3 | # Each task to run has to be defined through a single line 4 | # indicating with different fields when the task will be run 5 | # and what command to run for the task 6 | # 7 | # To define the time you can provide concrete values for 8 | # minute (m), hour (h), day of month (dom), month (mon), 9 | # and day of week (dow) or use '*' in these fields (for 'any').# 10 | # Notice that tasks will be started based on the cron's system 11 | # daemon's notion of time and timezones. 12 | # 13 | # Output of the crontab jobs (including errors) is sent through 14 | # email to the user the crontab file belongs to (unless redirected). 15 | # 16 | # For example, you can run a backup of all your user accounts 17 | # at 5 a.m every week with: 18 | # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ 19 | # 20 | # For more information see the manual pages of crontab(5) and cron(8) 21 | # 22 | # m hh dom mon dow command 23 | 24 | 00,30 0-22 * * * python /usr/local/bin/bots-job2queue.py 'bots-engine.py --automaticretrycommunication' 25 | 05,15,25,35,45,55 * * * * python /usr/local/bin/bots-job2queue.py 'bots-engine.py --new' 26 | -------------------------------------------------------------------------------- /compose/bots_complete/postinstall.py: -------------------------------------------------------------------------------- 1 | import ConfigParser 2 | 3 | config = ConfigParser.ConfigParser() 4 | 5 | config.read(r'/usr/local/lib/python2.7/dist-packages/bots/config/bots.ini') 6 | config.set('jobqueue', 'enabled', 'True') 7 | config.set('dirmonitor1', 'path', '/dirmon') 8 | config.remove_section('dirmonitor2') 9 | with open(r'/usr/local/lib/python2.7/dist-packages/bots/config/bots.ini', 'wb') as configfile: 10 | config.write(configfile) -------------------------------------------------------------------------------- /compose/bots_complete/supervisord.conf: -------------------------------------------------------------------------------- 1 | [program:bots-webserver] 2 | command=python /usr/local/bin/bots-webserver.py 3 | 4 | [program:bots-jobqueue] 5 | command=python /usr/local/bin/bots-jobqueueserver.py 6 | 7 | [program:bots-dirmonitor] 8 | command=python /usr/local/bin/bots-dirmonitor.py 9 | 10 | [program:devcron-scheduler] 11 | command = /usr/local/bin/devcron /usr/local/lib/python2.7/dist-packages/bots/config/crontab 12 | autostart=true 13 | autorestart=true 14 | 15 | [supervisord] 16 | logfile=/tmp/supervisord.log 17 | logfile_maxbytes = 50MB 18 | logfile_backups=10 19 | loglevel = info 20 | pidfile = /tmp/supervisord.pid 21 | nodaemon = true 22 | 23 | [rpcinterface:supervisor] 24 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 25 | 26 | [supervisorctl] 27 | serverurl=unix:///tmp/supervisor.sock 28 | 29 | [inet_http_server] 30 | port = 0.0.0.0:9001 31 | username = %(ENV_SUPERVUSER)s 32 | password = %(ENV_SUPERVPASS)s 33 | 34 | [unix_http_server] 35 | file = /tmp/supervisor.sock 36 | chmod = 0777 -------------------------------------------------------------------------------- /compose/bots_py27/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:2.7 2 | 3 | ENV PYTHONUNBUFFERED 1 4 | 5 | COPY ./etc /requirements 6 | 7 | RUN pip install --upgrade pip 8 | RUN pip install -r /requirements/requirements.txt 9 | 10 | COPY . /bots 11 | WORKDIR /bots 12 | 13 | RUN pip install /bots 14 | RUN mkdir /usr/local/lib/python2.7/site-packages/bots/botssys 15 | RUN mkdir /usr/local/lib/python2.7/site-packages/bots/botssys/sqlitedb 16 | COPY ./src/bots/install/bots.ini /usr/local/lib/python2.7/site-packages/bots/config/ 17 | COPY ./src/bots/install/settings.py /usr/local/lib/python2.7/site-packages/bots/config/ 18 | COPY ./src/bots/install/botsdb /usr/local/lib/python2.7/site-packages/bots/botssys/sqlitedb/ 19 | 20 | CMD [ "python", "-u", "/usr/local/bin/bots-webserver.py" ] 21 | EXPOSE 8080 22 | -------------------------------------------------------------------------------- /compose/bots_py34/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.4 2 | 3 | ENV PYTHONUNBUFFERED 1 4 | 5 | COPY ./etc /requirements 6 | 7 | RUN pip install --upgrade pip 8 | RUN pip install -r /requirements/requirements.txt 9 | 10 | COPY . /bots 11 | WORKDIR /bots 12 | 13 | RUN pip install /bots 14 | RUN mkdir /usr/local/lib/python3.4/site-packages/bots/botssys 15 | RUN mkdir /usr/local/lib/python3.4/site-packages/bots/botssys/sqlitedb 16 | COPY ./src/bots/install/bots.ini /usr/local/lib/python3.4/site-packages/bots/config/ 17 | COPY ./src/bots/install/settings.py /usr/local/lib/python3.4/site-packages/bots/config/ 18 | COPY ./src/bots/install/botsdb /usr/local/lib/python3.4/site-packages/bots/botssys/sqlitedb/ 19 | 20 | CMD [ "python", "-u", "/usr/local/bin/bots-webserver.py" ] 21 | EXPOSE 8080 22 | -------------------------------------------------------------------------------- /compose/mysql/whatisthis.md: -------------------------------------------------------------------------------- 1 | Placeholder for a dockerfile to incorporate MySQL as docker container for testing. 2 | -------------------------------------------------------------------------------- /compose/postgres/whatisthis.md: -------------------------------------------------------------------------------- 1 | Placeholder for a dockerfile to incorporate PostgreSQL as docker container for testing. 2 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | # Purpose is to test compatibility in Python 2.7 and Python 3.4 4 | # TODO: add tests 5 | # Brings up two machines, one with python 3.4 one with python 2.7 6 | # Database by SQLITE 7 | # Config settings copied from install 8 | 9 | services: 10 | bots34: 11 | build: 12 | context: . 13 | dockerfile: ./compose/bots_py34/Dockerfile 14 | ports: 15 | - "0.0.0.0:8080:8080" 16 | bots27: 17 | build: 18 | context: . 19 | dockerfile: ./compose/bots_py27/Dockerfile 20 | ports: 21 | - "0.0.0.0:8081:8080" 22 | 23 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _build/ -------------------------------------------------------------------------------- /docs/advanced-deployment/bots-https.rst: -------------------------------------------------------------------------------- 1 | Bots-Monitor over HTTPS 2 | ======================= 3 | 4 | * This feature is introduced in bots 2.1.0. 5 | * This works with cherrypy > 3.2.0 in combination with python 2.6 or 2.7. In python 2.5 this works (using extra dependency pyOpenssl) but gives problems with reading plugins. 6 | 7 | **Procedure** 8 | 9 | #. You will need an SSL certificate. You can use self-signed certificates. 10 | #. In ``bots/config/bots.ini`` uncomment options ssl_certificate and ssl_private_key (in section webserver), and set these to the right value, eg: 11 | 12 | .. code-block:: ini 13 | 14 | ssl_certificate = /mysafeplace/mycert.pem 15 | ssl_private_key = /mysafeplace/mycert.pem 16 | #In this example certificate and private key are in the same pem-file. 17 | #. Restart bots-webserver 18 | #. Point your browser to the right https-address, eg: https://localhost:8080 19 | 20 | .. note:: 21 | 22 | * If you are using cherrypy and receive an error "ssl_error_rx_record_too_long" try the `2-line fix `_ 23 | * You can create self-signed certificates `here `_ 24 | * You can configure port=443 in bots.ini then just point your browser to https://localhost 25 | -------------------------------------------------------------------------------- /docs/advanced-deployment/index.rst: -------------------------------------------------------------------------------- 1 | Advanced Deployment 2 | =================== 3 | 4 | We will be covering the following topics in this section: 5 | 6 | #. If more users have access to bots-monitor, use limited rights for users. 7 | #. If you use bots-monitor over the internet/outside your LAN, use HTTPS/SSL connection. 8 | #. Use MySQL or PostgreSQL as the Bots database. 9 | #. Use AS2 as a communication method. 10 | #. Bots has options to push changes from test to production. 11 | #. Information about performance. 12 | 13 | .. rubric:: 14 | Index 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | user-rights 20 | bots-https 21 | use-apache2 22 | use-mysql 23 | use-as2 24 | change-management 25 | performance 26 | -------------------------------------------------------------------------------- /docs/advanced-deployment/use-as2.rst: -------------------------------------------------------------------------------- 1 | Using AS2 with Bots 2 | =================== 3 | 4 | * `AS2 (Applicability Statement 2) `_ is a specification about how to transport data securely and reliably over the Internet. 5 | * Security is achieved by using digital certificates and encryption. 6 | * There are multiple forms of AS2, most used is AS2 over HTTP(S). 7 | * AS2 (over HTTP) is a server protocol i.e. to use AS2 you will need an AS2-server. 8 | * Each partner must have their own AS2 communications gateway. 9 | * All AS2 software is designed to be interoperable. There are several open source implementations, as well as commercial software and hosted services. 10 | 11 | .. image:: ../images/as2-b2b-implementation.gif 12 | 13 | **How to use AS2 with Bots** 14 | 15 | Several threads in the mailing list about this: 16 | 17 | * http://groups.google.com/group/botsmail/browse_thread/thread/b98c49f9ec9c4e8a/15e9ed6dbae987f5 18 | * http://groups.google.com/group/botsmail/browse_thread/thread/54c7462a32fb9741/c594d71fb214b8c1 19 | * http://groups.google.com/group/botsmail/browse_thread/thread/9bd0cc65461478b/0bbc729349392a1f 20 | 21 | **AS2 Software** 22 | 23 | * http://sourceforge.net/projects/mec-as2/ 24 | * http://sourceforge.net/projects/openas2/ 25 | * https://github.com/abhishek-ram/pyas2 26 | * http://www.cecid.hku.hk/hermes.php 27 | * http://stackoverflow.com/questions/7426951/is-anyone-using-python-for-gs1-xml-and-as2-edi 28 | 29 | -------------------------------------------------------------------------------- /docs/advanced-deployment/user-rights.rst: -------------------------------------------------------------------------------- 1 | User Rights 2 | =========== 3 | 4 | To add Bots users, select **Users** on the **SysTasks** menu. The Change User screen has a section called **Permissions** which contains the following settings controlling that user's access. 5 | 6 | **Active** 7 | 8 | If this box is checked, the user is able to log on to the webserver and view run details. 9 | 10 | .. note:: 11 | A bug in version 3.1.0 prevents users with only Active status from changing their own passwords. To be fixed in v3.2.0. 12 | 13 | **Staff Status** 14 | 15 | These users may also see the Configuration and Run menu items, depending on specific user permissions (see below). Only the permitted menu items will be visible. If you do not give any extra permissions, only an empty configuration menu is shown. 16 | 17 | **Superuser Status** 18 | 19 | These users can also see the Systasks menu. They have access to all Configuration and Run options without being specifically given permission. The default user (bots) is a superuser. 20 | 21 | .. note:: 22 | Recommendation: Create user names according to your company policy. Disable the default user or change the password; anybody can find out the default user/password for bots! 23 | 24 | **User Permissions for Staff status users** 25 | 26 | Here you can add permissions for specific configuration objects. Only some of the permissions shown in the list are relevant; they control access to the corresponding configuration menu options. Any permissions not listed below can be ignored as they have no effect in Bots GUI. Permissions can be given directly to a user, or to a user group which is then added to multiple users. 27 | 28 | * bots route 29 | * bots channel 30 | * bots translation 31 | * bots partner 32 | * bots confirm rule 33 | * bots user code 34 | * bots user code type 35 | * bots mutex - gives access to the Run menu :sup:`new in version 2.2.0` 36 | 37 | You can use the search box under Available user permissions, then select the required permissions. Use the Ctrl-key to select multple items. Normally, you would give add/change/delete permissions together for the required configuration. 38 | 39 | eg. To allow a staff user to configure channels, give these permissions. 40 | 41 | .. code:: 42 | 43 | bots | channel | Can add channel 44 | bots | channel | Can change channel 45 | bots | channel | Can delete channel 46 | 47 | To allow a staff user access to the Run menu, give this special permission. (mutex is a table that bots uses to indicate a database lock while the engine runs) 48 | 49 | .. code:: 50 | 51 | bots | mutex | Can change mutex 52 | -------------------------------------------------------------------------------- /docs/change-migrate/index.rst: -------------------------------------------------------------------------------- 1 | Changes and Migrate 2 | =================== 3 | 4 | * In this section details are given about changes in new versions amd also how to migrate/upgrade to newer bots versions. 5 | * In general, try to upgrade to new bots version, especially if the version is upward compatible. 6 | * Most of the time migrating will be easy. 7 | * Grammars and mappings have always worked for different versions. 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | bots320 13 | bots310 14 | bots300 15 | bots220 16 | bots210 17 | migrate-kid 18 | migrate-django 19 | migrate-db 20 | -------------------------------------------------------------------------------- /docs/change-migrate/migrate-db.rst: -------------------------------------------------------------------------------- 1 | Migrate Database 2 | ================ 3 | 4 | If you choose to use :doc:`another database <../advanced-deployment/use-mysql>` rather than SQLite, you may want to migrate some or all of your data. You may also migrate data between development and production environments. There are several approaches to this, depending on your needs. 5 | 6 | * Migrate all configuration and transactional data 7 | * Migrate only the configuration, start fresh with transactional data 8 | * Migrate only partial configuration (eg. adding a new route, channels and translation) 9 | 10 | Depending on the approach and the amount of data, several methods could be used. 11 | 12 | * Using bots :doc:`plugin <../plugins/index>` mechanism (write plugin, read plugin) 13 | * Simple, good for configuration 14 | * Works independently of underlying database in use 15 | * **Disadvantage**: very slow (or fails with memory error) for large volumes of transactional or code-conversion data. 16 | * Using bots :doc:`plugin <../plugins/index>` mechanism, and "editing" the plugin 17 | * Plugins are just zip files, you can open them with any zip tool 18 | * Use a tool that allows you to edit files within the zip and re-save them (eg. `IZArc `_ works for this) 19 | * Alternatively, unzip the whole directory structure, make your changes, then zip it again. Make sure the same structure is kept. 20 | * Plugin contains all configuration, you can remove files that are not required (eg. usersys files) 21 | * The file ``botsindex.py`` contains all of the database configuration. You can edit this file and delete records not required. Be careful to keep linked records (eg. channels used by a route). The layout of this file is not very user-friendly, you will need to use "find" in your editor a lot! Records are grouped by type, do not re-arrange their sequence. 22 | * Using SQL (dump, insert) 23 | * If you have a large volume of data to migrate, this will probably be faster. 24 | * add details of how to do this here (I am testing this) 25 | * Additional information here http://www.redmine.org/boards/2/topics/12793. 26 | -------------------------------------------------------------------------------- /docs/change-migrate/migrate-django.rst: -------------------------------------------------------------------------------- 1 | Migrate Django versions 2 | ======================= 3 | 4 | Migrate Django to version 1.3 or greater: 5 | 6 | * `Remove `_ the 1.1 version of Django 7 | * `Download `_ new version. 8 | * Mind: bots 2.2.0 does not support Django 1.4.*. 9 | * Django version 1.3.1 is tested and recommended. 10 | * `Install `_ the new version 11 | * :doc:`Restart <../get-bots-running>` the bots webserver 12 | * Be sure to use the correct bots upgrade plugin to match the version of Django you have installed. 13 | * Bots includes copies of some Django files in it's directory structure. You may need to refresh these from your current Django version if you notice any admin interface "bugs". (eg. selection checkboxes not working correctly). 14 | * Copy from: ``\Lib\site-packages\django\contrib\admin\media`` 15 | * Copy to: ``\Lib\site-packages\bots\media`` 16 | * Include sub-directories: css, img, js 17 | -------------------------------------------------------------------------------- /docs/configuration/channel/channel-ports.rst: -------------------------------------------------------------------------------- 1 | Channel Port Numbers 2 | ==================== 3 | 4 | Some types of channels require a host and port number. These details should be provided to you by the server administrator. If no port number is provided to you, most likely the **default** port is being used. The most common default port numbers are listed below. 5 | 6 | .. csv-table:: 7 | :header: "Channel Type", "Port number" 8 | 9 | "smtp", "25" 10 | "smtps", "587" 11 | "smtpstarttls", "587" 12 | "pop3", "110" 13 | "pop3s", "995" 14 | "pop3apop", "110" 15 | "imap4", "143" 16 | "imap4s", "993" 17 | "ftp", "21" 18 | "ftps", "21" 19 | "sftp", "22" 20 | -------------------------------------------------------------------------------- /docs/configuration/channel/file-locking.rst: -------------------------------------------------------------------------------- 1 | Safe File Writing/Locking 2 | ========================= 3 | 4 | **The Problem** 5 | 6 | * ERP writes an in-house file; bots starts to read this before the file is completely written. 7 | * Bots writes file over FTP, but file is read before Bots finishes writing. 8 | 9 | **The Solution** 10 | 11 | #. Tmp-part file name: bots writes a filename, than renames the file. 12 | 13 | | Example 1. In channel: filename is ``myfilename_*.edi.tmp``, tmp-part is ``.tmp`` 14 | | Bots writes: ``myfilename_12345.edi.tmp`` 15 | | Bots renames: ``myfilename_12345.edi`` 16 | 17 | #. System lock: use system file locks for reading or writing edi files (windows, \*nix). 18 | #. Lock-file: Directory locking: if lock-file exists in directory, directory is locked for reading/writing. Both reader and writer should check for this. 19 | 20 | -------------------------------------------------------------------------------- /docs/configuration/channel/index.rst: -------------------------------------------------------------------------------- 1 | Channels 2 | ======== 3 | 4 | .. epigraph:: 5 | 6 | Definition: Channels take care of communication with partners and backend systems using file I/O, ftp, email, etc. 7 | 8 | A channel is either incoming or outgoing. Examples of channels: 9 | 10 | * Receive email from a pop3-mailbox 11 | * Send to a ftp-server 12 | * Pick up in-house invoices from a directory on your computer 13 | * Put orders in a file queue for import in your application. 14 | 15 | Example of communication channels for bots: 16 | 17 | .. image:: ../../images/ChannelScheme.png 18 | 19 | Notes on naming conventions: 20 | 21 | * incoming = incoming to bots 22 | * outgoing = going out bots 23 | * inbound = my organization receives 24 | * outbound = going out of my organization 25 | 26 | .. note:: 27 | Bots does client communicates (no server). If you need a communication server (eg for ftp, as2), use a separate server. 28 | 29 | **Index** 30 | 31 | .. toctree:: 32 | :maxdepth: 2 33 | 34 | standard-comms 35 | database 36 | channel-scripting 37 | filenames 38 | channel-ports 39 | file-locking 40 | -------------------------------------------------------------------------------- /docs/configuration/channel/standard-comms.rst: -------------------------------------------------------------------------------- 1 | Standard Communications 2 | ======================= 3 | Bots supports a set of communication protocols out of the box such that you only need to configure it in ``bots-monitor->Configuration->Channels`` to get it working. 4 | The set of supported protocols are listed below: 5 | 6 | .. csv-table:: Supported Communication Types 7 | :header: "Protocol", "Description" 8 | :widths: 10, 30 9 | 10 | "file", "Use this to push/pull files with the filesystem, also works with shared file systems." 11 | "smtp", "Use this to send an email to your trading partner with the EDI file." 12 | "smtps", "Same as smtp but additionally uses SSL for secure transmission" 13 | "smtpstarttls", "Same as smtp but additionally uses TLS for secure transmission" 14 | "pop3", "Use this to extract emails with EDI files from your email inbox." 15 | "pop3s", "Same as pop3 but additionally uses SSL for secure transmission" 16 | "pop3sapop", "Same as pop3 but additionally encrypts your password during authentication" 17 | "http", "Use the HTTP protocol to GET or PUT files with your trading partner." 18 | "https", "Same as http but additionally uses SSL for secure transmission." 19 | "imap4", "Use this to extract emails with EDI files from your email inbox." 20 | "imap4s", "Same as imap4 but additionally uses SSL for secure transmission" 21 | "ftp", "Use the FTP protocol to exchange files with your trading partner." 22 | "ftps (explicit)", "Same as ftp but additionally uses explicit SSL for secure transmission" 23 | "ftps (Implicit)", "Same as ftp but additionally uses implicit SSL for secure transmission" 24 | "sftp (ssh)", "Use the SFTP protocol for exchange files with your trading partner." 25 | "xmlrpc", "Use the XMLRPC protocol for exchange files with your trading partner." 26 | "trash/discard", "Use this to discard uneeded messages types from your trading partner." 27 | "communicationscript", "Use this for custom comms, as described :doc:`here `" 28 | "db", "Use this for database comms, as described :doc:`here `" 29 | -------------------------------------------------------------------------------- /docs/configuration/document-view.rst: -------------------------------------------------------------------------------- 1 | Document View 2 | ============= 3 | 4 | Bots focuses mostly on edi files. Another useful way of looking at edi is to view at **business documents**: orders, asn's, invoices etc. 5 | 6 | Bots support this, but to have this work satisfactory some configuration needs to be done. Essential is the use of document numbers (eg order number, shipment number, invoice number); in bots this is called ``botskey``. 7 | 8 | .. rubric:: 9 | Usage 10 | 11 | Once ``botskey`` is set correct for your documents, it can be used for: 12 | 13 | * Viewing and searching business documents: 14 | * View last run: ``bots-monitor->Last run->Document`` 15 | * View all runs: ``bots-monitor->All run->Document`` 16 | * Select/search for documents: ``bots-monitor->Select->Document`` 17 | * Set output :doc:`file name in a channel ` or in a :doc:`communicationscript ` 18 | 19 | 20 | .. rubric:: 21 | Configure botskey 22 | 23 | This can be done in two ways: 24 | 25 | #. Using QUERIES in the :doc:`grammar ` of the incoming edi file. 26 | 27 | .. code-block:: python 28 | 29 | # Example: botskey in a simple csv grammar 30 | structure = [ 31 | {ID:'LIN',MIN:1,MAX:99999, 32 | QUERIES:{ 33 | 'frompartner': ({'BOTSID':'LIN','AccountCode':None}), 34 | 'topartner': ({'BOTSID':'LIN','CustomerCode':None}), 35 | 'botskey': ({'BOTSID':'LIN','PurchaseOrderNo':None}), 36 | }, 37 | } 38 | ] 39 | 40 | #. In your :doc:`mapping script ` 41 | 42 | .. code-block:: python 43 | 44 | out.ta_info['botskey'] = inn.get({'BOTSID':'LIN','PurchaseOrderCode':None}) 45 | -------------------------------------------------------------------------------- /docs/configuration/grammars/edifact-charsets.rst: -------------------------------------------------------------------------------- 1 | EDIFACT Character-Sets 2 | ====================== 3 | 4 | Edifact uses its own naming of character-sets such as UNOA, UNOB, etc.. 5 | And some character-sets are quite typical or old. 6 | 7 | Bots has 2 ways of supporting these edifact character-sets: 8 | 9 | #. via specific character-sets UNOA and UNOB in ``bots/usersys/charsets`` 10 | #. in bots.ini aliases are giving for edifact character-sets, eg: UNOC=latin1=iso8859-1 11 | 12 | There are some problems with character-sets UNOA and UNOB: 13 | 14 | * This is not always handle correct by some, eg they send UNOA with lower-case characters. 15 | * In practice often is send; officially these are not in UNOA or UNOB. 16 | 17 | A default bots installation includes by default the UNOA and UNOB character set. These are not strict interpreted, but **tuned to reality**, so that they will not often lead to problems. 18 | 19 | In the download **charsetvariations** on `sourceforge site `_ are some variations on these character-sets (stricter, less strict). Read the comments in these files first. 20 | -------------------------------------------------------------------------------- /docs/configuration/grammars/get-grammars.rst: -------------------------------------------------------------------------------- 1 | How to Get Grammars 2 | =================== 3 | 4 | * **edifact and x12**: There are grammars for all edifact and x12 messages on the `bots sourceforge site `_. 5 | * **xml**: use command line tool ``bots-xml2botsgrammar.py`` to generate a grammar from an xml file. Help for this utility script is provided using parameter ``-h`` 6 | * **csv, fixed etc**: use examples in plugins, expand these 7 | -------------------------------------------------------------------------------- /docs/configuration/grammars/nextmessage.rst: -------------------------------------------------------------------------------- 1 | Next Message 2 | ============ 3 | 4 | The ``nextmessage`` section of a grammar is used to split the messages in an edi-file; this way a mapping script receives one message at a time. 5 | Example: 6 | 7 | .. code-block:: python 8 | 9 | structure= [ 10 | {ID:'ENV',MIN:1,MAX:999,LEVEL:[ #envelope record 11 | {ID:'HEA',MIN:1,MAX:9999,LEVEL:[ #header record 12 | {ID:'LIN',MIN:0,MAX:9999}, #line record 13 | ]}, 14 | ]} 15 | ] 16 | 17 | nextmessage = ({'BOTSID':'ENV'},{'BOTSID':'HEA'}) 18 | 19 | Using this ``nextmessage`` the mapping script receives one HEA-record with the LIN-records under it. 20 | The sender and receiver of the envelope can be accessed via QUERIES. 21 | -------------------------------------------------------------------------------- /docs/configuration/grammars/nextmessageblock.rst: -------------------------------------------------------------------------------- 1 | Next Message Block 2 | ================== 3 | 4 | * The ``nextmessageblock`` section in a grammar is mostly used for csv-files consisting of one record-type. 5 | * Think of excel, where every row has the same layout. 6 | * Via nextmessageblock all subsequent records with eg the same ordernumber are passed as one message to the mapping script. 7 | * This is best understood by an example, consider the below CSV file: 8 | 9 | .. code:: 10 | 11 | ordernumber1,buyer1,20120524,1,article1,24 12 | ordernumber1,buyer1,20120524,2,article2,288 13 | ordernumber1,buyer1,20120524,3.article3,6 14 | ordernumber2,buyer2,20120524,1,article5,124 15 | ordernumber3,buyer1,20120524,1,article1,24 16 | ordernumber3,buyer1,20120524,2,article4,48 17 | 18 | which will have the grammer: 19 | 20 | .. code-block:: python 21 | 22 | from bots.botsconfig import * 23 | 24 | syntax = { 25 | 'field_sep' : ',', #specify field separator 26 | 'noBOTSID' : True, #does not have record-ID's 27 | } 28 | 29 | nextmessageblock = ({'BOTSID':'HEADER','order number':None}) #feed mapping script with separate orders (where ordernumber is different) 30 | 31 | structure = [ 32 | {ID:'HEADER',MIN:1,MAX:9999} #only 1 record-type 33 | ] 34 | 35 | recorddefs = { 36 | 'HEADER':[ 37 | ['BOTSID','M',6,'A'], #Note: BOTSID is ALWAYS needed! 38 | ['order number', 'M', 17, 'AN'], 39 | ['buyer ID', 'M', 13, 'AN'], 40 | ['delivery date', 'C', 8, 'AN'], 41 | ['line number', 'C', 6, 'N'], 42 | ['article number', 'M', 13, 'AN'], 43 | ['quantity', 'M', 20, 'R'], 44 | ], 45 | } 46 | 47 | The mapping script in the translation receives 3 separate orders (so mapping script will run 3 times): 48 | 49 | .. code:: 50 | 51 | order with number 1: 52 | ordernumber1,buyer1,20120524,1,article1,24 53 | ordernumber1,buyer1,20120524,2,article2,288 54 | ordernumber1,buyer1,20120524,3.article3,6 55 | 56 | order with number 2: 57 | ordernumber2,buyer2,20120524,1,article5,124 58 | 59 | order with number 3: 60 | ordernumber3,buyer1,20120524,1,article1,24 61 | ordernumber3,buyer1,20120524,2,article4,48 62 | 63 | .. note:: 64 | Use multiple fields for splitting up (bots > 3.1); Example: 65 | ``nextmessageblock = ([{'BOTSID':'HEADER','order number':None},{'BOTSID':'HEADER','buyer ID':None}])`` 66 | 67 | .. note:: 68 | ``nextmessageblock`` works for fixed files with one type of records (bots > 3.1) 69 | -------------------------------------------------------------------------------- /docs/configuration/index.rst: -------------------------------------------------------------------------------- 1 | Configuration 2 | ============= 3 | 4 | * Out of the box bots does nothing. You have to configure bots for your specific edi requirements. 5 | * Check out different ways to start your own :doc:`configuration`. 6 | * See :doc:`debug <../debugging>` overview for info how to debug while making a configuration. 7 | * Bots also has nice features for :doc:`configuration change management <../advanced-deployment/change-management>` (build test sets for you configuration, easier pushing of changes from test to production). 8 | 9 | 10 | **Configuration explained in short** 11 | 12 | * ``routes`` are edi-workflows. 13 | * ``channels`` do the communication (from file system, ftp, etc). 14 | * each route has an ``inchannel`` and an ``outchannel`` 15 | * Translations rules determine: translate what to what. 16 | 17 | **Most asked configuration topics** 18 | 19 | * :doc:`composite routes ` 20 | * :doc:`passthrough route ` (without translation) 21 | * :doc:`options for outgoing filenames ` 22 | * :doc:`direct database communication ` 23 | * :doc:`partner specific translations ` 24 | * :doc:`code conversion ` 25 | * view :doc:`business documents ` instead of edi-files. 26 | * :doc:`confirmations/acknowledgements ` 27 | * :doc:`merging and enveloping outgoing edi files ` 28 | * :doc:`partner specific syntax ` (especially for x12 and edifact) 29 | 30 | **Index** 31 | 32 | .. toctree:: 33 | :maxdepth: 2 34 | 35 | how-to-configuration 36 | route/index 37 | channel/index 38 | translation/index 39 | mapping-scripts/index 40 | grammars/index 41 | document-view 42 | user-scripting 43 | acknowledgements 44 | split-merge 45 | partner/index 46 | charsets 47 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/calculate-count.rst: -------------------------------------------------------------------------------- 1 | Calculations and Counting 2 | ========================= 3 | 4 | * Sometimes it is needed to do calculations in mappings. 5 | * Realize that the get() functions always return strings, so these strings need to be converted. 6 | * Always convert to python's decimals, this is the **only** way to avoid rounding errors. 7 | * More details: `pythons decimal documentation `_ 8 | 9 | **Example calculation** 10 | 11 | .. code-block:: python 12 | 13 | import decimal 14 | 15 | def main(inn,out): 16 | TOTAL_AMOUNT = decimal.Decimal('0') #initialize total amount 17 | for lin inn.getloop({'BOTSID':'UNH'},{'BOTSID':'LIN'}): 18 | amount = lin.get({'BOTSID':'LIN'},{'BOTSID':'QTY','1234':None}) 19 | TOTAL_AMOUNT += decimal.Decimal(amount) #add amount to TOTAL_AMOUNT 20 | 21 | #convert TOTAL_AMOUNT back to string, indicating the number of decimals to be used (precision) 22 | total_amount = TOTAL_AMOUNT.quantize(decimal.Decimal('1.00')) #2 decimals precision 23 | 24 | Bots version 3.1 has a new method getdecimal(); code above can now be: 25 | 26 | .. code-block:: python 27 | 28 | import decimal 29 | 30 | def main(inn,out): 31 | TOTAL_AMOUNT = decimal.Decimal('0') #initialize total amount 32 | for lin inn.getloop({'BOTSID':'UNH'},{'BOTSID':'LIN'}): 33 | TOTAL_AMOUNT += lin.getdecimal({'BOTSID':'LIN'},{'BOTSID':'QTY','1234':None}) #add amount to TOTAL_AMOUNT 34 | 35 | #convert TOTAL_AMOUNT back to string, indicating the number of decimals to be used (precision) 36 | total_amount = TOTAL_AMOUNT.quantize(decimal.Decimal('1.00')) #2 decimals precision 37 | 38 | .. note:: 39 | The example above could be done using function getcountsum(), see below. The recipe above gives you detailed control over the calculation. 40 | 41 | getcount() 42 | ---------- 43 | Returns the number of records in the tree or node. 44 | Typically used for UNT-count of segments. 45 | 46 | .. code-block:: python 47 | 48 | out.getcount() 49 | #returns the numbers of records in outmessage. 50 | 51 | getcountoccurrences(mpath) 52 | -------------------------- 53 | 54 | Returns the number of records selected by mpath. 55 | Typically used to count number of LIN segments. 56 | 57 | .. code-block:: python 58 | 59 | out.getcountoccurrences({'BOTSID':'UNH'},{'BOTSID':'LIN'}) 60 | #returns the numbers of LIN-records. 61 | 62 | getcountsum(mpath) 63 | ------------------ 64 | 65 | Counts the totals value as selected by mpath. 66 | Typically used to count total number of ordered articles. 67 | 68 | .. code-block:: python 69 | 70 | out.getcountsum({'BOTSID':'UNH'},{'BOTSID':'LIN'},{'BOTSID':'QTY','C186.6063':'12','C186.6060':None}) 71 | #returns total number of ordered articles. 72 | 73 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/change-delete.rst: -------------------------------------------------------------------------------- 1 | Change and Delete Functions 2 | =========================== 3 | 4 | **delete(mpath)** 5 | 6 | * Delete(s) the record(s) as specified in mpath in the outmessage (and the records **under** that record). 7 | * After deletion, searching stops (if more than one records exists for this mpath, only the first one is deleted). 8 | * For deleting all records (repeating records) use getloop() to access the loop, and delete within the loop. 9 | 10 | **Returns**: if successful, True, otherwise False. 11 | 12 | .. code-block:: python 13 | 14 | #delete a message date in a edifact INVOICD96AUNEAN008: 15 | out.delete({'BOTSID':'UNH'},{'BOTSID':'DTM','C507.2005':'137'}) 16 | #delete DTM record where field C507.2005 = '137' ; DTM-record is nested under UNH-record. 17 | 18 | .. code-block:: python 19 | 20 | #delete all ALC segments in edifact message: 21 | while message.delete({'BOTSID':'UNH'},{'BOTSID':'ALC'}): 22 | pass 23 | 24 | .. note:: 25 | If you want to delete a field, you can use the change option and put as value **None** 26 | 27 | .. code-block:: python 28 | 29 | lot = lin.get({'BOTSID':'line','batchnumber':None}) 30 | if not lot == None: 31 | lin.change(where=({'BOTSID':'line','batchnumber':lot},),change={'batchnumber':None}) 32 | #In this case I want to remove a wrong batchnumber from a specific supplier 33 | 34 | **change(where=(mpath),change=mpath)** 35 | 36 | * Used to change an existing record. 'where' identifies the record, 'change' are the values that will be changed (or added is values do not exist) in this record. 37 | * Only one record is changed. This is always the last record of the where-mpath 38 | * After change, searching stops (if more than one records exists for this mpath, only the first one is changed). 39 | * For changing all records (repeating records) use getloop() to access the loop, and change within the loop. 40 | 41 | .. code-block:: python 42 | 43 | inn.change(where=({'BOTSID':'UNH'},{'BOTSID':'NAD','3035':'DP'}),change={'3035':'ST'}) 44 | #changed qualifier 'DP' in NAD record to 'ST' 45 | 46 | .. note:: 47 | ``where`` must be a tuple; if you want to change the root of document, add a comma to make it a tuple. 48 | 49 | .. code-block:: python 50 | 51 | inn.change(where=({'BOTSID':'UNH'},),change={'S009.0054':'96A'}) 52 | # ^ note comma here 53 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/code-conversion.rst: -------------------------------------------------------------------------------- 1 | Code Conversion 2 | =============== 3 | 4 | Bots supports code conversions. The code conversion is done in a mapping script; maintenance for the codes can be done via ``bots-monitor->Configuration->User codes as list``. 5 | This page contains 3 examples of code conversions: 6 | 7 | #. Convert currency code list. 8 | #. Convert internal article code to buyers article code. 9 | #. Convert internal article code to description. 10 | 11 | **Code Maintenance in GUI** 12 | 13 | First configure 2 code lists (``bots-monitor->Configuration->user codes by type``): 14 | 15 | .. image:: ../../images/CCbytype.png 16 | 17 | Make the code conversions (``bots-monitor->Configuration->user codes as list``): 18 | 19 | .. image:: ../../images/CCaslist.png 20 | 21 | **Code Conversion in Mapping Script** 22 | 23 | .. code-block:: python 24 | 25 | import bots.transform as transform 26 | 27 | #convert currency code 28 | our_currency_code = inn.get({'BOTSID':'HEA','VALUTA':None}) 29 | converted_currency_code = transform.ccode('Currency',our_currency_code) 30 | 31 | #convert internal article code to buyers article code: 32 | buyer_article_number = transform.ccode('LookupArticleNumber',our_article_number) 33 | 34 | #get description (in field 'attr1') for article 35 | description = transform.ccode('LookupArticleNumber',our_article_number,field='attr1') 36 | 37 | #code conversion also works via reverse lookup: 38 | our_article_number = transform.reverse_ccode('LookupArticleNumber',buyer_article_number) 39 | 40 | **Code Conversion Functions** 41 | 42 | **transform.ccode(codelist, value, field, safe)** 43 | 44 | Convert **value** to value in **field** using a user-maintained code list. Parameters: 45 | 46 | * *codelist*: codelist as in ``bots-monitor->Configuration->user`` codes by type. 47 | * *value* to be converted (should be in **leftcode**) 48 | * *field*: the field to lookup (if not specified: **rightcode**) 49 | * *safe*: if False (default): raise exception when value is in found in codelist. If True: just return **value**. 50 | 51 | Example of usage for leftcode to rightcode: 52 | 53 | .. code-block:: python 54 | 55 | transform.ccode('articles','8712345678906') 56 | 57 | Example of usage for leftcode to attr1: 58 | 59 | .. code-block:: python 60 | 61 | transform.ccode('articles','8712345678906','attr1') 62 | 63 | **transform.reverse_ccode(codelist, value, field)** 64 | 65 | Same as transform.ccode(), but conversion is from **rightcode** to **field**. 66 | 67 | **Changes in Code Conversion Functions** 68 | 69 | These functions have changed over versions. The old functions are deprecated but still work. 70 | 71 | .. csv-table:: 72 | :header: "bots<2.1", "bots<3.0", "bots>=3.0" 73 | 74 | "codetconversion", "ccode", "ccode" 75 | "safecodetconversion", "safe_ccode", "ccode with parameter safe=True" 76 | "rcodetconversion", "reverse_ccode", "reverse_ccode" 77 | "safercodetconversion", "safe_reverse_ccode", "reverse_ccode with parameter safe=True" 78 | 79 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/eanupc-check.rst: -------------------------------------------------------------------------------- 1 | EAN/UCC Check Digits 2 | ==================== 3 | 4 | **Synonyms**: GTIN, ILN, GLN, UPC, EAN, UAC, JAN 5 | 6 | Can be used for UPC-A, UPC-E, EAN8, EAN13, ITF-14, SSCC/EAN-128 etc. These numbers end with a check-digit. 7 | 8 | **transform.checkean(EAN_number)** 9 | 10 | Returns True is if check-digit is OK, False if not. 11 | When not a string with digits, raises botslib.EanError 12 | 13 | .. code-block:: python 14 | 15 | transform.checkean('8712345678906') 16 | #returns 'True' for this EAN number. 17 | 18 | **transform.addeancheckdigit(EAN_number)** 19 | 20 | Returns EAN number including check digit (adds checkdigit). 21 | 22 | .. code-block:: python 23 | 24 | transform.addeancheckdigit('871234567890') 25 | #returns '8712345678906' for EAN number '871234567890'. 26 | 27 | **transform.calceancheckdigit(EAN_number)** 28 | 29 | Returns the checkdigit-string for a number without check-digit. 30 | 31 | .. code-block:: python 32 | 33 | transform.calceancheckdigit('871234567890') 34 | #returns '6' for EAN number '871234567890'. 35 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/get-from-msg.rst: -------------------------------------------------------------------------------- 1 | Get Data from Incoming Message 2 | ============================== 3 | 4 | Use any of these functions to get data from an incoming message: 5 | 6 | get(mpath) 7 | ---------- 8 | 9 | Get 1 field from the incoming message; mpath specifies which field to get. Returns: string or, if field not found, ``None``. 10 | 11 | .. code-block:: python 12 | 13 | #get the message date from an edifact invoice: 14 | inn.get({'BOTSID':'UNH'},{'BOTSID':'DTM','C507.2005':'137','C507.2380':None}) 15 | 16 | **Explanation**: get field C507.2380 from DTM-record if field C507.2005 is '137', DTM-record nested under UNH-record. 17 | The field to retrieve is specified as None. 18 | 19 | getnozero(mpath) 20 | ---------------- 21 | 22 | Like get(), but: return a numeric string not equal to '0', otherwise None. Eg useful in fixed records, where a numeric field is often initialized with zero's. 23 | 24 | getloop(mpath) 25 | -------------- 26 | 27 | * For looping over repeated records or record groups. 28 | * Typical use: loop over article lines in an order. 29 | * Returns an object usable with get(); see example below: 30 | 31 | .. code-block:: python 32 | 33 | #loop over lines in edifact order: 34 | for lin in inn.getloop({'BOTSID':'UNH'},{'BOTSID':'LIN'}): 35 | linenumber = lin.get({'BOTSID':'LIN','1082':None}) 36 | articlenumber = lin.get({'BOTSID':'LIN','C212.7140':None}) 37 | quantity = lin.get({'BOTSID':'LIN'},{'BOTSID':'QTY','C186.6063':'21','C186.6060':None}) 38 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/index.rst: -------------------------------------------------------------------------------- 1 | Mapping Scripts 2 | =============== 3 | 4 | .. epigraph:: 5 | Definition: Instructions to get data from incoming edi-message and put it in the outgoing edi-message 6 | 7 | * Mapping scripts are python programs. 8 | * Mapping script are in: ``usersys/mappings/editype/mapping-script-name.py``. 9 | * Within a mapping script function ``main()`` is called. 10 | * Some important things to be noted about mapping scripts: 11 | * All data in the incoming/outgoing messages are strings. 12 | * Errors in a mapping script are caught by Bots and displayed in bots-monitor. 13 | * You can Raise an exception in your mapping script if you encounter an error situation. 14 | * (Bots>=3.0) if an error is raised in a script, other translations for message in same edi-file will continue. 15 | * (Bots>=3.0) when an error situation is met in script: you can send specific error-email to responsible people. 16 | 17 | **Index** 18 | 19 | .. toctree:: 20 | :maxdepth: 2 21 | 22 | how-it-works 23 | get-from-msg 24 | put-in-msg 25 | mapping-functions 26 | code-conversion 27 | calculate-count 28 | persist 29 | eanupc-check 30 | change-delete 31 | -------------------------------------------------------------------------------- /docs/configuration/mapping-scripts/put-in-msg.rst: -------------------------------------------------------------------------------- 1 | Put Data in Outgoing Message 2 | ============================ 3 | 4 | Use any of these functions to put data into an outgoing message: 5 | 6 | put(mpath) 7 | ---------- 8 | 9 | * Places the field(s)/record(s) as specified in mpath in the outmessage. 10 | * **Returns**: if successful, True, otherwise False. 11 | * If mpath contains None-values (typically because a get() gave no result) nothing is placed in the outmessage, and put() returns False. 12 | 13 | .. code-block:: python 14 | 15 | #put a message date in a edifact message 16 | out.put({'BOTSID':'UNH'},{'BOTSID':'DTM','C507.2005':'137','C507.2380':'20070521'}) 17 | 18 | **Explanation**: put date ``20070521`` in field C507.2380 and code ``137`` in field C507.2005 of DTM-record; DTM-record is nested under UNH-record. 19 | 20 | putloop(mpath) 21 | -------------- 22 | 23 | * Used to generate repeated records or record groups. 24 | * **Recommended**: only use it as in: line = putloop(mpath) 25 | * Line is used as line.put() 26 | * Typical use: generate article lines in an order. 27 | * **Note**: do not use to loop over every record, use put() with the right selection. 28 | 29 | .. code-block:: python 30 | 31 | #loop over lines in edifact-order and write them to fixed in-house: 32 | for lin in inn.getloop({'BOTSID':'UNH'},{'BOTSID':'LIN'}): 33 | lou = out.putloop({'BOTSID':'HEA'},{'BOTSID':'LIN'}) 34 | lou.put({'BOTSID':'LIN','REGEL':lin.get({'BOTSID':'LIN','1082':None})}) 35 | lou.put({'BOTSID':'LIN','ARTIKEL':lin.get({'BOTSID':'LIN','C212.7140':None})}) 36 | lou.put({'BOTSID':'LIN','BESTELDAANTAL':lin.get({'BOTSID':'LIN'}, 37 | {'BOTSID':'QTY','C186.6063':'21','C186.6060':None})}) 38 | 39 | .. warning:: 40 | 41 | Never use 2 inn.get's in one out.put (unless you really know what you are doing ;-) 42 | 43 | .. code-block:: python 44 | 45 | out.put({'BOTSID':'ADD','7747':inn.get('BOTSID':'HEA','name1':None),'7749':inn.get('BOTSID':'HEA','name2':None)})} 46 | 47 | **Because**: if either name1 or name2 is not there (empty, None) nothing will be written in this statement. 48 | -------------------------------------------------------------------------------- /docs/configuration/partner/index.rst: -------------------------------------------------------------------------------- 1 | EDI Partners 2 | ============ 3 | 4 | Plugin ``demo_partnerdependent`` at the `bots sourceforge site `_ demonstrates working with edi partners. 5 | 6 | .. rubric:: 7 | Index 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | partner-lookup 13 | partner-groups 14 | partner-syntax 15 | partner-translation 16 | organize-partner-translation 17 | -------------------------------------------------------------------------------- /docs/configuration/partner/partner-groups.rst: -------------------------------------------------------------------------------- 1 | Partner Groups 2 | ============== 3 | 4 | EDI partners can be assigned to groups. This might come in handy: 5 | 6 | * Partner dependent translations (in ``bots-monitor->Configuration->Translations``). Select a group here, and translation is done for all members of the group. 7 | * Partner based filtering for routes/outchannel (in ``bots-monitor->Configuration->Routes``): the outchannel is used for all members of the group. 8 | * In selections you can use partner-groups. 9 | 10 | .. note:: 11 | partner-groups do not work for confirmations. 12 | 13 | **How to** 14 | 15 | #. Create a group in ``bots-monitor->Configuration->Partners & groups``. Indicate it is a group using tick-box **Isgroup**. 16 | #. For the partners in a group, assign them to this group using **Is in groups**. 17 | 18 | **Plugin** 19 | 20 | Plugin 'demo_partnerdependent' at the `bots sourceforge site `_ demonstrates partner-groups. 21 | -------------------------------------------------------------------------------- /docs/configuration/partner/partner-lookup.rst: -------------------------------------------------------------------------------- 1 | Partner look-up 2 | =============== 3 | 4 | Works with bots>=3.0. Often there is a need to retrieve data from a partner, using a ``IDpartner``. Think of: 5 | 6 | * check if partner is active 7 | * get name/address of partner 8 | * get senderID for partner 9 | 10 | **Recipe** 11 | 12 | Get the value in field ``attr1`` for the ``IDpartner``. 13 | See partners in ``bots-monitor->Configuration->Partners`` for possible fields. 14 | 15 | ``transform.partnerlookup('buyer1','attr1',safe=True)`` 16 | 17 | Check if a partner exists, and is active. If not, raise an exception. 18 | 19 | ``transform.partnerlookup('buyer1','active')`` 20 | 21 | .. csv-table:: 22 | :header: "Value for safe", "If a record matching your lookup does not exist, or the requested field is empty" 23 | 24 | "safe=False (default)","An exception is raised. You can check for this in your script if required and take action" 25 | "safe=True","No exception is raised, just returns the lookup value. eg: to lookup a user defined field for partner translation on some partners" 26 | "safe=None (Bots>=3.2)","No exception is raised, returns None. eg: to get address lines where not all partners have addresses, but this is not an error:" 27 | 28 | .. rubric:: 29 | Lookup using a field other than IDpartner 30 | 31 | This is similar to reverse code conversion, but can look up any partner field and return any other partner field. Beware of performance issues if you have a large number of partners. Also there may be multiple matches if the lookup is not unique, only one is returned. 32 | 33 | Get the value in field ``name`` by looking up value in ``attr2``. 34 | 35 | ``transform.partnerlookup('my attribute','name','attr2',safe=True)`` 36 | 37 | .. note:: 38 | 39 | * In bots<3.0 this was possible using code conversion. But this could lead to situations where partners where both in bots-monitor->Configuration->Partners & groups and in code conversions. 40 | * Partners have more fields in bots>=3.0 like name, address, ``free`` fields. 41 | 42 | Email addresses 43 | --------------- 44 | 45 | * For email channels, you need to configure partners with their email addresses. 46 | * Configure partners: ``bots-monitor->Configuration->Partners``. 47 | * A partner can have a different email address per channel, if not the default eail addres is used. 48 | * Is it needed to configure the partners because: 49 | 50 | * for incoming messages, to determine whether an email is from a valid sender. Email from unknown partners are errors (think of spam). 51 | * for outgoing message, to determine the destination address. 52 | 53 | * Configuring a partner for email: 54 | 55 | * Configure a partner: ``bots-monitor->Configuration->Partners``. 56 | 57 | -------------------------------------------------------------------------------- /docs/configuration/partner/partner-syntax.rst: -------------------------------------------------------------------------------- 1 | Partner Dependent Syntax 2 | ======================== 3 | 4 | * For outgoing messages it is possible to specify a partner dependent syntax. 5 | * This is especially useful for x12 and edifact, for setting envelope values and partner specific separators. 6 | * These parameters override the settings in the message grammar; you only need to specify the partner-specific parameters. 7 | 8 | .. note:: 9 | no need to set partner specific separators for incoming messages; bots will figure this out by itself. 10 | 11 | To set partner specific syntax parameters, create according to editype used: 12 | 13 | * ``bots/usersys/partners/x12/partnerid.py`` 14 | * ``bots/usersys/partners/edifact/partnerid.py`` 15 | 16 | Example file with partner specific setting (x12): 17 | 18 | .. code-block:: python 19 | 20 | syntax = { 21 | 'ISA05' : 'XX', #use different communication qualifier for sender 22 | 'ISA07' : 'ZZ', #use different communication qualifier for receiver 23 | 'field_sep' : '|', #use different field separator 24 | } 25 | 26 | Example file with partner specific setting (edifact): 27 | 28 | .. code-block:: python 29 | 30 | syntax = { 31 | 'merge':False, 32 | 'forceUNA':True, 33 | 'UNB.S002.0007':'ZZ', # partner qualifier 34 | 'UNB.S003.0007':'ZZ', # partner qualifier 35 | } 36 | -------------------------------------------------------------------------------- /docs/configuration/partner/partner-translation.rst: -------------------------------------------------------------------------------- 1 | Partner Specific Translation 2 | ============================ 3 | 4 | **Explain by example** 5 | 6 | You receive edifact ORDERSD96AUNEAN008 from several partners. Partner ``retailer-abroad`` fills the orders in a different way; the difference is so big that it is better to have a separate mapping script. 7 | Configure this like: 8 | 9 | * one grammar for incoming edifact ORDERSD96AUNEAN008 message. (It is a standard message, isn't it?) 10 | * one grammar for the inhouse import format. (We definitely want one import for all orders!) 11 | * note that the incoming edifact grammar uses QUERIES to determine the from-partner and to-partner before the translation. 12 | * make the 2 mapping scripts: 13 | * mapping script ``ordersedi2inhouse_for_retailerabroad.py`` (specific for partner ``retailer-abroad``) . 14 | * mapping script ``fixed-myinhouseorde``' (for all other retailers). 15 | * add ``retailer-abroad`` to partners (via bots-monitor->Configuration->Partners & groups). 16 | * Use 2 translations rules: 17 | * edifact-ORDERSD96AUNEAN008 to fixed-myinhouseorder using mapping script ``ordersedi2inhouse.py`` 18 | * edifact-ORDERSD96AUNEAN008 to fixed-myinhouseorder using mapping script ``ordersedi2inhouse_for_retailerabroad.py`` for from-partner ``retailer-abroad`` 19 | 20 | Often there are lots of similarities between the mappings - the 'many similar yet different mappings' problems. This can be :doc:`handled in bots ` in a nice way. 21 | 22 | **Plugin** 23 | 24 | Plugin 'demo_partnerdependent' at the `bots sourceforge site `_ demonstrates partner-groups. 25 | 26 | -------------------------------------------------------------------------------- /docs/configuration/route/composite-routes.rst: -------------------------------------------------------------------------------- 1 | Composite routes 2 | ================ 3 | 4 | A simple route reads the edi files from one inchannel, translates, and sends the translated files to one outchannel. 5 | More flexibility is offered by the use of composite routes. 6 | In a composite route there are several entries in the routes screen, each with the same **idroute** but a different **seq** 7 | (sequence number within route). Each entry (with different **seq**) is called **route-part**. 8 | Best way to use this is to have each route-part do any one of the things: 9 | 10 | * Fetch incoming files; you can fetch files from multiple sources 11 | * Translate (typically once per route) 12 | * Send outgoing files to different destinations/partners using `filtering <#filtering-for-different-outchannels>`_ 13 | 14 | It is advised to set up composite routes this way (using at least 3 route-parts). 15 | 16 | **Use cases** 17 | 18 | * Send edi files via ftp where each partner has its own ftp-server. 19 | * Confirmations/acknowledgements: acknowledgements for incoming edi-files are routed back to the sender (filter by editype/messagetype). 20 | * Fetch from multiple sources, eg ftp-servers of different partners.. 21 | * Route to different internal destinations: invoices to another system than ASN's (filter by messagetype) 22 | * Use a VAN, but one partner uses AS2 (filter by partner) 23 | * Incoming files are translated multiple times, each message-type goes to different destination. Eg: translate orders both to in-house file (import ERP) and an HTML-email (for viewing). 24 | 25 | **Example plugin** 26 | 27 | Download the plugin `demo_composite_route `_ 28 | This plugin has one composite route consisting of: 29 | 30 | * 2 input parts 31 | * Translate part 32 | * 3 output parts, using `filtering <#filtering-for-different-outchannels>`_ 33 | 34 | Detailled description here. 35 | 36 | **Filtering for different outchannels** 37 | 38 | * You can filter per outchannel; eg send only asn's through this outchannel. 39 | * In route-screen (``bots-monitor->Configuration->Routes``) the fields used for filtering under **Filtering for outchannel**. 40 | * If eg toeditype=csv, only csv-files will be send over the outchannel. 41 | 42 | .. note:: 43 | If filtering is not specified, all outgoing files in the route are send through the outchannel. 44 | 45 | **Schematic** 46 | 47 | Schematic overview of a route consisting of 5 parts: 48 | 49 | .. image:: ../../images/RouteDiagramComp.png 50 | 51 | .. note:: 52 | 53 | * If no inchannel in route-part nothing comes in for that route-part. 54 | * If 'translate' in a route-part is off, no translation in that route-part. 55 | * If no outchannel in route-part nothing goes out for that route-part. 56 | -------------------------------------------------------------------------------- /docs/configuration/route/index.rst: -------------------------------------------------------------------------------- 1 | Routes 2 | ====== 3 | 4 | .. epigraph:: 5 | 6 | Definition: A route is a workflow for edi-files 7 | 8 | * A route determines where to get the incoming files, what to do with these edi-files (translate!) and their destination. 9 | * ``Routes`` are the most important concept in configuring bots. 10 | * Routes are independent: an edi-file in a route stays in that route. 11 | * Route are configured in ``bots-monitor->Configuration->Routes``. 12 | 13 | .. image:: ../../images/RouteDiagram2.png 14 | 15 | To get a route like this working the following must be configured: 16 | 17 | * The route itself in ``bots-monitor->Configuration->Routes``. 18 | * An in-channel for incoming edi files. 19 | * An out-channel for outgoing edi files. 20 | * The :doc:`translation <../translation/index>`. 21 | 22 | The route above is a simple route; files come from one source, there is one translation, one destination. 23 | More options are possible using :doc:`composite routes `. 24 | 25 | **Index** 26 | 27 | .. toctree:: 28 | :maxdepth: 2 29 | 30 | composite-routes 31 | passthrough 32 | route-scripting 33 | -------------------------------------------------------------------------------- /docs/configuration/route/passthrough.rst: -------------------------------------------------------------------------------- 1 | PassThrough (no translation) 2 | ============================ 3 | 4 | Sometimes you want to pass an edi-file though bots without translation. 5 | In this case bots is only used to manage/register the sending or receiving of edi-files. 6 | 7 | **For bots>=3.0** 8 | 9 | In route (``bots-monitor->Configuration->Routes``) use value **Pass-through** for **translate**. 10 | 11 | 12 | **For bots<=2.2** 13 | 14 | Use a routescript: 15 | 16 | #. Configure route the normal way (bots-monitor->Configuration->Routes) 17 | #. Make a routescript with the same name as the routeID 18 | #. Place the routescript in bots/usersys/routescripts/routeid.py 19 | 20 | Contents of routescript: 21 | 22 | .. code-block:: python 23 | 24 | from bots.botsconfig import * 25 | import bots.transform as transform 26 | 27 | def postincommunication(routedict,*args,**kwargs): 28 | # postincommunication() is run after fromchannel communication. 29 | # the status of incoming files is changed to outgoing. 30 | # bots skips parsing and translation. 31 | transform.addinfo(change={'status':MERGED},where={'status':FILEIN,'idroute':routedict['idroute']}) 32 | -------------------------------------------------------------------------------- /docs/configuration/translation/howitworks.rst: -------------------------------------------------------------------------------- 1 | How Translation Works 2 | ===================== 3 | 4 | Best understood by looking at this schematic: 5 | 6 | .. image:: ../../images/MappingScheme.png 7 | 8 | Step-by-step: 9 | 10 | #. The edi file is lexed and parsed using the :doc:`grammar <../grammars/index>`. 11 | #. The message is transformed into a tree structure. This is similar to the use of DOM in xml. Advantages: 12 | * Easy access to message content. This is quite similar to XML-queries or X-path. 13 | * Choose the logic for the mapping script that is best fit for the situation - instead of being forced to 'loop' over incoming message. 14 | * Sorting: eg. sort article lines by article number. 15 | * Counting: eg. count number of lines, total amounts etc 16 | * Access the data you already written in the tree 17 | #. `Split <../split-merge.html#splitting-edi-files>`_ the edi file into separate messages (eg one edi file can contain multiple orders). 18 | #. Find the :doc:`right translation ` for message. 19 | #. Run the :doc:`mapping script <../mapping-scripts/index>` for message. 20 | #. Serialize the outmessage-tree to file. This is checked and formatted according to the :doc:`grammar <../grammars/index>` of the outgoing message. 21 | #. Outgoing messages are `enveloped and/or merged <../split-merge.html#merge-envelope-edi-message>`_. 22 | -------------------------------------------------------------------------------- /docs/configuration/translation/index.rst: -------------------------------------------------------------------------------- 1 | Translation 2 | =========== 3 | 4 | .. epigraph:: 5 | Definition: A translation translates a message of a certain editype, messagetype to another editype, messagetype 6 | 7 | Needed for a translation: 8 | 9 | * Translation rule in ``bots-monitor->Configuration->Translations``; see the screen shot below. 10 | * :doc:`Grammar <../grammars/index>` for incoming message. 11 | * :doc:`Grammar <../grammars/index>` for outgoing message. 12 | * :doc:`Mapping script <../mapping-scripts/index>` that for converting incoming message to outgoing message. 13 | 14 | .. figure:: ../../images/TranslationScreenshot1.png 15 | 16 | Screenshot of configured translations-rules 17 | 18 | Read the 1st translation rule of this screen shot: 19 | 20 | Translate ``edifact-ORDERSD96AUNEAN008`` to ``fixed-myinhouseorder`` using mapping script ``ordersedifact2myinhouse.py`` 21 | 22 | **Index** 23 | 24 | .. toctree:: 25 | :maxdepth: 2 26 | 27 | howitworks 28 | whatwhen 29 | chained-translations 30 | multiple-versions 31 | -------------------------------------------------------------------------------- /docs/configuration/translation/multiple-versions.rst: -------------------------------------------------------------------------------- 1 | Multiple EDI Versions 2 | ===================== 3 | 4 | There are several situations where you need to send different versions of messages and receive different versions of an EDI standard. 5 | In real world versions are often so similar that the same mapping script can be used (or a simple if-then can cater for the differences). 6 | We can handle such requirements using any of the below solutions: 7 | 8 | **Send multiple versions using partners** 9 | 10 | Use the ``topartner`` to determine the right version to send. 11 | 12 | * One grammar for in-house message: 13 | * myinhouseorder.py 14 | * This grammar uses QUERIES to extract 'topartner'. 15 | * Grammars for both the EDI versions: 16 | * ORDERSD93AUN 17 | * ORDERSD96AUN 18 | * 2 translation rules: 19 | * fixed-myinhouseorder to edifact-ORDERSD93AUN using mapping script ordersfixed2edifact93.py for topartner=XXX 20 | * fixed-myinhouseorder to edifact-ORDERSD96AUN using mapping script ordersfixed2edifact93.py for topartern=YYY 21 | 22 | **Send multiple versions using ``alt``** 23 | 24 | Information about the version is in in-house-message: a field that contains either '93' or '96'. 25 | 26 | * one grammar for in-house message: 27 | * myinhouseorder.py 28 | * Grammars for both the EDI versions: 29 | * ORDERSD93AUN 30 | * ORDERSD96AUN 31 | * 2 translation rules 32 | * fixed-myinhouseorder to edifact-ORDERSD93AUN using mapping script orders_fixed2edifact93.py for alt=93 33 | * fixed-myinhouseorder to edifact-ORDERSD96AUN using mapping script orders_fixed2edifact93.py for alt=96 34 | 35 | **Receive Multiple Versions** 36 | 37 | * Grammars for both the EDI versions: 38 | * ORDERSD93AUN 39 | * ORDERSD96AUN 40 | * one grammar for in-house message: 41 | * myinhouseorder.py 42 | * This grammar uses QUERIES to extract 'alt'-value. 43 | * 2 translation rules 44 | * edifact-ORDERSD93AUN to fixed-myinhouseorder using mapping script orders_edifact93_2_fixed.py 45 | * edifact-ORDERSD6AUN to fixed-myinhouseorder using mapping script orders_edifact96_2_fixed.py 46 | 47 | -------------------------------------------------------------------------------- /docs/configuration/translation/whatwhen.rst: -------------------------------------------------------------------------------- 1 | What Translation When? 2 | ====================== 3 | 4 | Bots figures out what translation to use via the translation rules. Best is to think of the translation rules as a ``lookup`` table: 5 | 6 | look-up with (from-editype, from-messagetype, alt, frompartner and topartner) to find mappingscript, to-editype and to-messagetype 7 | 8 | How the input values for the look-up are determined: 9 | 10 | #. editype 11 | * configured in the route 12 | * if you configure editype=mailbag, bots will figure out if editype is x12, edifact or tradacoms. 13 | #. messagetype can be: 14 | * configured in the route, eg for editype csv 15 | * for edifact, x12 and tradacoms: bots figures out the detailed messagetype. Example: 16 | * in route: editype: edifact, messagetype: edifact 17 | * in incoming edi file bots finds detail messagetype **ORDERSD96AUN**. 18 | #. frompartner can be: 19 | * configured in the route 20 | * determined by the grammar using `QUERIES <../grammars/structure.html#queries>`_ 21 | #. topartner can be: 22 | * configured in the route 23 | * determined by the grammar using `QUERIES <../grammars/structure.html#queries>`_ 24 | #. alt can be: 25 | * configured in the route 26 | * determined by the grammar using `QUERIES <../grammars/structure.html#queries>`_ 27 | * set by mapping script in a :doc:`chained translation ` 28 | 29 | .. note:: 30 | 31 | * For frompartner and topartner: bots finds the most specific translation. 32 | * Eg example with 2 translation rules: 33 | * fromeditype = edifact, frommessagetype = ORDERSD96AUNEAN008 34 | * fromeditype = edifact, frommessagetype = ORDERSD96AUNEAN008, frompartner=RETAILERX 35 | * If bots receives an ORDERS message from RETAILERX, the 2nd translation is used. 36 | * For other partners the first translation is used. 37 | * for alt-translations: only find the translation with that specific **alt**. 38 | -------------------------------------------------------------------------------- /docs/deployment/email-notifications.rst: -------------------------------------------------------------------------------- 1 | Email Notifications for Errors 2 | ============================== 3 | 4 | When bots runs scheduled, it is cumbersome to keep checking for errors in the bots-monitor. 5 | It is possible to receive an email-report in case of errors. 6 | Configure this: 7 | 8 | #. Set option 'sendreportiferror' in bots/config/bots.ini to True. 9 | #. In bots/config/settings.py set relevant data for email, eg like: 10 | 11 | .. code-block:: python 12 | 13 | MANAGERS = ( #bots will send error reports to the MANAGERS 14 | ('name_manager', 'myemailaddress@gmail'), 15 | ) 16 | EMAIL_HOST = 'smtp.gmail.com' #Default: 'localhost' 17 | EMAIL_PORT = '587' #Default: 25 18 | EMAIL_USE_TLS = True #Default: False 19 | EMAIL_HOST_USER = 'username' #Default: ''. Username to use for the SMTP server defined in EMAIL_HOST. If empty, Django won't attempt authentication. 20 | EMAIL_HOST_PASSWORD = '*******' #Default: ''. PASSWORD to use for the SMTP server defined in EMAIL_HOST. If empty, Django won't attempt authentication. 21 | SERVER_EMAIL = 'botserrors@gmail.com' #Sender of bots error reports. Default: 'root@localhost' 22 | EMAIL_SUBJECT_PREFIX = '' #This is prepended on email subject. 23 | 24 | #. To test if it works OK, restart the bots-webserver and bots-monitor->Systasks->Send test report. (I know, the restarting is annoying.). 25 | 26 | .. note:: 27 | Email notifications are not sent while running `acceptance tests <../advanced-deployment/change-management.html#isolated-acceptance-testing>`_. 28 | -------------------------------------------------------------------------------- /docs/deployment/index.rst: -------------------------------------------------------------------------------- 1 | Deployment 2 | ========== 3 | 4 | This part of the wiki is about using bots in production. 5 | There are extra points to consider when deploying bots in a 24x7 production environment: 6 | 7 | #. Consider the best way of :doc:`running bots-engine `. 8 | #. When errors in edi-files occur, receive a :doc:`notification by email `. 9 | #. :doc:`Use multiple environments `; having different environments for at least test and production is standard IT practice. 10 | #. Consider if edi files need :doc:`extra archiving ` 11 | #. Out of the box bots does not run as a :doc:`service/daemon `. In a production enviroment this is what you'll probably want. 12 | 13 | .. rubric:: 14 | Index 15 | 16 | .. toctree:: 17 | :maxdepth: 2 18 | 19 | run-botsengine 20 | production-errors 21 | email-notifications 22 | archiving 23 | run-as-service 24 | multiple-environments 25 | -------------------------------------------------------------------------------- /docs/deployment/production-errors.rst: -------------------------------------------------------------------------------- 1 | Handling errors in Production 2 | ============================= 3 | 4 | Different errors: 5 | 6 | #. Errors in edi files: 7 | * inbound: contact your edi-partner they should send valid messages. (yes, and sometimes you will just have to adapt the definitions of the standards). 8 | * outbound: check out why your ERP-system sends invalid messages. Adapt the export-module. 9 | #. Communication errors 10 | * inbound: no problem, next run bots will try again to fetch the messages correctly. No action needed (but if it keeps happinging....). 11 | * outbound. You can handle this manually or automated: 12 | * manually: 13 | #. in the outgoing view, select edi-files with failed outbound communication and mark these as 'resend' 14 | #. do: 'Run user-indicated resends' 15 | #. check if communication was OK this time. 16 | #. Note: number of resends is indicated in the outgoing view. 17 | * automatic: 18 | #. schedule bots-engine with option ``--automaticretrycommunication``. 19 | #. all edi-files for which out-communication failed will be resend automatically. 20 | #. if communication fails (again) in the automatic retry this is indicated in the error notification. So probably it is best to react on this. 21 | #. Note: number of resends is indicated in the outgoing view. 22 | #. The first time you use ``automaticretrycommunication`` nothing is resend, but automaticretry is initialised: all failed communications from that moment on will be resend. This is to prevent having all older failed communications resend. 23 | #. Scheduling: often bots is scheduled to run eg every 10 minutes, and automaticretry once an hour. For this type of scheduling use the `jobqueue server `_. 24 | -------------------------------------------------------------------------------- /docs/documentation.rst: -------------------------------------------------------------------------------- 1 | Bots Documentation 2 | ================== 3 | 4 | The documentation is written in reStructuredText format. Sphinx is used 5 | to generate the HTML documentation site. 6 | 7 | Building the Docs 8 | ----------------- 9 | 10 | Requirements 11 | ~~~~~~~~~~~~ 12 | 13 | - Python 14 | - Pip packages: 15 | 16 | - sphinx 17 | - sphinx\_rtd\_theme 18 | 19 | Building 20 | ~~~~~~~~ 21 | 22 | 1. Clone the repository ``git clone git@github.com:bots-edi/docs.git`` 23 | 2. Run ``make html`` 24 | 25 | Publishing 26 | ~~~~~~~~~~ 27 | 28 | The documentation site uses GitHub Pages, specifically the 29 | https://github.com/bots-edi/bots-edi.github.io repository. 30 | 31 | 1. Clone the repository 32 | ``git clone git@github.com:bots-edi/bots-edi.github.io.git`` 33 | 2. Build the documentation (see above) 34 | 3. Copy the contents of the \_build/html folder to the 35 | ``bots-edi.github.io`` repository. 36 | 4. Commit 37 | 38 | Credits 39 | ======= 40 | 41 | This work was started by @abhishek-ram at 42 | https://github.com/abhishek-ram/bots/tree/sphinx-docs/docs and @skilchen 43 | at https://github.com/skilchen/bots/tree/master/docs 44 | -------------------------------------------------------------------------------- /docs/external-reference.rst: -------------------------------------------------------------------------------- 1 | External reference links 2 | ======================== 3 | 4 | EDI 5 | --- 6 | 7 | * `EANCOM `_, In trade EANCOM is the most used edifact standard. Guides are much better than the edifact general documentation. 8 | * `UN/EDIFACT reference `_, The official source of edifact (the one and only). All other information is derived from this. 9 | * `Stylus Studio EDIFACT reference `_, I have found this page very useful as my main EDIFACT reference. All the versions are there back to D93A and everything is hyperlinked. 10 | * `Liason EDI Notepad `_, EDI editor/validator free for Windows platform. It provides rendering of EDI/EDIFACT/TRADACOMS/X12. 11 | 12 | .. note:: 13 | Please note that the official X12 documentation is not free and should be purchased. 14 | 15 | .. note:: 16 | Some of these pages are provided by companies promoting their own EDI services or software, but contain some good information. 17 | 18 | Python 19 | ------ 20 | 21 | You don't need to know a lot about Python to get started with bots, but it will help you to do more advanced mapping and user scripts (or even add new features to bots code!) 22 | 23 | * `Beginners Guide `_, New to programming? Python is free and easy to learn if you know where to start! This guide will help you to get started quickly. 24 | * `Simple Programs `_, Gives around 30 simple working code samples, gradually introducing more advanced concepts. 25 | * `Google's Python Class `_, This is a free class for people with a little bit of programming experience who want to learn Python. The class includes written materials, lecture videos, and lots of code exercises to practice Python coding. 26 | * `String Methods `_, These are often used to manipulate string data in mapping scripts. 27 | -------------------------------------------------------------------------------- /docs/guide-for-botsmonitor/how-to-rereceive.rst: -------------------------------------------------------------------------------- 1 | How to Re-Receive 2 | ================= 3 | 4 | * Incoming files can be ``re-received``. 5 | * When re-receiving the (previously received) file is taken from the archive, and re-processed. 6 | * As the file from the archive is used, no (outside) communication is used. 7 | 8 | **Steps** 9 | 10 | * In the incoming screen, go to the start (in front of each line); a small menu will pop-up. Choose 'rereceive' from this menu. The file will be marked as 'rereveive'. Mark all files that you want to re-receive. 11 | * Go to main ``menu->Run->Run user-indicated re-receives``. 12 | * The engine will now start, and do all the re-receives you marked. 13 | 14 | **Re-receive many files** 15 | 16 | * As the files need to be marked one by one, this can be troublesome when you need to re-receive many files. 17 | * In the screen for incoming there is a button called **Rereceive all**. When you use this button all files in the selection are marked as re-receive. This might take some while. 18 | * Warning: all files in the selection are marked, not only the ones visible on your page. 19 | 20 | .. note:: 21 | Tip: first make the right selection via the button 'Change Selection'. Additional individual files can be marked/de-marked later. 22 | -------------------------------------------------------------------------------- /docs/guide-for-botsmonitor/index.rst: -------------------------------------------------------------------------------- 1 | Guide For Bots-Monitor 2 | ====================== 3 | 4 | .. note:: 5 | The :doc:`tutorial<../quick-start-guide/index>` contains some detailed information and screen-shots of bots-monitor! 6 | 7 | **Menu in bots-monitor** 8 | 9 | #. **Home: start page and general information.** 10 | #. Last run: view results of the last run: 11 | * incoming: view incoming files and results 12 | * document: view status of business document. An edi file can contain multiple documents (eg orders). In this view are the results of the separate business documents. See :doc:`setting document views <../configuration/document-view>` 13 | * outgoing: view outgoing files and results 14 | * process errors: view process errors; mostly these will be communication errors. 15 | #. All runs: view results of all runs: 16 | * reports: view of all runs and results 17 | * incoming: view incoming files and results 18 | * document: view status of business document. An edi file can contain multiple documents (eg orders). In this view are the results of the separate business documents. See :doc:`setting document views <../configuration/document-view>` 19 | * outgoing: view outgoing files and results 20 | * process errors: view process errors; mostly these will be communication errors. 21 | * confirmations: view the results of confirmations you wanted and confirmation you gave. See :doc:`setup confirmations <../configuration/acknowledgements>` 22 | #. Select: use criteria like date/time to view results you want to see like eg editype edifact or x12. 23 | * Note: select screens can also be used using 'select' button in other views. 24 | #. **Configuration: configuration of the edi setup.** 25 | #. **System tasks (administrators only): read plugins, create plugins, maintain users, etc.** 26 | #. Run: manually start a run of bots-engine: 27 | * Run (only new): receive, translate, and send new edi messages. 28 | * Run userindicated rerecieves: receive previously received edi-files again from archive. User has to mark edi-files as 're-receive' via incoming view. 29 | * Run userindicated resends: resend previously send edi-files again. User has to mark edi-files as 're-send' via outgoing view. 30 | 31 | **User interface tips** 32 | 33 | * View screens often have a star at the beginning of each line; moving over the star will show possible actions. 34 | * In view screens, you can see the contents of an edi file if you click on the file name. 35 | * When viewing the contents of an edi file, you can go backwards and forwards to see the processing steps of the file. 36 | * Might be handy to use tabbed browsing. 37 | * Bots uses user rights (viewers, administrators and superuser). See :doc:`setting user rights <../advanced-deployment/user-rights>` 38 | 39 | 40 | 41 | **More** 42 | 43 | .. toctree:: 44 | :maxdepth: 2 45 | 46 | how-to-rereceive 47 | -------------------------------------------------------------------------------- /docs/images/CCaslist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/CCaslist.png -------------------------------------------------------------------------------- /docs/images/CCbytype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/CCbytype.png -------------------------------------------------------------------------------- /docs/images/ChannelScheme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/ChannelScheme.png -------------------------------------------------------------------------------- /docs/images/CreateWinSrv1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/CreateWinSrv1.png -------------------------------------------------------------------------------- /docs/images/MappingScheme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/MappingScheme.png -------------------------------------------------------------------------------- /docs/images/Myfirst_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/Myfirst_details.png -------------------------------------------------------------------------------- /docs/images/Myfirst_incoming_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/Myfirst_incoming_all.png -------------------------------------------------------------------------------- /docs/images/Myfirst_incoming_last_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/Myfirst_incoming_last_run.png -------------------------------------------------------------------------------- /docs/images/Myfirst_outgoing_last_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/Myfirst_outgoing_last_run.png -------------------------------------------------------------------------------- /docs/images/Myfirst_runs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/Myfirst_runs.png -------------------------------------------------------------------------------- /docs/images/Overviewtechnical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/Overviewtechnical.png -------------------------------------------------------------------------------- /docs/images/RouteDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/RouteDiagram.png -------------------------------------------------------------------------------- /docs/images/RouteDiagram2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/RouteDiagram2.png -------------------------------------------------------------------------------- /docs/images/RouteDiagramComp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/RouteDiagramComp.png -------------------------------------------------------------------------------- /docs/images/StartChannels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/StartChannels.png -------------------------------------------------------------------------------- /docs/images/StartRoutes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/StartRoutes.png -------------------------------------------------------------------------------- /docs/images/StartTranslations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/StartTranslations.png -------------------------------------------------------------------------------- /docs/images/TranslationScreenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/TranslationScreenshot1.png -------------------------------------------------------------------------------- /docs/images/as2-b2b-implementation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/as2-b2b-implementation.gif -------------------------------------------------------------------------------- /docs/images/botslogo_square2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/botslogo_square2.png -------------------------------------------------------------------------------- /docs/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/docs/images/favicon.ico -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. bots documentation master file, created by 2 | sphinx-quickstart on Thu Sep 17 18:17:11 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | ----------------- 7 | Table of Contents 8 | ----------------- 9 | 10 | .. toctree:: 11 | :maxdepth: 2 12 | 13 | readme 14 | introduction 15 | installation 16 | get-bots-running 17 | quick-start-guide/index 18 | guide-for-botsmonitor/index 19 | overview/index 20 | configuration/index 21 | deployment/index 22 | advanced-deployment/index 23 | plugins/index 24 | tutorials/index 25 | debugging 26 | troubleshooting 27 | change-migrate/index 28 | new-to-python 29 | external-reference 30 | useful-tools 31 | documentation 32 | -------------------------------------------------------------------------------- /docs/introduction.rst: -------------------------------------------------------------------------------- 1 | Welcome to ``Bots``'s documentation! 2 | ==================================== 3 | 4 | * ``Bots`` is fully functional software for `EDI (Electronic Data Interchange) `_. 5 | * All major EDI data formats are supported: EDIFACT, X12, TRADACOMS, XML. 6 | * Runs on Windows, Linux, OSX and Unix. 7 | * ``Bots`` is very stable. 8 | * ``Bots`` handles high volumes of edi transactions. 9 | * ``Bots`` is very flexible and can be configurated for your specific EDI needs. 10 | * Read about the `features of bots `_ and `the latest news `_ 11 | 12 | First steps 13 | ----------- 14 | 15 | #. Install ``bots``: :doc:`Installation ` 16 | #. Get ``bots`` running: Get ``bots`` :doc:`running ` 17 | #. Get your first configuration running: :doc:`Tutorial ` 18 | 19 | After that: check out some :doc:`plugins `. 20 | 21 | Other info on ``bots`` 22 | ---------------------- 23 | 24 | * `Website `_ is on sourceforge. 25 | * There is an active `mailing list `_. 26 | 27 | About this wiki 28 | --------------- 29 | 30 | * If you want to ask questions please use the ``bots`` `mailing list `_. 31 | * It is very much appreciated if you want to contribute to this wiki. Just let me know via the mailing list and you'll get the rights. 32 | 33 | It's hard to get started 34 | ------------------------ 35 | 36 | Often people experience a steep learning curve when starting with edi. 37 | One reason is that of lot of knowledge is involved: 38 | 39 | * edi standards (edifact, x12, tradacoms, EANCOM etc) 40 | * business processes between you and your edi-partner (logistics!), changes in the business processes 41 | * understand what your edi-partner wants/requires 42 | * edi communication methods (x400, VAN's, AS2 etc) 43 | * imports and exports of your ERP system 44 | * specifics of the edi software. 45 | * etc 46 | 47 | It is hard to find good information about edi: standards are not always free (eg x12 is not free), decent example messages are hard to get and often if is hard to find good information on Internet. 48 | Edi is traditionally 'closed' and sparse with information. 49 | Partly this seems to be a 'cultural thing', partly because edi existed before Internet, partly because it is all about business data that is not for the general public. 50 | 51 | 52 | Don't give up! ;-)) 53 | I think everybody who started with edi has gone through this. 54 | 55 | -------------------------------------------------------------------------------- /docs/new-to-python.rst: -------------------------------------------------------------------------------- 1 | New to python? 2 | ============== 3 | 4 | **Short Explanation** 5 | 6 | * Python is an interpreted language. This means for you: edit a python source file (eg mappingscript, grammar), save it and run again. No compilation, no linking. 7 | * Python source files always have extension '.py'. 8 | * If you see a '.pyc' file: that is an intermediate file. OK, python does some compilation automatically. Never mind, it is not important. Some systems have '.pyo' files instead. Again, not important. 9 | * Python does not use curly braces ('{...}') or 'BEGIN...END' for functions, loops etc. Python uses 'indentation' instead. Some people love it, some hate it. For me: this is what I always did with all programming languages; now everybody uses the same layout ;-)) 10 | * Links to more learning about python are in the page with :doc:`external links ` 11 | 12 | **Some tips when you are new to python** 13 | 14 | #. Use a good text editor. This is VERY important. It saves you a lot of time. See in :doc:`tools ` page. Three main reasons: 15 | * a good editor has a feature called 'syntax highlighting'. This makes it is lot easier to work with eg mapping scripts. 16 | * a good editor can do a python syntax check on the python source file (a check if it is valid python). This will point you directly to any errors you made. 17 | * make the editor use spaces instead of tabs. This is an important feature when working with python. Never mix tabs and spaces. 18 | #. Creating grammars and mapping scripts does not require an "in depth" knowledge of Python, but you need to at least understand general principles of: 19 | * `variables and expressions `_ 20 | * `functions `_ 21 | * `strings `_ 22 | * `lists `_, `dicts `_ and `tuples `_ 23 | #. Start with a plugin or example 24 | * most grammars are "similar" (csv, fixed are simple; edifact, x12 are more complex) 25 | * most mappings are "similar" (same functions are used, only "mpaths" change) 26 | * find something close to what you need, see how it works, adapt it. 27 | 28 | **Installing extra libraries/dependencies** 29 | 30 | * For linux lots of `information about installing libraries is here `_. Think this is also useful for windows. 31 | * A advanced method is using `virtualenv `_. 32 | 33 | **Feedback** 34 | 35 | Please share your experiences and tips via the `mailing list `_! 36 | -------------------------------------------------------------------------------- /docs/overview/configuration-files.rst: -------------------------------------------------------------------------------- 1 | Configuration Files 2 | =================== 3 | 4 | * Bots has two configuration files. 5 | * Mostly the defaults will be OK to get started, but you may need to customize these to your own needs. 6 | * Settings are documented in the files. 7 | * Open these files in your :doc:`text editor <../useful-tools>`. 8 | * The configuration files are located in the ``bots/config`` directory (except when using :doc:`multiple environments <../deployment/multiple-environments>`). 9 | * The original default versions can be found in the ``bots/install`` directory. 10 | 11 | bots.ini 12 | -------- 13 | 14 | * How long to keep edi files and their registration 15 | * Some GUI customisation settings 16 | * Timeouts and time limits 17 | * Logging options 18 | * Debugging options 19 | * Webserver settings (eg port) 20 | * Directory settings 21 | 22 | settings.py 23 | ----------- 24 | 25 | * Mail server settings for error reports 26 | * Database settings (eg. to use another database) 27 | * Security / auto-logout 28 | * Localization (time zone!) 29 | -------------------------------------------------------------------------------- /docs/overview/glossary.rst: -------------------------------------------------------------------------------- 1 | Glossary of Terms 2 | ================= 3 | 4 | **If you think any term used in the wiki is unclear please leave a comment and I will add it here** 5 | 6 | .. csv-table:: 7 | 8 | "alt","Used for chained translations." 9 | "botskey","Used for business document number, eg order number, invoice number. Used to set up :doc:`document views <../configuration/document-view>` (view business documents instead of edi-files)." 10 | "channel type","Type of communication used for sending/receiving files like ftp, smtp, file I/O." 11 | "chained translation","A chained translations translate one incoming format to multiple outgoing formats." 12 | "editype","Type of edi-file like x12, edifact, tradacoms, xml, csv, fixed record files." 13 | "mapping script","A python script containing instructions how to get data from incoming edi-message and put it in the outgoing edi-message." 14 | "messagetype","eg 850 (an x12 order), ORDERSD96AUN (edifact order) or your inhouse xml-orders. A messagetype is defined in a grammar" 15 | "route","a workflow for edi-files" 16 | "translation","convert a message of a certain editype, messagetype to another editype, messagetype using a mapping script." 17 | "translation rule","determines what translations are done for incoming files. In ``bots-monitor->Configuration->Translations``" 18 | -------------------------------------------------------------------------------- /docs/overview/index.rst: -------------------------------------------------------------------------------- 1 | Overview 2 | ======== 3 | 4 | Purpose of the chapter of this wiki is to give some global overview for bots open source edi translator. 5 | 6 | An overview of features is on `sourceforge `_. 7 | 8 | **Table of Contents:** 9 | 10 | .. toctree:: 11 | :maxdepth: 2 12 | 13 | the-name-bots 14 | techincal-overview 15 | directories-files 16 | configuration-files 17 | glossary 18 | -------------------------------------------------------------------------------- /docs/overview/techincal-overview.rst: -------------------------------------------------------------------------------- 1 | Technical Overview 2 | ================== 3 | 4 | .. image:: ../images/Overviewtechnical.png 5 | -------------------------------------------------------------------------------- /docs/overview/the-name-bots.rst: -------------------------------------------------------------------------------- 1 | The name ``Bots`` 2 | ================= 3 | 4 | EDI is about cooperation in the supply chain (collaboration, tying together, etc). That is true, but on the other hand it is also a clash of cultures. In Dutch **bots** is like **crash** 5 | 6 | ``bots`` is also the nickname my grandfather-in-law used for my girlfriend. it was not clear where that name came from, probably that was how she pronouced her name (betsy) when she learned to talk. 7 | 8 | In Dutch ``bots`` is singular. 9 | 10 | but...its just a name. 11 | 12 | kind regards, henk-jan 13 | -------------------------------------------------------------------------------- /docs/plugins/index.rst: -------------------------------------------------------------------------------- 1 | Plugins 2 | ======= 3 | 4 | * A plugin is a file with predefined configuration for bots. It includes routes, channels, grammars, mappings etc. 5 | * Plugins are installed via ``bots-monitor-Systasks->Read plugin``. 6 | * In order to run the routes in a plugin you first have to activate the routes. 7 | * There are useful plugins on `the bots sourceforge site `_. 8 | * :doc:`Documentation ` for these plugins. 9 | 10 | .. note:: 11 | grammars for edifact and x12 are NOT plugins, and can not be installed. 12 | 13 | .. rubric:: 14 | For what is a bots plugin useful? 15 | 16 | * An easy way to distribute and share edi configurations for bots. 17 | * Learn from existing configurations 18 | * Backup your configuration. 19 | * Share your configuration with others (It would be nice if you want to share your configuration; other can use and/or learn from what you have done!). 20 | * Do another install of the same configuration. 21 | * Transfer your environment from test to production. 22 | * Plugins are used to update to a new version of bots (only between minor versions). 23 | 24 | .. note:: 25 | All bots 3.0.0 plugins are suited to use in `acceptance test mode <../advanced-deployment/change-management.html#isolated-acceptance-testing>`_. 26 | 27 | .. rubric:: 28 | Index 29 | 30 | .. toctree:: 31 | :maxdepth: 2 32 | 33 | install-plugin 34 | make-plugin 35 | plugins-explained 36 | plugins-sourceforge 37 | -------------------------------------------------------------------------------- /docs/plugins/install-plugin.rst: -------------------------------------------------------------------------------- 1 | Install a Plugin 2 | ================ 3 | 4 | * First download the plugin from the `bots sourceforge site `_ to your file system. 5 | * Go to ``bots-monitor-Systasks->Read plugin``. 6 | * Select the plugin from your system. 7 | * After selecting choose ``Read``. 8 | 9 | Bots will now report that is has read the plugin. 10 | 11 | .. note:: 12 | In order to run the routes in a plugin you first have to activate the routes. 13 | 14 | .. note:: 15 | grammars for edifact and x12 are NOT plugins, and can not be installed. 16 | -------------------------------------------------------------------------------- /docs/plugins/make-plugin.rst: -------------------------------------------------------------------------------- 1 | Make a Plugin 2 | ============= 3 | 4 | It is very easy to generate a plugin from your own configuration: 5 | 6 | #. Go to ``bots-monitor->Systasks->Make plugin``. 7 | #. Select what your want in the plugin (defaults are for a configuration plugin). 8 | #. Click button ``Make plugin``. 9 | #. Give filename/path to save the plugin. 10 | -------------------------------------------------------------------------------- /docs/plugins/plugins-explained.rst: -------------------------------------------------------------------------------- 1 | Plugins Explained 2 | ================= 3 | 4 | * A plugin is just a zip-file, you can view the contents. 5 | * A plugin has to contain a file (at the root) called ``botsindex``. This contains the database configuration. 6 | * The plugins on the web-site contain example edi files so you can run a translation and see the results. 7 | * The edi files are in ``bots/botssys/infile``; the results will be in ``bots/botssys/outfile``. 8 | * When reading a plugin your existing current configuration is backupped (in ``bots/botssys``) 9 | * When reading a plugin already existing database-entries, mapping scripts, grammars etc are overwritten. 10 | * In the web server log is logged what is installed (logging is in ``bots/botssys/logging``). 11 | * There is no un-install. 12 | * Beware if you make a plugin and share this: do not use e.g. password for an email account. 13 | * Plugins contain source code. This is a potentially security risk. Use only plugins from trusted sources. 14 | * Grammars for edifact and x12 are NOT plugins, and can not be installed! 15 | -------------------------------------------------------------------------------- /docs/quick-start-guide/index.rst: -------------------------------------------------------------------------------- 1 | Quick Start Guide 2 | ================= 3 | 4 | * Purpose of this tutorial is to get your first edi configuration running. 5 | * This is done by installing plugin ``my_first_plugin``; this plugin provides a working configuration. 6 | * When run, this configuration will read and write example edi messages (provided in the plugin) from your system. 7 | * In this configuration incoming edifact orders are translated to a fixed file format. 8 | 9 | **Install plugin ``my_first_plugin``** 10 | 11 | #. Assumed is: 12 | * You've installed bots, see :doc:`../installation` 13 | * You've managed to get bots-monitor running, see :doc:`get bots running<../get-bots-running>`. 14 | #. Now download and install plugin ``my_first_plugin``. 15 | #. Instructions for installing a plugin are :doc:`here <../plugins/install-plugin>`. 16 | #. The plugin can be downloaded from the `bots sourceforge site `_. 17 | 18 | **Activate the route** 19 | 20 | #. go to the routes screen: ``bots-monitor->Configuration->Routes`` 21 | #. note that route ``myfirstroute`` is not active now (indicated by red icon) 22 | #. select the tick-box in front of the route ``myfirstroute`` 23 | #. select action ``activate/de-activate`` 24 | #. click on the 'Go'-button behind the selected action. 25 | #. note that route ``myfirstroute`` is active now (indicated by green icon) 26 | 27 | **Run the translation** 28 | 29 | #. Run the translation: ``bots-monitor->Run->Run (Only New)``. 30 | #. You will get notified that the ``bots-engine`` is started. 31 | #. Bots-engine is the part of bots that does the translations and communications; it runs in the background. Bots-engine will be finished in approximately one second. 32 | 33 | 34 | **View the results** 35 | 36 | Now let's view the results of the translation: 37 | 38 | #. First look at the results of the run: ``bots-monitor->All runs->Reports (per run)``. Each run of bots is represented by a line; the last run is on top. 39 | #. View the incoming files via ``bots-monitor->Last run->Incoming``. Click on the incoming file to see its contents. 40 | #. View the outgoing files (the results of the translation) go to or ``bots-monitor->Last run->outgoing``. Again: click on the file name to see its contents. 41 | #. Note: this configuration reads the incoming files but does not delete them. So you can run it over and over again. 42 | 43 | 44 | **More** 45 | 46 | .. toctree:: 47 | :maxdepth: 2 48 | 49 | view-results 50 | walkthrough-setup 51 | what-happened 52 | -------------------------------------------------------------------------------- /docs/quick-start-guide/view-results.rst: -------------------------------------------------------------------------------- 1 | View Results 2 | ============ 3 | 4 | **View runs** 5 | 6 | For each run of bots-engine you can see the results in ``bots-monitor->All runs->Reports (per run)``: 7 | 8 | .. image:: ../images/Myfirst_runs.png 9 | 10 | If you go to the star in front of a line, a drop-down menu appears where you can zoom in on the results of the run. 11 | 12 | **Incoming** 13 | 14 | Incoming files of the last run can be viewed via ``bots-monitor->Last run->Incoming``: 15 | 16 | .. image:: ../images/Myfirst_incoming_last_run.png 17 | 18 | View all incoming files via ``bots-monitor->All runs->Incoming``: 19 | 20 | .. image:: ../images/Myfirst_incoming_all.png 21 | 22 | By using the 'Change selection' button you can change the selection criteria for the view. 23 | By clicking a filename you can view the contents of that file. 24 | 25 | **Outgoing** 26 | 27 | The outgoing files of the last run can be viewed via ``bots-monitor->Last run->Outgoing``: 28 | 29 | .. image:: ../images/Myfirst_outgoing_last_run.png 30 | 31 | By clicking a filename you can view the contents of that file. 32 | 33 | **Detail Screen** 34 | 35 | When you are in the ``incoming`` screen and go to the star in front of a line, a drop-down menu appears where you can zoom in on the details of the processing of the incoming file: 36 | 37 | .. image:: ../images/Myfirst_details.png 38 | 39 | Here the detailed steps in processing an incoming file are shown. 40 | -------------------------------------------------------------------------------- /docs/quick-start-guide/walkthrough-setup.rst: -------------------------------------------------------------------------------- 1 | Walk through setup 2 | ================== 3 | 4 | Lets take a look at the setup in ``my_first_plugin``. 5 | 6 | **Look at the configured route** 7 | 8 | To view the route configured: ``bots-monitor->Configuration->Routes``. This will look like: 9 | 10 | .. image:: ../images/StartRoutes.png 11 | 12 | * A route tells bots what to do: where to get the edi-files, what type of files these are (this determines the translation done), and where to put the translated edi-files.. 13 | * One route is configured, called ``myfirstfoute``. 14 | * The route uses communication channel ``myfirstroute_in`` to get incoming edi-files. 15 | * These are edifact format: fromeditype=edifact, frommessagetype=edifact. Bots will figure out the exact messagetype (like ORDERSD96AUN) by itself. 16 | * The translated edi-files (fixed format) go to communication channel ``myfirstroute_out``. 17 | 18 | **View the communication channels** 19 | 20 | To view the communication channels configured: ``bots-monitor->Configuration->Channels``. This will look like: 21 | 22 | .. image:: ../images/StartChannels.png 23 | 24 | * A communications channel communicates edi-files in or out of bots. 25 | * There are different types of channels, eg: file, ftp, smtp, pop3, etc. 26 | * In this plugin 2 routes are configured. Both are type ``file``: all reading and writing is to file system. 27 | * There is one ``in``-channel and one ``out``-channel. 28 | * Channels for file-system require a path and a filename. 29 | 30 | **The translations in this configuration** 31 | 32 | To view the translations configured: ``bots-monitor->Configuration->Translations``. This will look like: 33 | 34 | .. image:: ../images/StartTranslations.png 35 | 36 | * There is one :doc:`translation <../configuration/translation/index>` configured. 37 | * This translation translates edi messages of editype ``edifact`` and messagetype ``ORDERSD96AUNEAN008`` using mappingscript 38 | ``myfirstscriptordersedi2fixed`` to edi messages of editype ``fixed`` and messagetype ``ordersfixed``. 39 | * Each messagetype has a :doc:`grammar <../configuration/grammars/index>` which describes the message: records, fields, formats. The grammar is a file; you can find it in: ``C:\Python27\Lib\site-packages\bots\usersys\grammars\fixed`` 40 | * The :doc:`mapping script <../configuration/mapping-scripts/index>` does the actual translation; basically it gets data from the incoming message and puts the data in the outgoing message. 41 | * The mapping script is a file; you can find it in: ``C:\Python27\Lib\site-packages\bots\usersys\mappings\edifact`` 42 | -------------------------------------------------------------------------------- /docs/quick-start-guide/what-happened.rst: -------------------------------------------------------------------------------- 1 | What happened 2 | ============= 3 | 4 | **How does this ``run`` thing work?** 5 | 6 | #. When you run bots-engine, each active route is run. 7 | #. Per route bots will perform all configured actions (read, translate, write): 8 | #. In bots-monitor you can view the results of the run(s), the incoming edi-files, the outgoing edi-files, etc. 9 | 10 | **Detailed explanation** 11 | 12 | .. image:: ../images/RouteDiagram.png 13 | 14 | All actions in the picture take place in the route ``myfirstroute``. The route contains: 15 | 16 | * an in-channel - fetches the incoming orders. 17 | * in the route is indicated that it should translate 18 | * an out-channel - transports the in-house orders to your file system. 19 | 20 | When the incoming files have been read via the in-channel, bots starts to translate: 21 | 22 | * bots parses the incoming file, using the information in the route: editype=edifact, messagetype=edifact. 23 | * as edifact is a standard bots can find out itself that the incoming edifact file contains order messages of messagetype ORDERSD96AUNEAN008 24 | * bots looks in the translation table (see ``bots-monitor->Configuration->translations``) to find out what to do: what mapping script to use, to what editype and messagetype should be translated. In this case the mapping script ``myfirstscriptordersedi2fixed`` translates to editype **fixed**, messagetype **ordersfixed**. 25 | * the mapping script is the heart of the translation. In the mapping script the data from the incoming message is fetched and place into the outgoing message. 26 | 27 | A complete translation in bots needs: 28 | 29 | * Configure of the translation (``bots-monitor->Configuration->Translations``). 30 | * A grammar for the incoming message. A grammar describes an edi-message: the records, sequence of the records, fields in the records, field lengths etc. 31 | * A mapping script. The mapping script gets data from the incoming message and puts it in the outgoing message. A mapping script is a Python script. You do not need to be proficient in Python to do this; only the basics of Python are used. And Python is a relatively easy computer language. There are a lot of good examples of mapping scripts in the plugins. 32 | * A grammar for the outgoing message. 33 | -------------------------------------------------------------------------------- /docs/readme.rst: -------------------------------------------------------------------------------- 1 | Bots-Edi 2 | ======== 3 | 4 | .. image:: https://badges.gitter.im/Join Chat.svg 5 | :alt: Join the chat at https://gitter.im/bots-edi/Lobby 6 | :target: https://gitter.im/bots-edi/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge 7 | 8 | .. image:: https://readthedocs.org/projects/bots/badge/?version=latest 9 | :alt: Documentation Status 10 | :scale: 100% 11 | :target: https://bots-edi.github.io/bots/ 12 | 13 | .. image:: https://landscape.io/github/bots-edi/bots/master/landscape.svg?style=flat 14 | :target: https://landscape.io/github/bots-edi/bots/master 15 | :alt: Code Health 16 | 17 | .. image:: https://img.shields.io/pypi/v/bots.svg 18 | :target: https://pypi.python.org/pypi/bots 19 | :alt: Latest Version 20 | 21 | .. image:: https://img.shields.io/pypi/status/bots.svg 22 | :target: https://pypi.python.org/pypi/bots 23 | :alt: Development Status 24 | 25 | .. image:: https://img.shields.io/pypi/pyversions/bots.svg 26 | :target: https://pypi.python.org/pypi/bots 27 | :alt: Python Versions 28 | 29 | .. image:: https://img.shields.io/pypi/l/bots.svg 30 | :target: https://raw.githubusercontent.com/bots-edi/bots/master/license.rst 31 | :alt: License 32 | 33 | 34 | 35 | 36 | 37 | 38 | Bots is complete software for EDI (Electronic Data Interchange) 39 | Bots-Edi is a free, open-source EDI translator. It has the following features: 40 | 41 | :: 42 | 43 | - Supports all major EDI data formats: EDIFACT, x12, Tradacoms, XML. 44 | - Runs on Windows, Linux, OSX and Unix. 45 | - Bots is very stable. 46 | - Bots handles high volumes of EDI transactions. 47 | - Bots is very flexible and can be configurated for your specific EDI needs. 48 | 49 | This is a fork of Bots, which was created by `Henk-Jan 50 | Ebbers`_. This fork was 51 | created in an effort to build a more collaborative community around this 52 | project. 53 | 54 | Getting Started 55 | --------------- 56 | 57 | The documentation_ is a great place to get 58 | started. 59 | 60 | License 61 | ------- 62 | 63 | Bots is licenced under GNU GENERAL PUBLIC LICENSE Version 3; for full 64 | text: http://www.gnu.org/copyleft/gpl.html 65 | 66 | .. _Henk-Jan Ebbers: http://bots.sourceforge.net/en/index.shtml 67 | .. _documentation: https://bots-edi.github.io/bots 68 | -------------------------------------------------------------------------------- /docs/tutorials/index.rst: -------------------------------------------------------------------------------- 1 | Tutorials 2 | ========= 3 | 4 | General EDI and Bots specific implementation tutorials. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | edi-basics 10 | odoo-integration 11 | -------------------------------------------------------------------------------- /docs/tutorials/odoo-integration.rst: -------------------------------------------------------------------------------- 1 | Integration with Odoo/OpenERP 2 | ============================= 3 | 4 | Bots can add EDI support to Odoo (previously OpenERP). 5 | 6 | .. note:: 7 | The standard Odoo EDI module only transfers data between two Odoo installations and is NOT X12, EDIFACT or similar EDI. 8 | 9 | To do: 10 | 11 | * High Level Business Flow 12 | * The Odoo XMLRPC interface 13 | * The bots_connector module 14 | * Example script - Sending an X12 810 invoice 15 | * Example script - Creating a sale order from X12 850 purchase order 16 | -------------------------------------------------------------------------------- /etc/requirements.txt: -------------------------------------------------------------------------------- 1 | CherryPy==6.0.1 2 | click==6.6 3 | Django==1.7.11 4 | future==0.16.0 5 | six==1.10.0 6 | xlrd==1.0.0 7 | -------------------------------------------------------------------------------- /profile-engine.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | if __name__ == '__main__': 5 | import cProfile 6 | cProfile.run('from bots import engine; engine.start()','profile.tmp') 7 | import pstats 8 | p = pstats.Stats('profile.tmp') 9 | #~ p.sort_stats('cumulative').print_stats(25) 10 | p.sort_stats('time').print_stats(50) 11 | #~ p.print_callees('deepcopy').print_stats(1) 12 | p.print_callees('mydeepcopy') 13 | #~ p.sort_stats('time').print_stats('grammar.py',50) 14 | 15 | 16 | -------------------------------------------------------------------------------- /readme.rst: -------------------------------------------------------------------------------- 1 | docs/readme.rst -------------------------------------------------------------------------------- /scripts/bots-dirmonitor.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import dirmonitor 5 | 6 | if __name__ == '__main__': 7 | dirmonitor.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-engine.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import engine 5 | 6 | if __name__ == '__main__': 7 | engine.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-engine2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import engine2 5 | 6 | if __name__ == '__main__': 7 | engine2.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-grammarcheck.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import grammarcheck 5 | 6 | if __name__ == '__main__': 7 | grammarcheck.start() 8 | #~ grammarcheck.startmulti('bots/usersys/grammars/edifact/*','edifact') #for bulk check of grammars 9 | -------------------------------------------------------------------------------- /scripts/bots-job2queue.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import job2queue 5 | 6 | if __name__ == '__main__': 7 | job2queue.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-jobqueueserver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import jobqueueserver 5 | 6 | if __name__ == '__main__': 7 | jobqueueserver.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-jobqueueserver.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # uses 'start-stop-daemon' , which is used in debian/ubuntu 4 | # 5 | #~ PATH=/sbin:/usr/sbin:/bin:/usr/bin 6 | DEVDIR="/home/hje/Bots/botsdev/" 7 | NAME=bots-jobqueueserver 8 | PIDFILE=$DEVDIR$NAME"_dev.pid" 9 | DAEMON="/usr/bin/python2.7" 10 | DAEMON_ARGS=$DEVDIR"bots-jobqueueserver.py" 11 | 12 | case "$1" in 13 | start) 14 | echo "Starting "$NAME" " 15 | start-stop-daemon --start --verbose --background --pidfile $PIDFILE --make-pidfile --startas $DAEMON -- $DAEMON_ARGS 16 | ;; 17 | stop) 18 | echo "Stopping "$NAME" " 19 | start-stop-daemon --stop --verbose --pidfile $PIDFILE 20 | rm -f $PIDFILE 21 | ;; 22 | restart) 23 | echo "Restarting "$NAME" " 24 | start-stop-daemon --stop --verbose --pidfile $PIDFILE 25 | rm -f $PIDFILE 26 | sleep 1 27 | start-stop-daemon --start --verbose --background --pidfile $PIDFILE --make-pidfile --startas $DAEMON -- $DAEMON_ARGS 28 | ;; 29 | *) 30 | echo "Usage: ""$(basename "$0")"" {start|stop|restart}" 31 | echo " Starts the bots jobqueueserver as a daemon." 32 | echo " Bots-jobqueueserver is part of bots open source edi translator (http://bots.sourceforge.net)." 33 | exit 1 34 | ;; 35 | esac 36 | 37 | exit 0 38 | -------------------------------------------------------------------------------- /scripts/bots-plugoutindex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import plugoutindex 5 | 6 | if __name__ == '__main__': 7 | plugoutindex.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-updatedb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import botsupdatedb 5 | 6 | if __name__ == '__main__': 7 | botsupdatedb.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-webserver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import webserver 5 | 6 | if __name__ == '__main__': 7 | webserver.start() 8 | -------------------------------------------------------------------------------- /scripts/bots-webserverd.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # uses 'start-stop-daemon' , which is used in debian/ubuntu 4 | # 5 | #~ PATH=/sbin:/usr/sbin:/bin:/usr/bin 6 | DEVDIR="/home/hje/Bots/botsdev/" 7 | NAME=bots-webserver 8 | PIDFILE=$DEVDIR$NAME"_dev.pid" 9 | DAEMON="/usr/bin/python2.7" 10 | DAEMON_ARGS=$DEVDIR"bots-webserver.py" 11 | 12 | case "$1" in 13 | start) 14 | echo "Starting "$NAME" " 15 | start-stop-daemon --start --verbose --background --pidfile $PIDFILE --make-pidfile --startas $DAEMON -- $DAEMON_ARGS 16 | ;; 17 | stop) 18 | echo "Stopping "$NAME" " 19 | start-stop-daemon --stop --verbose --pidfile $PIDFILE 20 | rm -f $PIDFILE 21 | ;; 22 | restart) 23 | echo "Restarting "$NAME" " 24 | start-stop-daemon --stop --verbose --pidfile $PIDFILE 25 | rm -f $PIDFILE 26 | sleep 1 27 | start-stop-daemon --start --verbose --background --pidfile $PIDFILE --make-pidfile --startas $DAEMON -- $DAEMON_ARGS 28 | ;; 29 | *) 30 | echo "Usage: ""$(basename "$0")"" {start|stop|restart}" 31 | echo " Starts the bots webserver as a daemon." 32 | echo " Bots-webserver is part of bots open source edi translator (http://bots.sourceforge.net)." 33 | exit 1 34 | ;; 35 | esac 36 | 37 | exit 0 38 | -------------------------------------------------------------------------------- /scripts/bots-xml2botsgrammar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from bots import xml2botsgrammar 5 | 6 | if __name__ == '__main__': 7 | xml2botsgrammar.start() 8 | -------------------------------------------------------------------------------- /scripts/build_rpm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cp setup_rpm.py setup.py 3 | python2.7 setup.py bdist_rpm --quit --source-only --requires="python>=2.6, django>=1.4.0, cherrypy>=3.1.0" 4 | rm setup.py 5 | 6 | 7 | -------------------------------------------------------------------------------- /scripts/build_tar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cp setup_tar.py setup.py 3 | python2.7 setup.py --quiet sdist 4 | rm setup.py 5 | 6 | 7 | -------------------------------------------------------------------------------- /scripts/build_win.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | RMDIR /s /q "C:\Users\hje\Documents\Bots\botsdev\build" 3 | DEL /Q "C:\Users\hje\Documents\Bots\botsdev\MANIFEST" 4 | RMDIR /s /q "C:\Users\hje\Documents\Bots\botsdev\bots.egg-info" 5 | 6 | 7 | MOVE /Y "C:\Users\hje\Documents\Bots\botsdev\bots\config\bots.ini" "C:\Users\hje\Documents\Bots\abots" 8 | MOVE /Y "C:\Users\hje\Documents\Bots\botsdev\bots\config\settings.py" "C:\Users\hje\Documents\Bots\abots" 9 | MOVE /Y "C:\Users\hje\Documents\Bots\botsdev\bots\botssys\sqlitedb\botsdb" "C:\Users\hje\Documents\Bots\abots" 10 | 11 | 12 | ECHO build exe 13 | DEL /Q "C:\Users\hje\Documents\Bots\botsdev\setup.py" 14 | COPY /Y "C:\Users\hje\Documents\Bots\botsdev\setup_win.py" "C:\Users\hje\Documents\Bots\botsdev\setup.py" 15 | REM ~ c:\python26\python setup.py --quiet bdist_wininst --target-version=2.6 --install-script=postinstallation.py --no-target-compile --no-target-optimize --user-access-control=auto --bitmap=botslogo.bmp --title="Bots open source edi translator" 16 | c:\python27\python setup.py --quiet bdist_wininst --install-script=postinstallation.py --no-target-compile --no-target-optimize --user-access-control=force --bitmap=botslogo.bmp --title="Bots open source edi translator" 17 | REM c:\python27-64\python setup.py --quiet bdist_wininst --install-script=postinstallation.py --no-target-compile --no-target-optimize --user-access-control=force --bitmap=botslogo.bmp --title="Bots open source edi translator" 18 | 19 | 20 | REM COPY /Y "C:\Users\hje\Documents\Bots\botsdev\bots\install\settings.py" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 21 | REM COPY /Y "C:\Users\hje\Documents\Bots\botsdev\bots\install\bots.ini" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 22 | REM COPY /Y "C:\Users\hje\Documents\Bots\botsdev\bots\install\botsdb" "C:\Users\hje\Documents\Bots\botsdev\bots\botssys\sqlitedb" 23 | 24 | 25 | MOVE /Y "C:\Users\hje\Documents\Bots\abots\botsdb" "C:\Users\hje\Documents\Bots\botsdev\bots\botssys\sqlitedb" 26 | MOVE /Y "C:\Users\hje\Documents\Bots\abots\bots.ini" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 27 | MOVE /Y "C:\Users\hje\Documents\Bots\abots\settings.py" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 28 | 29 | 30 | RMDIR /s /q "C:\Users\hje\Documents\Bots\botsdev\build" 31 | DEL /Q "C:\Users\hje\Documents\Bots\botsdev\MANIFEST" 32 | ECHO BUILD FINISHED 33 | -------------------------------------------------------------------------------- /scripts/build_win64.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | RMDIR /s /q "C:\Users\hje\Documents\Bots\botsdev\build" 3 | DEL /Q "C:\Users\hje\Documents\Bots\botsdev\MANIFEST" 4 | RMDIR /s /q "C:\Users\hje\Documents\Bots\botsdev\bots.egg-info" 5 | 6 | 7 | MOVE /Y "C:\Users\hje\Documents\Bots\botsdev\bots\config\bots.ini" "C:\Users\hje\Documents\Bots\abots" 8 | MOVE /Y "C:\Users\hje\Documents\Bots\botsdev\bots\config\settings.py" "C:\Users\hje\Documents\Bots\abots" 9 | MOVE /Y "C:\Users\hje\Documents\Bots\botsdev\bots\botssys\sqlitedb\botsdb" "C:\Users\hje\Documents\Bots\abots" 10 | 11 | 12 | ECHO build exe 13 | DEL /Q "C:\Users\hje\Documents\Bots\botsdev\setup.py" 14 | COPY /Y "C:\Users\hje\Documents\Bots\botsdev\setup_win.py" "C:\Users\hje\Documents\Bots\botsdev\setup.py" 15 | REM ~ c:\python26\python setup.py --quiet bdist_wininst --target-version=2.6 --install-script=postinstallation.py --no-target-compile --no-target-optimize --user-access-control=auto --bitmap=botslogo.bmp --title="Bots open source edi translator" 16 | REM c:\python27\python setup.py --quiet bdist_wininst --install-script=postinstallation.py --no-target-compile --no-target-optimize --user-access-control=force --bitmap=botslogo.bmp --title="Bots open source edi translator" 17 | c:\python27-64\python setup.py --quiet bdist_wininst --install-script=postinstallation.py --no-target-compile --no-target-optimize --user-access-control=force --bitmap=botslogo.bmp --title="Bots open source edi translator" 18 | 19 | 20 | REM COPY /Y "C:\Users\hje\Documents\Bots\botsdev\bots\install\settings.py" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 21 | REM COPY /Y "C:\Users\hje\Documents\Bots\botsdev\bots\install\bots.ini" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 22 | REM COPY /Y "C:\Users\hje\Documents\Bots\botsdev\bots\install\botsdb" "C:\Users\hje\Documents\Bots\botsdev\bots\botssys\sqlitedb" 23 | 24 | 25 | MOVE /Y "C:\Users\hje\Documents\Bots\abots\botsdb" "C:\Users\hje\Documents\Bots\botsdev\bots\botssys\sqlitedb" 26 | MOVE /Y "C:\Users\hje\Documents\Bots\abots\bots.ini" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 27 | MOVE /Y "C:\Users\hje\Documents\Bots\abots\settings.py" "C:\Users\hje\Documents\Bots\botsdev\bots\config" 28 | 29 | 30 | RMDIR /s /q "C:\Users\hje\Documents\Bots\botsdev\build" 31 | DEL /Q "C:\Users\hje\Documents\Bots\botsdev\MANIFEST" 32 | ECHO BUILD FINISHED 33 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | # This is a comment. 2 | # setup.cfg is an ini-file that contains option defaults for setup.py commands. 3 | # The top-level keys in this file are ordered alphabetically and separated by 2 blank lines. 4 | # For more information, please see http://alexis.notmyidea.org/distutils2/setupcfg.html 5 | 6 | #[aliases] 7 | #test = pytest 8 | 9 | 10 | [bdist_wheel] 11 | universal = 1 12 | 13 | 14 | [build_sphinx] 15 | # pip install sphinx-pypi-upload 16 | source-dir = docs/ 17 | build-dir = docs/_build 18 | all_files = 1 19 | 20 | 21 | [check-manifest] 22 | # pip install check-manifest 23 | ignore = 24 | docs/_build 25 | docs/_build/* 26 | 27 | 28 | [egg_info] 29 | tag_build = 30 | tag_svn_revision = false 31 | 32 | 33 | [flake8] 34 | # pip install flake8 35 | # To silence any warnings or errors, please see 36 | # - pep8-codes: http://pep8.readthedocs.org/en/latest/intro.html#error-codes 37 | # - pep8-naming: https://pypi.python.org/pypi/pep8-naming/ 38 | 39 | # Warning: do not use any spaces in the ignore-list! 40 | 41 | # Following are silenced: 42 | # - E265: block comment should start with ‘# ‘ 43 | # - N802: function name should be lowercase 44 | # (because of setUp, and tearDown-methods in the unittest-module) 45 | # - FI50: __future__ import "division" present 46 | # - FI51: __future__ import "absolute_import" present 47 | # - FI52: __future__ import "with_statement" present 48 | # - FI53: __future__ import "print_function" present 49 | # - FI54: __future__ import "unicode_literals" present 50 | # - FI55: __future__ import "generator_stop" present 51 | 52 | ignore = E265,D203,N802,FI12,FI14,FI15,FI50,FI51,FI52,FI53,FI54,FI55 53 | hang-closing = true 54 | max-line-length = 120 55 | max-complexity = 11 56 | #exclude = tests/* 57 | 58 | 59 | [pep8] 60 | # pip install pep8 61 | # cfr. http://pep8.readthedocs.org/en/latest/intro.html#configuration 62 | # In the default configuration, the checks E123, E133, E226, E241 and E242 63 | # are ignored because they are not rules unanimously accepted 64 | ignore = E123,E265,N802 65 | max-line-length = 120 66 | 67 | 68 | [pytest] 69 | # pip install py.test 70 | 71 | python_files = 72 | test_*.py 73 | *_test.py 74 | tests.py 75 | 76 | 77 | [upload_sphinx] 78 | # pip install sphinx-pypi-upload 79 | upload-dir = docs/_build/html 80 | 81 | 82 | [zest.releaser] 83 | # pip install zest.releaser 84 | create-wheel = yes 85 | extra-message = [ci skip] 86 | -------------------------------------------------------------------------------- /src/bots/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/apachewebserver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from __future__ import unicode_literals 5 | #bots-modules 6 | from . import botsglobal 7 | from . import botsinit 8 | ''' This source file starts up bots monitor when using apache2 as webserver. 9 | 10 | WSGI SCRIPT EXAMPLE (outside bots directory, imports and starts this script apachewebserver.py): 11 | import sys 12 | import django.core.handlers.wsgi 13 | import mod_wsgi 14 | 15 | #Set PYTHONPATH. This is not needed if bots is already on PYTHONPATH 16 | #sys.path.append('/usr/local/lib/python2.7/dist-packages') 17 | from bots import apachewebserver 18 | 19 | config = mod_wsgi.process_group 20 | apachewebserver.start(config) 21 | application = django.core.handlers.wsgi.WSGIHandler() 22 | ''' 23 | ''' 24 | APACHE CONFIG FILE EXAMPLE: 25 | WSGIScriptAlias / 26 | Alias /media 27 | 28 | Listen 8080 29 | NameVirtualHost *:8080 30 | 31 | WSGIDaemonProcess config user=xxxxx 32 | WSGIProcessGroup config 33 | 34 | ''' 35 | 36 | 37 | def start(configdir): 38 | botsinit.generalinit(configdir) # find locating of bots, configfiles, init paths etc. 39 | process_name = 'apache_webserver_' + configdir 40 | # initialise file-logging for web-server. This logging only contains the logging from bots-webserver. 41 | botsglobal.logger = botsinit.initserverlogging(process_name) 42 | -------------------------------------------------------------------------------- /src/bots/botsconfig.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | #constants/definitions for Bots 4 | #to be used as: 5 | #from botsconfig import * 6 | 7 | #***for statust in ta: 8 | OPEN = 0 # Bots always closes transaction. OPEN is severe error 9 | ERROR = 1 # error in transaction. 10 | OK = 2 # successfull, result is 'save'. Should be picked up in same run. If automatic evaluation finds this: is 'stuck'. 11 | DONE = 3 # successfull, and result is picked up by next step 12 | RESEND = 4 # file has been resend. 13 | NO_RETRY = 5 # file has been resend. 14 | 15 | #***for status in ta: 16 | PROCESS = 1 17 | DISCARD = 3 18 | 19 | EXTERNIN = 200 # file is imported into bots 20 | FILEIN = 220 # received edifile 21 | PARSED = 310 # edifile is lexed and parsed 22 | SPLITUP = 320 # messages in the edifile have been split up 23 | TRANSLATED = 330 # result of translation 24 | MERGED = 400 # envelope and/or merged. 25 | FILEOUT = 500 # file is enveloped; ready for out 26 | EXTERNOUT = 520 # file is exported 27 | 28 | #***grammar.structure: keys in grammarrecords (dicts) 29 | ID = 0 30 | MIN = 1 31 | MAX = 2 32 | COUNT = 3 33 | LEVEL = 4 34 | MPATH = 5 35 | FIELDS = 6 36 | QUERIES = 7 37 | SUBTRANSLATION = 8 38 | BOTSIDNR = 9 39 | FIXED_RECORD_LENGTH = 10 # length of fixed record 40 | 41 | #***grammar.recorddefs: dict keys for fields of record eg: record[FIELDS][ID] == 'C124.0034' 42 | #ID = 0 (is already defined) 43 | MANDATORY = 1 44 | LENGTH = 2 45 | SUBFIELDS = 2 # for composites 46 | FORMAT = 3 # format in grammar file 47 | ISFIELD = 4 48 | DECIMALS = 5 49 | MINLENGTH = 6 50 | BFORMAT = 7 # internal bots format; formats in grammar are converted to bformat 51 | MAXREPEAT = 8 52 | 53 | #***lex_record in self.lex_records: is a dict 54 | VALUE = 0 55 | SFIELD = 1 # 1: is subfield, 0: field or first element composite 56 | LIN = 2 57 | POS = 3 58 | FIXEDLINE = 4 # for fixed records; tmp storage of fixed record 59 | FORMATFROMGRAMMAR = 5 # to store FORMAT field has in grammar 60 | -------------------------------------------------------------------------------- /src/bots/botsglobal.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from __future__ import unicode_literals 4 | import pkg_resources 5 | 6 | #Globals used by Bots 7 | version = pkg_resources.get_distribution('bots').version # bots version 8 | db = None # db-object 9 | ini = None # ini-file-object that is read (bots.ini) 10 | logger = None # logger or bots-engine 11 | logmap = None # logger for mapping in bots-engine 12 | settings = None # django's settings.py 13 | usersysimportpath = None 14 | currentrun = None # needed for minta4query 15 | routeid = '' # current route. This is used to set routeid for Processes. 16 | confirmrules = [] # confirmrules are read into memory at start of run 17 | not_import = set() # register modules that are not importable 18 | -------------------------------------------------------------------------------- /src/bots/botssqlite.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from __future__ import unicode_literals 4 | import sys 5 | import sqlite3 6 | import re 7 | 8 | reformatparamstyle = re.compile('%\((?P[^)]+)\)s') 9 | 10 | sqlite3.register_adapter(bool, int) # python type -> SQL type 11 | sqlite3.register_converter(str('BOOLEAN'), lambda s: bool(int(s))) # SQL type -> python type 12 | 13 | 14 | def connect(database): 15 | con = sqlite3.connect(database, factory=BotsConnection, detect_types=sqlite3.PARSE_DECLTYPES, 16 | timeout=99.0, isolation_level='EXCLUSIVE') 17 | con.row_factory = sqlite3.Row 18 | con.execute('''PRAGMA synchronous=OFF''') 19 | return con 20 | 21 | 22 | class BotsConnection(sqlite3.Connection): 23 | 24 | def cursor(self): 25 | return sqlite3.Connection.cursor(self, factory=BotsCursor) 26 | 27 | 28 | class BotsCursor(sqlite3.Cursor): 29 | ''' 30 | bots engine uses: 31 | SELECT * FROM ta WHERE idta=%(idta)s,{'idta':12345}) 32 | SQLite wants: 33 | SELECT * FROM ta WHERE idta=:idta ,{'idta': 12345} 34 | ''' 35 | 36 | def execute(self, string, parameters=None): 37 | if parameters is None: 38 | sqlite3.Cursor.execute(self, string) 39 | else: 40 | sqlite3.Cursor.execute(self, reformatparamstyle.sub(''':\g''', string), parameters) 41 | -------------------------------------------------------------------------------- /src/bots/config/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/install/botsdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/install/botsdb -------------------------------------------------------------------------------- /src/bots/locale/nl/LC_MESSAGES/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/locale/nl/LC_MESSAGES/django.mo -------------------------------------------------------------------------------- /src/bots/media/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* DASHBOARD */ 2 | 3 | .dashboard .module table th { 4 | width: 100%; 5 | } 6 | 7 | .dashboard .module table td { 8 | white-space: nowrap; 9 | } 10 | 11 | .dashboard .module table td a { 12 | display: block; 13 | padding-right: .6em; 14 | } 15 | 16 | /* RECENT ACTIONS MODULE */ 17 | 18 | .module ul.actionlist { 19 | margin-left: 0; 20 | } 21 | 22 | ul.actionlist li { 23 | list-style-type: none; 24 | } 25 | 26 | ul.actionlist li.changelink { 27 | overflow: hidden; 28 | text-overflow: ellipsis; 29 | -o-text-overflow: ellipsis; 30 | } -------------------------------------------------------------------------------- /src/bots/media/admin/css/ie.css: -------------------------------------------------------------------------------- 1 | /* IE 6 & 7 */ 2 | 3 | /* Proper fixed width for dashboard in IE6 */ 4 | 5 | .dashboard #content { 6 | *width: 768px; 7 | } 8 | 9 | .dashboard #content-main { 10 | *width: 535px; 11 | } 12 | 13 | /* IE 6 ONLY */ 14 | 15 | /* Keep header from flowing off the page */ 16 | 17 | #container { 18 | _position: static; 19 | } 20 | 21 | /* Put the right sidebars back on the page */ 22 | 23 | .colMS #content-related { 24 | _margin-right: 0; 25 | _margin-left: 10px; 26 | _position: static; 27 | } 28 | 29 | /* Put the left sidebars back on the page */ 30 | 31 | .colSM #content-related { 32 | _margin-right: 10px; 33 | _margin-left: -115px; 34 | _position: static; 35 | } 36 | 37 | .form-row { 38 | _height: 1%; 39 | } 40 | 41 | /* Fix right margin for changelist filters in IE6 */ 42 | 43 | #changelist-filter ul { 44 | _margin-right: -10px; 45 | } 46 | 47 | /* IE ignores min-height, but treats height as if it were min-height */ 48 | 49 | .change-list .filtered { 50 | _height: 400px; 51 | } 52 | 53 | /* IE doesn't know alpha transparency in PNGs */ 54 | 55 | .inline-deletelink { 56 | background: transparent url(../img/inline-delete-8bit.png) no-repeat; 57 | } 58 | 59 | /* IE7 doesn't support inline-block */ 60 | .change-list ul.toplinks li { 61 | zoom: 1; 62 | *display: inline; 63 | } -------------------------------------------------------------------------------- /src/bots/media/admin/css/login.css: -------------------------------------------------------------------------------- 1 | /* LOGIN FORM */ 2 | 3 | body.login { 4 | background: #eee; 5 | } 6 | 7 | .login #container { 8 | background: white; 9 | border: 1px solid #ccc; 10 | width: 28em; 11 | min-width: 300px; 12 | margin-left: auto; 13 | margin-right: auto; 14 | margin-top: 100px; 15 | } 16 | 17 | .login #content-main { 18 | width: 100%; 19 | } 20 | 21 | .login form { 22 | margin-top: 1em; 23 | } 24 | 25 | .login .form-row { 26 | padding: 4px 0; 27 | float: left; 28 | width: 100%; 29 | } 30 | 31 | .login .form-row label { 32 | float: left; 33 | width: 9em; 34 | padding-right: 0.5em; 35 | line-height: 2em; 36 | text-align: right; 37 | font-size: 1em; 38 | color: #333; 39 | } 40 | 41 | .login .form-row #id_username, .login .form-row #id_password { 42 | width: 14em; 43 | } 44 | 45 | .login span.help { 46 | font-size: 10px; 47 | display: block; 48 | } 49 | 50 | .login .submit-row { 51 | clear: both; 52 | padding: 1em 0 0 9.4em; 53 | } 54 | 55 | .login .password-reset-link { 56 | text-align: center; 57 | } 58 | -------------------------------------------------------------------------------- /src/bots/media/admin/img/changelist-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/changelist-bg.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/changelist-bg_rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/changelist-bg_rtl.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/chooser-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/chooser-bg.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/chooser_stacked-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/chooser_stacked-bg.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/default-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/default-bg-reverse.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/default-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/default-bg.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/deleted-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/deleted-overlay.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/gis/move_vertex_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/gis/move_vertex_off.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/gis/move_vertex_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/gis/move_vertex_on.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon-no.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon-no.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon-unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon-unknown.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon-yes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon-yes.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_addlink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_addlink.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_alert.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_calendar.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_changelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_changelink.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_clock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_clock.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_deletelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_deletelink.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_error.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_searchbox.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/icon_success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/icon_success.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/inline-delete-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/inline-delete-8bit.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/inline-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/inline-delete.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/inline-restore-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/inline-restore-8bit.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/inline-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/inline-restore.png -------------------------------------------------------------------------------- /src/bots/media/admin/img/inline-splitter-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/inline-splitter-bg.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/nav-bg-grabber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/nav-bg-grabber.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/nav-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/nav-bg-reverse.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/nav-bg-selected.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/nav-bg-selected.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/nav-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/nav-bg.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/selector-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/selector-icons.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/selector-search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/selector-search.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/sorting-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/sorting-icons.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tool-left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tool-left.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tool-left_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tool-left_over.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tool-right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tool-right.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tool-right_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tool-right_over.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tooltag-add.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tooltag-add.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tooltag-add_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tooltag-add_over.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tooltag-arrowright.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tooltag-arrowright.gif -------------------------------------------------------------------------------- /src/bots/media/admin/img/tooltag-arrowright_over.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/src/bots/media/admin/img/tooltag-arrowright_over.gif -------------------------------------------------------------------------------- /src/bots/media/admin/js/LICENSE-JQUERY.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 John Resig, http://jquery.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/bots/media/admin/js/collapse.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready(function() { 3 | // Add anchor tag for Show/Hide link 4 | $("fieldset.collapse").each(function(i, elem) { 5 | // Don't hide if fields in this fieldset have errors 6 | if ($(elem).find("div.errors").length == 0) { 7 | $(elem).addClass("collapsed").find("h2").first().append(' (' + gettext("Show") + 9 | ')'); 10 | } 11 | }); 12 | // Add toggle to anchor tag 13 | $("fieldset.collapse a.collapse-toggle").toggle( 14 | function() { // Show 15 | $(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset", [$(this).attr("id")]); 16 | return false; 17 | }, 18 | function() { // Hide 19 | $(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", [$(this).attr("id")]); 20 | return false; 21 | } 22 | ); 23 | }); 24 | })(django.jQuery); 25 | -------------------------------------------------------------------------------- /src/bots/media/admin/js/collapse.min.js: -------------------------------------------------------------------------------- 1 | (function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){0==a(b).find("div.errors").length&&a(b).addClass("collapsed").find("h2").first().append(' ('+gettext("Show")+")")});a("fieldset.collapse a.collapse-toggle").toggle(function(){a(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]);return!1},function(){a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", 2 | [a(this).attr("id")]);return!1})})})(django.jQuery); 3 | -------------------------------------------------------------------------------- /src/bots/media/admin/js/compress.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import optparse 4 | import subprocess 5 | import sys 6 | 7 | here = os.path.dirname(__file__) 8 | 9 | def main(): 10 | usage = "usage: %prog [file1..fileN]" 11 | description = """With no file paths given this script will automatically 12 | compress all jQuery-based files of the admin app. Requires the Google Closure 13 | Compiler library and Java version 6 or later.""" 14 | parser = optparse.OptionParser(usage, description=description) 15 | parser.add_option("-c", dest="compiler", default="~/bin/compiler.jar", 16 | help="path to Closure Compiler jar file") 17 | parser.add_option("-v", "--verbose", 18 | action="store_true", dest="verbose") 19 | parser.add_option("-q", "--quiet", 20 | action="store_false", dest="verbose") 21 | (options, args) = parser.parse_args() 22 | 23 | compiler = os.path.expanduser(options.compiler) 24 | if not os.path.exists(compiler): 25 | sys.exit("Google Closure compiler jar file %s not found. Please use the -c option to specify the path." % compiler) 26 | 27 | if not args: 28 | if options.verbose: 29 | sys.stdout.write("No filenames given; defaulting to admin scripts\n") 30 | args = [os.path.join(here, f) for f in [ 31 | "actions.js", "collapse.js", "inlines.js", "prepopulate.js"]] 32 | 33 | for arg in args: 34 | if not arg.endswith(".js"): 35 | arg = arg + ".js" 36 | to_compress = os.path.expanduser(arg) 37 | if os.path.exists(to_compress): 38 | to_compress_min = "%s.min.js" % "".join(arg.rsplit(".js")) 39 | cmd = "java -jar %s --js %s --js_output_file %s" % (compiler, to_compress, to_compress_min) 40 | if options.verbose: 41 | sys.stdout.write("Running: %s\n" % cmd) 42 | subprocess.call(cmd.split()) 43 | else: 44 | sys.stdout.write("File %s not found. Sure it exists?\n" % to_compress) 45 | 46 | if __name__ == '__main__': 47 | main() 48 | -------------------------------------------------------------------------------- /src/bots/media/admin/js/inlines.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.formset=function(c){var a=b.extend({},b.fn.formset.defaults,c),j=function(a,e,d){var i=RegExp("("+e+"-(\\d+|__prefix__))"),e=e+"-"+d;b(a).attr("for")&&b(a).attr("for",b(a).attr("for").replace(i,e));if(a.id)a.id=a.id.replace(i,e);if(a.name)a.name=a.name.replace(i,e)},c=b("#id_"+a.prefix+"-TOTAL_FORMS").attr("autocomplete","off"),g=parseInt(c.val()),f=b("#id_"+a.prefix+"-MAX_NUM_FORMS").attr("autocomplete","off"),c=""==f.val()||0'+a.addText+""),h=b(this).parent().find("tr:last a")):(b(this).filter(":last").after('"),h=b(this).filter(":last").next().find("a"));h.click(function(){var c=b("#id_"+a.prefix+ 3 | "-TOTAL_FORMS"),e=b("#"+a.prefix+"-empty"),d=e.clone(!0);d.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+g);d.is("tr")?d.children(":last").append('"):d.is("ul")||d.is("ol")?d.append('
  • '+a.deleteText+"
  • "):d.children(":first").append(''+a.deleteText+ 4 | "");d.find("*").each(function(){j(this,a.prefix,c.val())});d.insertBefore(b(e));b(c).val(parseInt(c.val())+1);g+=1;""!=f.val()&&0>=f.val()-c.val()&&h.parent().hide();d.find("a."+a.deleteCssClass).click(function(){var c=b(this).parents("."+a.formCssClass);c.remove();g-=1;a.removed&&a.removed(c);c=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(c.length);(""==f.val()||0 0) { 25 | values.push($(field).val()); 26 | } 27 | }) 28 | field.val(URLify(values.join(' '), maxLength)); 29 | }; 30 | 31 | $(dependencies.join(',')).keyup(populate).change(populate).focus(populate); 32 | }); 33 | }; 34 | })(django.jQuery); 35 | -------------------------------------------------------------------------------- /src/bots/media/admin/js/prepopulate.min.js: -------------------------------------------------------------------------------- 1 | (function(a){a.fn.prepopulate=function(d,e){return this.each(function(){var b=a(this);b.data("_changed",!1);b.change(function(){b.data("_changed",!0)});var c=function(){if(!0!=b.data("_changed")){var c=[];a.each(d,function(b,d){0{% trans 'Page not found' %} 9 | 10 |

    {% trans "We're sorry, but the requested page could not be found." %}

    11 | 12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /src/bots/templates/500.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base_site.html" %} 2 | {% load i18n %} 3 | 4 | {% block breadcrumbs %}{% endblock %} 5 | 6 | {% block title %}{% trans 'Server error (500)' %}{% endblock %} 7 | 8 | {% block content %} 9 |

    {% trans 'Server Error (500)' %}

    10 | {% if exc_info %} 11 |
    12 |         {{ exc_info }}
    13 |         
    14 | {% endif %} 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /src/bots/templates/admin/base.html: -------------------------------------------------------------------------------- 1 | {% load admin_static %}{% load url from future %} 2 | 3 | 4 | {{ bots_environment_text }} {{ bots_http_path }} 5 | 6 | {% block extrastyle %}{% endblock %} 7 | 8 | {% block extrahead %}{% endblock %} 9 | {% if LANGUAGE_BIDI %}{% endif %} 10 | 11 | 12 | 13 | 14 | {% load i18n %} 15 | 16 | 17 | 18 | {% if not is_popup %} 19 | {% include botslogo %} 20 |
    21 |
    {{ bots_environment_text }}
    22 |
    23 | {% include "bots/menu.html" %} 24 | {% endif %} 25 | 26 |
    27 | {% if messages %} 28 |
      29 | {% for message in messages %} 30 | {{ message }} 31 | {% endfor %} 32 |
    33 | {% endif %} 34 |
    35 | {% block pretitle %}{% endblock %} 36 | {% block content_title %}{% if title %}

    {{ title }}

    {% endif %}{% endblock %} 37 | {% block content %} 38 | {% block object-tools %}{% endblock %} 39 | {{ content }} 40 | {% endblock %} 41 | {% block sidebar %}{% endblock %} 42 |
    43 |
    44 |
    45 | 46 | 47 | -------------------------------------------------------------------------------- /src/bots/templates/admin/submit_line.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 |
    3 | 4 | 5 | {% if show_delete_link %} {% endif %} 6 | {% if show_save %} {% endif %} 7 | {% if show_save_as_new %} {% endif %} 8 | {% if show_save_and_add_another %}{% endif %} 9 | {% if show_save_and_continue %} {% endif %} 10 |
    11 | -------------------------------------------------------------------------------- /src/bots/templates/bots/about.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for key, value in botsinfo %} 24 | {% if value %} 25 | 26 | 27 | 28 | {% endif %} 29 | {% endfor %} 30 |
    8 |

    {% trans 'Bots Open Source EDI Translator' %}

    9 |
    10 | {% trans 'Bots documentation' %}
    11 | {% trans 'Bots mailing list' %}
    12 | {% trans 'Commercial support by EbbersConsult' %}
    13 |
    14 |
    {% trans 'Current user' %}{{ user.username }}
    {% trans 'Last login' %}{{ user.last_login|date:"Y-m-d G:i" }}
    {{ key|lower|capfirst }}{{ value }}
    31 | {% endblock %} 32 | 33 | -------------------------------------------------------------------------------- /src/bots/templates/bots/botslogo.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/bots/templates/bots/delete.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | 53 | {% endif %} 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/bots/templates/bots/logfiler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bots Log File Viewer 5 | 6 | 7 | {% load i18n %} 8 | 9 | {% if error_content %} 10 | {{ error_content }} 11 | {% else %} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 23 | 26 | 27 |
    logfiles{{ log }}    {% trans 'Download' %}
    19 | {% for file in logfiles %} 20 | {{ file }}
    21 | {% endfor %} 22 |
    24 |
    {{ logdata }}
    25 |
    28 | {% endif %} 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/bots/templates/bots/paginator.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% if queryset.has_previous %} 3 | 4 | 5 | {% else %} 6 | 7 | 8 | {% endif %} 9 | ({% trans 'Page' %} {{ queryset.number }} {% trans 'of' %} {{ queryset.paginator.num_pages }}; {{ queryset.paginator.count }} {% trans 'items' %}) 10 | {% if queryset.has_next %} 11 | 12 | 13 | {% else %} 14 | 15 | 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/bots/templates/bots/plugin.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |
    6 |

    Read a plugin

    7 |

     Select a plugin from your file system:

    8 |
    9 |
    {% csrf_token %} 10 | 11 | {{ form }} 12 |
    13 |
      14 | 15 | 16 |
    17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /src/bots/templates/bots/plugin_index.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |
    6 |

    Confirm reading index file

    7 |

     Please confirm reading the default index file bots/usersys/index.py. This might change your configuration!

    8 |
    9 |
    {% csrf_token %} 10 |
      11 | 12 | 13 |
    14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /src/bots/templates/bots/plugout.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |
    6 |

    Make a plugin

    7 |

     The plugin that is made will be offered to you as a download.

    8 |

     Select what you need in the plugin:

    9 |
    10 |
    {% csrf_token %} 11 | 12 | {{ form }} 13 |
    14 |
      15 | 16 |
    17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /src/bots/templates/bots/process.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |
    {% csrf_token %} 6 | 7 | 8 | 9 | 10 | {% include "bots/paginator.html" %} 11 | 12 | 13 | {% for hidden in form.hidden_fields %} 14 | {{ hidden }} 15 | {% endfor %} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | {% for row in queryset.object_list %} 30 | 31 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | {% endfor %} 45 | 46 |
    32 | 35 | {{row.get_statust_display}}{{row.idroute}}{{row.ts|date:"Y-m-d H:i:s"}}{{row.fromchannel}}{{row.tochannel}}{{row.filename}}{{row.errortext}}
    47 |
    48 | {% endblock %} 49 | 50 | -------------------------------------------------------------------------------- /src/bots/templates/bots/selectform.html: -------------------------------------------------------------------------------- 1 | {% extends "admin/base.html" %} 2 | {% load i18n %} 3 | 4 | 5 | 7 | {% block extrahead %} 8 | 9 | 10 | 11 | 12 | 13 | 30 | {% endblock %} 31 | 32 | {% block content %} 33 |
    34 | {% if request.META.PATH_INFO == "/processes/" %} 35 |

    Select process errors

    36 | {% else %} 37 | {% if request.META.PATH_INFO == "/confirm/" %} 38 |

    Select confirmations

    39 | {% else %} 40 |

    Select {{request.META.PATH_INFO|cut:'/'}}

    41 | {% endif %} 42 | {% endif %} 43 |

     Make your required selections below:

    44 |
    45 |
    {% csrf_token %} 46 | 47 | {{ form.as_table }} 48 |
    49 |
      50 |

    51 | 52 |
    53 | {% endblock %} 54 | -------------------------------------------------------------------------------- /src/bots/templates/bots/srcfiler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bots Source Viewer 5 | 6 | 17 | 18 | {% load i18n %} 19 | 20 | {% if error_content %} 21 | {{ error_content }} 22 | {% else %} 23 |

    {{ src }}

    24 |
    {{ html_source|safe }}
    25 |
    26 | {% endif %} 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/bots/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/templatetags/botsfilters.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import os 4 | from django import template 5 | 6 | register = template.Library() 7 | 8 | @register.filter 9 | def shortpath(path): 10 | if path: 11 | terug = os.path.basename(path) 12 | if terug: 13 | return terug 14 | else: 15 | return '(file)' #for soem cases there is no good filename..... 16 | return '' 17 | -------------------------------------------------------------------------------- /src/bots/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from __future__ import unicode_literals 4 | from django.conf.urls import patterns, include, url 5 | from django.contrib import admin 6 | from django.contrib.auth.decorators import login_required, user_passes_test 7 | from . import views 8 | 9 | admin.autodiscover() 10 | 11 | staff_required = user_passes_test(lambda u: u.is_staff) 12 | 13 | superuser_required = user_passes_test(lambda u: u.is_superuser) 14 | 15 | run_permission = user_passes_test(lambda u: u.has_perm('bots.change_mutex')) 16 | 17 | urlpatterns = patterns( 18 | '', 19 | url(r'^login.*', 'django.contrib.auth.views.login', {'template_name': 'admin/login.html'}), 20 | url(r'^logout.*', 'django.contrib.auth.views.logout', {'next_page': '/'}), 21 | url(r'^password_change/$', 'django.contrib.auth.views.password_change', name='password_change'), 22 | url(r'^password_change/done/$', 'django.contrib.auth.views.password_change_done', 23 | name='password_change_done'), 24 | #login required 25 | url(r'^home.*', login_required(views.home)), 26 | url(r'^incoming.*', login_required(views.incoming)), 27 | url(r'^detail.*', login_required(views.detail)), 28 | url(r'^process.*', login_required(views.process)), 29 | url(r'^outgoing.*', login_required(views.outgoing)), 30 | url(r'^document.*', login_required(views.document)), 31 | url(r'^reports.*', login_required(views.reports)), 32 | url(r'^confirm.*', login_required(views.confirm)), 33 | url(r'^filer.*', login_required(views.filer)), 34 | url(r'^srcfiler.*', login_required(views.srcfiler)), 35 | url(r'^logfiler.*', login_required(views.logfiler)), 36 | #only staff 37 | url(r'^admin/$', login_required(views.home)), # do not show django admin root page 38 | url(r'^admin/bots/$', login_required(views.home)), # do not show django admin root page 39 | url(r'^admin/', include(admin.site.urls)), 40 | url(r'^runengine.+', run_permission(views.runengine)), 41 | #only superuser 42 | url(r'^delete.*', superuser_required(views.delete)), 43 | url(r'^plugin/index.*', superuser_required(views.plugin_index)), 44 | url(r'^plugin.*', superuser_required(views.plugin)), 45 | url(r'^plugout/index.*', superuser_required(views.plugout_index)), 46 | url(r'^plugout/backup.*', superuser_required(views.plugout_backup)), 47 | url(r'^plugout.*', superuser_required(views.plugout)), 48 | url(r'^sendtestmail.*', superuser_required(views.sendtestmailmanagers)), 49 | #catch-all 50 | url(r'^.*', 'bots.views.index'), 51 | ) 52 | 53 | handler500 = 'bots.views.server_error' 54 | -------------------------------------------------------------------------------- /src/bots/usersys/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/charsets/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/communicationscripts/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/csv/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/database/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/edifact/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/fixed/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/idoc/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/json/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/jsonnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/template/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/tradacoms/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/x12/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/xml/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/envelopescripts/xmlnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/csv/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/edifact/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/excel/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/fixed/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/idoc/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/json/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/jsonnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/templatehtml/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/templatehtml/templates/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/test/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/tradacoms/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/x12/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/xml/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/grammars/xmlnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/csv/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/db/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/edifact/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/excel/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/fixed/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/idoc/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/json/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/jsonnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/raw/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/tradacoms/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/x12/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/xml/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/mappings/xmlnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/csv/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/edifact/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/fixed/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/idoc/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/json/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/jsonnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/template/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/tradacoms/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/x12/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/xml/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/partners/xmlnocheck/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/bots/usersys/routescripts/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tests/unit_multi_1.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bots-edi/bots/ce6fdc37fdd59623103fa3e5a131e12c961e1bb3/tests/unit_multi_1.py --------------------------------------------------------------------------------