|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge" />
|
|
|
|
<title>Config | Pastey</title>
|
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" />
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" />
|
|
|
|
<link rel="stylesheet" href="/static/css/mdb.min.css" />
|
|
|
|
<link rel="stylesheet" href="/static/css/style.css" />
|
|
|
|
<link rel="stylesheet" href="/static/themes/{{ active_theme }}.css" />
|
|
|
|
|
|
|
|
<link rel="icon" type="image/x-icon" href="/static/img/favicon.ico"/>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<!-- Navbar -->
|
|
|
|
<nav class="navbar navbar-expand-lg fixed-top bg-white pastey-navbar">
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
<!-- Toggle button -->
|
|
|
|
<button
|
|
|
|
class="navbar-toggler"
|
|
|
|
type="button"
|
|
|
|
data-mdb-toggle="collapse"
|
|
|
|
data-mdb-target="#pasteyNavbarContainer"
|
|
|
|
aria-controls="pasteyNavbarContainer"
|
|
|
|
aria-expanded="false"
|
|
|
|
aria-label="Toggle navigation"
|
|
|
|
>
|
|
|
|
<i class="fas fa-bars pastey-navbar-toggler"></i>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Navbar logo -->
|
|
|
|
<a class="navbar-brand" href="/">
|
|
|
|
<div class="pastey-logo" style="margin-top: -3px;"></div>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<div class="collapse navbar-collapse" id="pasteyNavbarContainer">
|
|
|
|
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
|
|
<li class="nav-item active">
|
|
|
|
<a class="nav-link pastey-link" href="/">Home</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link pastey-link" href="/new">New Paste</a>
|
|
|
|
</li>
|
|
|
|
{% if whitelisted %}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link pastey-link" aria-current="page" href="/config">Config</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a
|
|
|
|
class="nav-link dropdown-toggle pastey-link"
|
|
|
|
href="#"
|
|
|
|
id="theme"
|
|
|
|
role="button"
|
|
|
|
data-mdb-toggle="dropdown"
|
|
|
|
aria-expanded="false"
|
|
|
|
>
|
|
|
|
Theme
|
|
|
|
</a>
|
|
|
|
<!-- Theme dropdown -->
|
|
|
|
<ul class="dropdown-menu pastey-dropdown" aria-labelledby="navbarDropdown">
|
|
|
|
{% for theme in themes %}
|
|
|
|
<li><a class="dropdown-item pastey-dropdown-item" href="#" onclick="setTheme('{{ theme }}');">{{ theme }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
<li><hr class="dropdown-divider" /></li>
|
|
|
|
<li>
|
|
|
|
<a class="dropdown-item" href="#" onclick="resetTheme();">Reset Theme</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<ul class="navbar-nav d-flex flex-row">
|
|
|
|
<li class="nav-item me-3 me-lg-0">
|
|
|
|
<a class="nav-link pastey-link" href="https://github.com/Cesura/pastey" rel="nofollow" target="_blank">
|
|
|
|
<i class="fab fa-github"></i>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<!-- Navbar -->
|
|
|
|
|
|
|
|
<!-- Jumbotron -->
|
|
|
|
<div id="intro" class="p-5 text-center pastey-header">
|
|
|
|
<h1 class="mb-3 h2">Config</h1>
|
|
|
|
</div>
|
|
|
|
<!-- Jumbotron -->
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<!--Main layout-->
|
|
|
|
<main class="my-5">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">Option</th>
|
|
|
|
<th scope="col">Value</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for key, value in config_items.items() %}
|
|
|
|
<tr>
|
|
|
|
<th scope="row">{{ key}}</th>
|
|
|
|
<td>{{ value }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div><br />
|
|
|
|
|
|
|
|
<div class="row text-center">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h1 class="mb-3 h4">Download Script</h1>
|
|
|
|
<p>Pastey provides a script that can be used to paste output directly from the command line:</p>
|
|
|
|
<pre>$ pastey -f /var/log/nginx.log</pre>
|
|
|
|
<pre>$ echo "Hello, Pastey!" | pastey -c -</pre>
|
|
|
|
<p style="font-weight:bold;">Download the following, make it executable, and put it in your system PATH to be used anywhere!</p>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Help button -->
|
|
|
|
<br />
|
|
|
|
<a
|
|
|
|
class="btn btn-primary"
|
|
|
|
data-mdb-toggle="collapse"
|
|
|
|
href="#script-help"
|
|
|
|
role="button"
|
|
|
|
aria-expanded="false"
|
|
|
|
aria-controls="script-help"
|
|
|
|
>
|
|
|
|
<i class="fas fa-info"></i> Show script usage
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="collapse mt-3" style="text-align: left !important; margin-left:25%;" id="script-help">
|
|
|
|
<br /><pre>Usage: pastey [-h] [-e] [-f INFILE] [-s] [-t title] [-x time_hrs] [-- command]
|
|
|
|
|
|
|
|
CLI interface to pastey.
|
|
|
|
|
|
|
|
Available options:
|
|
|
|
|
|
|
|
-h, --help Print this help and exit
|
|
|
|
-e, --encrypt Encrypt the paste content
|
|
|
|
-f, --file Read the content from this file.
|
|
|
|
-s, --single Create a paste that expires after the first view
|
|
|
|
-t, --title Set the title of the paste
|
|
|
|
-x, --expiration
|
|
|
|
Set the time in hours after which the paste expires
|
|
|
|
(Default is expiration is disabled)
|
|
|
|
|
|
|
|
-- Stop further option parsing
|
|
|
|
Arguments passed after the -- option are evaluated
|
|
|
|
as a command, and that command's output is pasted.
|
|
|
|
The full command is used as the title.
|
|
|
|
|
|
|
|
If zero arguments are passed,
|
|
|
|
or none of --file or -- are passed,
|
|
|
|
content is read from stdin.</pre>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><br /><br />
|
|
|
|
|
|
|
|
<div class="row justify-content-md-center">
|
|
|
|
<div class="col-md-4">
|
|
|
|
<input class="form-control pastey-input pastey-view-url" id="paste-url" type="text" value="{{ script_url }}" readonly />
|
|
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
|
|
<a href="{{ script_url }}">
|
|
|
|
<button type="button" class="btn btn-success text-nowrap"><i class="fas fa-download"></i> Download</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div><br /><br />
|
|
|
|
|
|
|
|
<div class="row text-center">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<h1 class="mb-3 h4">JSON</h1>
|
|
|
|
<p>You can also send a properly-formatted json POST request to <span style="font-weight:bold;">/json</span>:</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row justify-content-md-center">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<pre>{
|
|
|
|
"content": "This is a paste",
|
|
|
|
"title": "Interesting title",
|
|
|
|
"expiration": -1,
|
|
|
|
"encrypt": true,
|
|
|
|
"single": false
|
|
|
|
}</pre>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row text-center">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<p>Note that <span style="font-weight:bold;">expiration</span> is some value in hours, and that -1 = no expiration date.
|
|
|
|
Only the <span style="font-weight:bold;">content</span> field is mandatory.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<!--Main layout-->
|
|
|
|
|
|
|
|
<!--JS-->
|
|
|
|
<script type="text/javascript" src="/static/js/mdb.min.js"></script>
|
|
|
|
<script type="text/javascript" src="/static/js/common.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|