pasteque/paste/templates/paste/index.html

30 lines
1.1 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}{% load filters %}
{% load i18n %}
{% load compress %}
{% block title %}{% trans 'Paste something' %}{% endblock %}
{% block content %}
<h1>Paf'Py</h1>
Et Paf.
Ce « pastebin-like » ne peut être utilisé qu'en ligne de commande, soit avec <tt>curl</tt> :
<div class="highlight"><pre><span></span>curl {{ request.build_absolute_uri }} <span class="o">-F</span>python<span class="o">=</span>@hello.py
</pre></div>
<p>Le nom, entre <tt>-F</tt> et <tt>=</tt> sert à choisir la coloration syntaxique.</p>
<p>Le mieux est de l'utiliser avec une fonction <tt>bash</tt> :</p>
<div class="highlight"><pre><span></span>pafpy<span class="o">()</span>
<span class="o">{</span>
curl {{request.build_absolute_uri}} -F<span class="s2">&quot;</span><span class="si">${</span><span class="nv">1</span><span class="p">##*.</span><span class="si">}</span><span class="s2">=@</span><span class="nv">$1</span><span class="s2">&quot;</span>
<span class="o">}</span>
</pre></div>
Demo :
<div class="highlight"><pre><span></span>$ pafpy test.py
{{request.build_absolute_uri}}D91F1CA
</pre></div>
{% endblock %}