47 lines
4.9 KiB
Plaintext
47 lines
4.9 KiB
Plaintext
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="generator" content="pandoc" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
<meta name="author" content="By Pedro Delfino" />
|
||
<title>No more filling out repetitive forms in Nyxt!</title>
|
||
<style type="text/css">
|
||
code{white-space: pre-wrap;}
|
||
span.smallcaps{font-variant: small-caps;}
|
||
span.underline{text-decoration: underline;}
|
||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||
</style>
|
||
<!--[if lt IE 9]>
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||
<![endif]-->
|
||
</head>
|
||
<body>
|
||
<header>
|
||
<h1 class="title">No more filling out repetitive forms in Nyxt!</h1>
|
||
<p class="author">By Pedro Delfino</p>
|
||
</header>
|
||
<h1 id="the-bureaucracies-of-the-web">The bureaucracies of the web</h1>
|
||
<p>We all know the feeling of filling forms. Sometimes, you just want to send an email to some company or buy something, but, first, there is a form to be filled.</p>
|
||
<blockquote>
|
||
<p>Bureaucracy is like fishing in places known to be without fish. – James Parkinson.</p>
|
||
</blockquote>
|
||
<p>Filling one form is a boring task but someone needs to bite the bullet. An unacceptably uncomfortable situation arises when you need to re-fill the same form multiple times or re-introduce exactly the same data into a different form. In order to prevent that suffering, Nyxt now has two new commands: <code>save-input-data</code> and <code>set-input-data-from-saved</code>.</p>
|
||
<h1 id="tutorial">Tutorial</h1>
|
||
<p>First, you fill a form for a single time. Before pressing the button to submit the data, you execute the command <code>save-input-data</code>. This creates a <code>.lisp</code> file just like the ones from bookmarks or annotations to record what was inserted. You may find the file in some directory similar to <code>~/.local/share/nyxt/inputs.lisp</code>. This file is supposed to be readable by computers and people :)</p>
|
||
<p>Now, execute <code>reload-current-buffer</code> to reload the web-page. As the same form appears as a blank slate, <strong>do not repeat yourself</strong>! Instead of re-typing the data, you can just execute the command <code>set-input-from-saved</code> and choose the appropriate option listed by the prompt-buffer.</p>
|
||
<p>An interesting point here is the possibility to re-use data from one web-page on another. It will work as long as the web page from the original source of data has the <strong>same computational structure</strong> as the recipient web-page.</p>
|
||
<p>For instance, Atlas Engineer has two different web-pages with forms. The first one is a <em>Contact</em> page oriented towards <a href="https://atlas.engineer/contact">Atlas</a> itself. The second web-page is a <em>Contact</em> page oriented towards <a href="https://nyxt.atlas.engineer/contact">Nyxt</a> which is the company's main product. Despite the different goals, both pages share forms with identical HTML structure.</p>
|
||
<p>Thus, it is possible to save data from <a href="https://atlas.engineer/contact">Atlas</a>'s web-page and then re-insert this data on <a href="https://nyxt.atlas.engineer/contact">Nyxt</a>'s web-page. Check-out the gif below showcasing the feature in action:</p>
|
||
<p><img src="../static/image/article/record-input-field-animation.png" /></p>
|
||
<h1 id="symmetry-is-beauty">Symmetry is beauty</h1>
|
||
<p>Finally, as you know, Nyxt already had command variations designed to use the domain being used in the current buffer (tab). The main example is the frequently used <code>switch-buffer</code>. If the user has multiple buffers (tabs) and wants to switch only to options under the same domain, they can execute <code>switch-buffer-domain</code>. It will work exactly as a <strong>subset</strong> of <code>switch-buffer</code>, filtering the options listed in the prompt-buffer.</p>
|
||
<p>Symmetrically, <code>set-input-data-from-saved</code> also has a command variation: <code>set-input-data-from-saved-domain</code>. Thus, only data saved from forms belonging to the same domain as the one on the current buffer will be shown. Stay tuned and may the power of Nyxt be with you!</p>
|
||
<blockquote>
|
||
<p><img src="../static/image/article/record-input-field-xkcd-bureaucracy.png" /></p>
|
||
<p>XKCD 970 <a href="https://xkcd.com/970/" class="uri">https://xkcd.com/970/</a></p>
|
||
</blockquote>
|
||
<p>P.S.: In case you did not get it, there is an Easter egg in the article. Since posting my phone number would be irresponsible, I used a reference to the popular song called <a href="https://en.wikipedia.org/wiki/867-5309/Jenny">Jenny</a> which was written by Alex Call and Jim Keller. The music was a big hit and as a consequence the number mentioned during it is one of the most well-known telephone numbers ever. The song was released in 1981, by that time, people actually knew by heart telephone numbers.</p>
|
||
</body>
|
||
</html>
|