3.0.0 • Published 7 years ago

robot-cantine-rpc01 v3.0.0

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

robot-cantine-rpc01

Robot d'envoi hebdomadaire (avec option d'extraction quotidienne) du menu de la cantine du service rpc01

Installation

npm i -g robot-cantine-rpc01

ATTENTION : Node ≥ 6 requis

Configuration

cf. sample.robotcantinerc:

{
  // Enregistrer en tant que ".robotcantinerc"
  "rpcCode": 112, // 112 = standard, 111 = 20% bio, 113 = bistrot, 114 = collège, cf. https://www.rpc01.com/menu11.html
  "zone": "A", // Zone de vacances scolaires
  "includeDayMenu": false,
  "filename": "[/tmp/menu-cantine-semaine-]w[.pdf]",
  "thumbname": "[/tmp/menu-cantine-jour-]DD/MM[.png]",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.16 Safari/537.36",
  "mail": {
    "transport": "smtps://user%40gmail.com:password@smtp.gmail.com",
    "from": "user@gmail.com",
    "to": [
      // mailing list
    ],
    "subject": "[Menu cantine semaine du ]DD/MM",
    "text": "PDF ci-joint. Lien direct: {URL}"
  }
}

Utilisation

robot-cantine-rpc01

Le robot sauvegarde l'état de dernier envoi dans $HOME/.robotcantine.status.json, ainsi le relancer plusieurs fois de suite n'a aucun effet si la précédente a fonctionné.