about summary refs log tree commit diff stats
path: root/doc/localcgi.md
Commit message (Collapse)AuthorAgeFilesLines
* config: clean up redundant CHA_DIR, update CGI docsbptato2024-12-291-23/+3
| | | | | "No CGI dir configured" is no longer a common case, so it's OK to just return "CGI file not found".
* CHA_CONFIG_DIR -> CHA_DIRbptato2024-12-271-1/+1
| | | | | | | It isn't really limited to config. It just happens to be in XDG_CONFIG_HOME because XDG basedirs suck. (W3M_DIR works similarly.)
* config: refactor, accept more possible config dirsbptato2024-10-281-1/+3
| | | | | | | | | | | | | | | | | | | | | I'm starting to favor dotfiles over XDG basedirs, but there's no reason why we couldn't have both. So now the search path is: 0. if config was set through -C, use that 1. $CHA_CONFIG_DIR is set -> $CHA_CONFIG_DIR/config.toml 2. $XDG_CONFIG_HOME is set -> $XDG_CONFIG_HOME/chawan/config.toml 3. ~/.config/chawan/config.toml exists -> use that 4. ~/.chawan/config.toml exists -> use that Notably, this makes it so the default directory is ~/.chawan *if* you don't have an existing config.toml file. So in that case known_hosts will be placed in ~/.chawan/known_hosts. However, configurations with a config in ~/.config/chawan/config.toml continue to work as expected, as for those the known_hosts file remains inside ~/.config/chawan/. Finally, I've added a default user CGI directory to reduce friction in setting CGI up. (Like known_hosts, it's also relative to whatever config dir you have.)
* gmifetch: rewrite in Nimbptato2024-10-121-0/+2
| | | | | | | | | | This finally makes it possible to use socks5 for Gemini. Also slightly refactored the config, to make it easier to pass on the config dir. By the way, the known_hosts file is now stored in the config dir too. The adapter will try to move it to there from the old location.
* loader: clean up connecterrorbptato2024-09-281-9/+10
| | | | | | * allow string values for public errors * remove unused errors * update naming
* Fix typobptato2024-03-041-1/+1
|
* Update docsbptato2024-02-141-10/+19
|
* Re-design word handling, add e, E, W, B, etc.bptato2024-01-191-1/+1
| | | | | | | | | | | | * Add functions for moving to the beginning/end of words (vi `b', `e'). * As it turns out, there are many possible interpretations of what a word is. Now we have a function for each reasonable interpretation, and the default settings match those of vi (and w3m in w3m.toml). (Exception: it's still broken on line boundaries... TODO) * Remove `bounds` from lineedit, it was horrible API design and mostly useless. In the future, an API similar to what pager now has could be added. * Update docs, and fix some spacing issues with symbols in the tables.
* Add urlenc, urldec; fix a URL encoding bug; improve trans.cgibptato2024-01-081-0/+15
| | | | | | | | | | * Fix incorrect internal definition of the fragment percent-encode set * urlenc, urldec: these are simple utility programs mainly for use with shell local CGI scripts. (Sadly the printf + xargs solution is not portable.) * Pass libexec directory as an env var to local CGI scripts * Update trans.cgi to use urldec and add an example for combining it with selections
* cgi: return ConnectionError when script is not executablebptato2023-12-211-5/+5
|
* Update doc/localcgibptato2023-12-141-3/+4
| | | | | multipart through local CGI is now supported as well. (also, fix Cha-Control description inaccuracy)
* Move http out of main binarybptato2023-12-131-5/+28
| | | | | | | | | | | | Now it is (technically) no longer mandatory to link to libcurl. Also, Chawan is at last completely protocol and network backend agnostic :) * Implement multipart requests in local CGI * Implement simultaneous download of CGI data * Add REQUEST_HEADERS env var with all headers * cssparser: add a missing check in consumeEscape
* local CGI improvements, move data: to cgi-binbptato2023-12-121-2/+41
| | | | error codes are WIP, not final yet...
* local CGI: add mapped URI env vars; move about: to adaptersbptato2023-12-121-0/+27
| | | | | | | | | | | | | | | * Add MAPPED_URI_* as environment variables when a request is coming from urimethodmap It costs us compatibility with w3m, but it seems to be a massive improvement over smuggling in the URL as a query string and then writing an ad-hoc parser for every single urimethodmap script. The variables are set for every urimethodmap request, to avoid accidental leaking of global environment variables. * Move about: to adapters (an obvious improvement over the previous solution)
* doc/localcgi: reword/clarifybptato2023-12-111-1/+5
|
* Add w3m-cgi-compat optionbptato2023-10-011-2/+17
|
* loader: add local-cgibptato2023-09-301-0/+111
Add w3m-style local CGI support. It is not quite as powerful as w3m's local CGI, because it lacks an equivalent to W3m-control. Not sure if it's worth adding; we certainly shouldn't allow passing JS in headers, but a custom language for headers does not sound like a great idea either... eh, idk. also, TODO add multipart