]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Tue, 11 Feb 2020 18:20:12 +0000 (19:20 +0100)
committerVincent <vincent@enhydra.fr>
Tue, 11 Feb 2020 18:20:12 +0000 (19:20 +0100)
.idea/workspace.xml
scripts/lib/jarvis.php

index 30c7cc4680f8078fc87eed88fa3c55a93b3b4fba..42dd302529dc9dc6173cdaca904f50b2b57506f4 100644 (file)
@@ -2,9 +2,8 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change afterPath="$PROJECT_DIR$/tools/xplanet/xplanet-earth" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/jarvis.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/jarvis.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1580545354824" duration="796000" />
       <workItem from="1580720992873" duration="177000" />
       <workItem from="1580894754542" duration="2587000" />
-      <workItem from="1581367617869" duration="13051000" />
-    </task>
-    <task id="LOCAL-00245" summary=".">
-      <created>1574242924581</created>
-      <option name="number" value="00245" />
-      <option name="presentableId" value="LOCAL-00245" />
-      <option name="project" value="LOCAL" />
-      <updated>1574242924581</updated>
+      <workItem from="1581367617869" duration="13144000" />
+      <workItem from="1581444247533" duration="938000" />
     </task>
     <task id="LOCAL-00246" summary=".">
       <created>1574340363978</created>
       <option name="project" value="LOCAL" />
       <updated>1581414712831</updated>
     </task>
-    <option name="localTasksCounter" value="294" />
+    <task id="LOCAL-00294" summary=".">
+      <created>1581434421749</created>
+      <option name="number" value="00294" />
+      <option name="presentableId" value="LOCAL-00294" />
+      <option name="project" value="LOCAL" />
+      <updated>1581434421749</updated>
+    </task>
+    <option name="localTasksCounter" value="295" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </state>
     <state x="720" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577298128269" />
     <state x="960" y="247" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1580459136096" />
-    <state x="935" y="114" key="CommitChangelistDialog2" timestamp="1581414709441">
-      <screen x="0" y="0" width="2560" height="1040" />
+    <state x="701" y="127" key="CommitChangelistDialog2" timestamp="1581434419078">
+      <screen x="0" y="0" width="1920" height="1160" />
     </state>
     <state x="701" y="114" key="CommitChangelistDialog2/0.0.1920.1040@0.0.1920.1040" timestamp="1577381105204" />
-    <state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1575647157027" />
+    <state x="701" y="127" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1581434419078" />
     <state x="935" y="114" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1581414709441" />
     <state x="92" y="92" width="2376" height="856" key="DiffContextDialog" timestamp="1580377344165">
       <screen x="0" y="0" width="2560" height="1040" />
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1580377827629" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1581367635392">
-      <screen x="0" y="0" width="2560" height="1040" />
+    <state x="732" y="383" key="com.intellij.ide.util.TipDialog" timestamp="1581444247619">
+      <screen x="0" y="0" width="1920" height="1160" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
-    <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1575647093028" />
+    <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1581444247619" />
     <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1581367635392" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1581412193715">
       <screen x="0" y="0" width="2560" height="1040" />
index 1e686391cc069a41d05a10a276dab9cbb386ce39..578f5c5dcfeb9a1621316edcad2db157b877cfb6 100644 (file)
@@ -2,18 +2,18 @@
 
 function jarvisCmd($question)
 {
-       $c = sshCommand('/usr/local/bin/jarvis -j -x "' . addcslashes($question, '"') . '"', 'jarvis');
+    $c = sshCommand('/usr/local/bin/jarvis -j -x "' . addcslashes($question, '"') . '"', 'jarvis');
 
-       $o=preg_replace('/[\x00-\x1F\x7F]/', '', $c['output']);
-       $j = json_decode(trim($o), true);
+    $o = preg_replace('/[\x00-\x1F\x7F]/', '', $c['output']);
+    $j = json_decode(trim($o), true);
 
-       if (!count($j)) {
-               return 'Désolé, il y a eu un problème !';
-       }
-       foreach ($j as $k => $v) {
-               if (isset($v['answer'])) {
-                       return $v['answer'];
-               }
-       }
+    if (!is_countable($j) || !count($j)) {
+        return 'Désolé, il y a eu un problème ! '.$c['output'];
+    }
+    foreach ($j as $k => $v) {
+        if (isset($v['answer'])) {
+            return $v['answer'];
+        }
+    }
     return 'Désolé, je crois qu\'il y a eu un affreux malentendu entre nous :(';
 }
\ No newline at end of file