<div dir="ltr"><div><div><div>Hi,<br></div>I'm trying to create a kate snippet that depends on external data to automate some of my tasks at work. Is there any way to achieve this?<br></div>I'm flexible wrt how the data is provided (eg. as website (ideal), via a file on <a href="http://localhost/">http://localhost/</a> or anywhere in the local file system).<br></div>I've found <br><div class="gmail-variablelist"><dl class="gmail-variablelist"><dt><span class="gmail-term"><pre class="gmail-synopsis">String read(<span class="gmail-parameter"><em class="gmail-parameter"><code>String <span class="gmail-replaceable"><em class="gmail-replaceable"><code>file</code></em></span></code></em></span>);
</pre></span></dt><dd><p>
Will search the given <span class="gmail-replaceable"><em class="gmail-replaceable"><code>file</code></em></span> relative to the <code class="gmail-literal">katepart/script/files</code> directory and return its content as a string.
</p></dd></dl><p>on <a href="https://docs.kde.org/stable5/en/applications/katepart/dev-scripting.html">https://docs.kde.org/stable5/en/applications/katepart/dev-scripting.html</a> but it seems to be restricted (worked for eg. read('quickcoding/cpp/c.template') or read('../commands/emmet.js'); but not much further up and didn't work for a file I created in <code class="gmail-literal">katepart/script/files</code> for testing purposes.<br></p></div><div><div><div><div>Any hints are welcome.</div><div>Thx, g<br></div><div><br>-- <br><div class="gmail_signature">Gerald Senarclens de Grancy<br><a href="http://senarclens.eu/~gerald/" target="_blank">http://senarclens.eu/~gerald/</a><br>Open minds on open source!</div>
</div></div></div></div></div>