eppye-bots / bots

Automatically exported from code.google.com/p/bots
63 stars 125 forks source link

mapping is the centre of bots #360

Closed GoogleCodeExporter closed 3 years ago

GoogleCodeExporter commented 8 years ago
bigger issue/change; includes issues/changes: 356, 355, 328.
do 'as much as possible' from mapping (mapping as centre of bots)

incoming:
- access to frommail, tomail
- access to whole envelope
- one (simple) function to get incomign RAW file
outgoing:
- set envelope values
- set frommail, tomail 
- set outgoing channel

Original issue reported on code.google.com by hjebb...@gmail.com on 16 May 2015 at 2:24

GoogleCodeExporter commented 8 years ago
incoming:
- simple access to external filename / attachment name

outgoing:
- set email subject
- set external outgoing filename / attachment name (now must use botskey for 
this)

Original comment by mjg1964 on 7 Jul 2015 at 6:06

GoogleCodeExporter commented 8 years ago
yes, agree on filename.
set external filename: never thought of that.
seems possible.

Original comment by hjebb...@gmail.com on 7 Jul 2015 at 8:52

cncook001 commented 8 years ago

BOTS should be able to take an input file, do a transform/mapping (but not change anything), and return exactly the same file.

djfurman commented 8 years ago

BOTS should be able to take an input file, do a transform/mapping (but not change anything), and return exactly the same file.

@cncook001, BOTS currently has this functionality.

To accomplish this:

  1. Create a mapping scripting in the appropriate file type (e.g., EDIFACT usersys/mappings/edifact)
  2. Create a translation rule to map incoming EDI type to outgoing EDI type (both the same) using this script
  3. Establish the channels
  4. Establish the route
  5. Place the files in the infile
  6. Run bots-engine.py
# inside 'usersys/mappings/edifact/map_without_changes.py'

import bots.transform as transform

def main(inn, out):

    transform.inn2out(inn,out)

I use this function regularly combined with the where/change functionality to obfuscate transaction information for client presentations.

Reference: https://github.com/eppye-bots/bots/blob/wiki/MappingFunction.md