💾 Archived View for circumlunar.thebackupbox.net › ~epoch › blog › text_form captured on 2024-12-17 at 10:28:33. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

a text/form spec?

I didn't know w3 XForms existed, but ofc it is 10 seconds long measured by holding page-down on my keyboard.

XForms

but I also found out about:

xforms-toolkit (unrelated)

how I found out about these two things. thanks, theruran.

I guess content-type would be:

text/form

need a way to have a list of inputs.

each input should have a type associated with it

a name that is mainly for machine use

a description that is only for human use

maybe a label? description and label might be similar enough to merge.

inputs

input:

type:

text

name:

user

label:

username

desc:

your username on thebackupbox.net

input:

type:

password

name:

pass

label:

password

desc:

the password that goes with your user on thebackupbox.net

input types

uh..

I dunno. there's probably something that has a good list that has thought about this more than I have.

looking into semantic web stuff atm...

action

each form needs an action URI...

form:

action:

http://thebackupbox.net/cgi-bin/fmrl-client.cgi

input:

type:

text

name:

user

label:

fmrl user

description:

the fmrl user of which you wish to view updates

default action is to just launch the action URL with the inputs appended in the usual way in a query_string

name=value pairs separated by &s or ;s for multiple inputs.

"method"

this /might/ need a method attribute for the form.

maybe http:POST would be good for what the value of this attribute would look like?

the two main types would be:

maybe there should be methods that manipulate the URL in other ways.

like something for appending the input to the path?

like, ftp might do put.. http doing POST or PUT..

sftp doing put as well.

as with HTML forms, file inputs probably shouldn't get included as parts of the query-string-generator method.

format

I guess it /could/ be done as json if each input was part of an array so the order was retained.

like:

{ "form": {
    "action" : "https://thebackupbox.net/cgi-bin/login.cgi",
    "method" : "http:POST",
    "input" [
      {
        "type": "text",
        "name": "user",
        "label": "user",
        "description": "long string"
      },
      { "type": "password",
        "name": "pass",
        "label": "I dunno.",
        "description": "just an example"
      }
    ]
  }
}

or...

<xml>
  <form action="https://thebackupbox.net/cgi-bin/login.cgi" method="http:POST">
    <input type="text" name="user" label="user" description="long string" />
    <input type="password" name="pass" label="I dunno"." description="just an example" />
  </form>
</xml>

I guess if I'm going to do XML-based I'll write a DTD for it...

could also be in yaml? which I guess would be the examples I did up there.

or maybe toml

https://en.wikipedia.org/wiki/Recfiles

rec file would work too.

...

I've worked my way to RDF and Turtle and N-Triples.

help.

I'm trapped in semantics.

conclusion

so far this is just taking pretty much HTML forms and stripping the HTML off.

I figure the actions should be influenced on what curl does.

it does a lot

comments:

mailto:epoch@thebackupbox.net

talk:epoch@thebackupbox.net

ircs://irc.thebackupbox.net:6697/%23default

ircs://irc.tilde.chat:6697/epoch,isnick