| 1 |
<!-- |
| 2 |
Copyright (C) 2025 Alexander Vanhee |
| 3 |
|
| 4 |
This program is free software: you can redistribute it and/or modify |
| 5 |
it under the terms of the GNU General Public License as published by |
| 6 |
the Free Software Foundation, either version 3 of the License, or |
| 7 |
(at your option) any later version. |
| 8 |
|
| 9 |
This program is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
GNU General Public License for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public License |
| 15 |
along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 16 |
|
| 17 |
SPDX-License-Identifier: GPL-3.0-or-later |
| 18 |
--> |
| 19 |
|
| 20 |
<!DOCTYPE html> |
| 21 |
<html lang="en"> |
| 22 |
|
| 23 |
<head> |
| 24 |
<meta charset="UTF-8"> |
| 25 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 26 |
<meta name="description" content="Learn how to upload images using Gradia's predefined or custom upload providers, with step-by-step setup instructions."> |
| 27 |
|
| 28 |
<title>Providers</title> |
| 29 |
|
| 30 |
<link rel="icon" href="assets/favicons/favicon.ico" type="image/x-icon"> |
| 31 |
|
| 32 |
<link rel="preconnect" href="https://rsms.me/"> |
| 33 |
<link rel="stylesheet" href="https://rsms.me/inter/inter.css"> |
| 34 |
<link rel="stylesheet" href="assets/styles/providers.css"> |
| 35 |
</head> |
| 36 |
|
| 37 |
<body> |
| 38 |
<div class="container"> |
| 39 |
<!-- Header --> |
| 40 |
<header> |
| 41 |
<div class="logo"> |
| 42 |
<img src="assets/images/logo.svg" alt="Gradia Logo" class="logo-image"> |
| 43 |
<span>Gradia</span> |
| 44 |
</div> |
| 45 |
|
| 46 |
<h1 class="title">Providers</h1> |
| 47 |
<p class="subtitle">Quickly upload an edited image to your favorite providers</p> |
| 48 |
<p style="padding-top: 1rem;"> |
| 49 |
Instead of only giving the option of one provider, Gradia allows you to either select one of the predefined ones or <strong>create your own</strong>. |
| 50 |
|
| 51 |
This page explains the basic idea behind this system, provides some explanation for popular providers, |
| 52 |
and includes information on how to craft commands for your own setup. |
| 53 |
</p> |
| 54 |
</header> |
| 55 |
|
| 56 |
<!-- Introduction --> |
| 57 |
<section class="card how-it-works"> |
| 58 |
<h2 class="section-title">How it works</h2> |
| 59 |
<p class="description"> |
| 60 |
All providers are just a <strong>bash command</strong> behind the scene. Including all the predefined ones, |
| 61 |
this makes it easy to add new options in the future and allows you to create custom ones as well. |
| 62 |
</br> |
| 63 |
The command simply receives the image path as <code class="inline-code">$1</code> and |
| 64 |
outputs the final URL to stdout.</p> |
| 65 |
|
| 66 |
<div style="margin-top: 1rem; margin-bottom: 1rem;"> |
| 67 |
<strong class="example-label">Example:</strong> |
| 68 |
<pre class="code-block"><code>curl -F "file=@$1" https://api.service.com/upload | jq -r '.url'</code></pre> |
| 69 |
</div> |
| 70 |
|
| 71 |
<p><strong>Note:</strong> Not all commands or functions are available in the Flatpak or the Snap by default. You may need to modify |
| 72 |
permissions. For Flatpak, this can be done via <a href="https://flathub.org/apps/com.github.tchx84.Flatseal"><strong>Flatseal</strong></a>. |
| 73 |
</p> |
| 74 |
</section> |
| 75 |
|
| 76 |
<!-- Setup --> |
| 77 |
<section class=" setup-section"> |
| 78 |
<h2 class="section-title">Basic Setup</h2> |
| 79 |
<ol class="setup-steps card"> |
| 80 |
<li class="setup-step"> |
| 81 |
<span class="step-number">1</span> |
| 82 |
<div class="step-content"> |
| 83 |
<strong class="step-title">Press the <strong>Select</strong> button in the "Image Upload Providers" section.</strong> |
| 84 |
<span class="step-description">or craft a custom command</span> |
| 85 |
</div> |
| 86 |
</li> |
| 87 |
<li class="setup-step "> |
| 88 |
<span class="step-number">2</span> |
| 89 |
<div class="step-content"> |
| 90 |
<strong class="step-title">Choose one of the predefined providers from the list</strong> |
| 91 |
<span class="step-description">or pick "<strong>Custom Provider</strong>"</span> |
| 92 |
</div> |
| 93 |
</li> |
| 94 |
<li class="setup-step"> |
| 95 |
<span class="step-number">3</span> |
| 96 |
<div class="step-content"> |
| 97 |
<strong class="step-title">Review your option</strong> |
| 98 |
<span class="step-description">make sure the option fits your needs.</span> |
| 99 |
</div> |
| 100 |
</li> |
| 101 |
<li class="setup-step"> |
| 102 |
<span class="step-number">4</span> |
| 103 |
<div class="step-content"> |
| 104 |
<strong class="step-title">Test it out</strong> |
| 105 |
<span class="step-description">via the new button next to <strong>Save & Copy</strong></span> |
| 106 |
</div> |
| 107 |
</li> |
| 108 |
</ol> |
| 109 |
</section> |
| 110 |
</div> |
| 111 |
<script> |
| 112 |
function copy(btn) { |
| 113 |
const code = btn.parentElement.querySelector('code').textContent; |
| 114 |
navigator.clipboard.writeText(code).then(() => { |
| 115 |
btn.textContent = 'Copied!'; |
| 116 |
btn.classList.add('copied'); |
| 117 |
setTimeout(() => { |
| 118 |
btn.textContent = 'Copy'; |
| 119 |
btn.classList.remove('copied'); |
| 120 |
}, 2000); |
| 121 |
}); |
| 122 |
} |
| 123 |
</script> |
| 124 |
</body> |
| 125 |
|
| 126 |
</html> |