about summary refs log tree commit diff stats
path: root/adapter
Commit message (Collapse)AuthorAgeFilesLines
* twtstr: misc refactoringsbptato2024-02-091-1/+1
| | | | | | * move out half width <-> full width converters * snake_case -> camelCase * improve toScreamingSnakeCase slicing
* md2html: add support for strikethroughbptato2024-02-051-1/+7
|
* md2html: improved underscore ignoring rulesbptato2024-02-011-2/+4
| | | | Only ignore when prev/next chars are not alnum.
* md2html: skip space after list item startbptato2024-02-011-2/+2
|
* md2html: detect lists starting with dashbptato2024-02-011-1/+1
|
* Add default md2html converterbptato2024-01-301-0/+380
|
* man: fix man -kbptato2024-01-271-20/+37
|
* Add mancha man page viewerbptato2024-01-262-0/+317
| | | | | | | | | | derived from w3mman2html.cgi, there are only a few minor differences: * different man page opener command * use man:, man-k:, man-l: instead of query string to specify action * no form input (C-lC-uman:pageC-m is faster anyway) TODO rewrite in Nim so we don't have to depend on Perl...
* Add urlenc, urldec; fix a URL encoding bug; improve trans.cgibptato2024-01-082-0/+47
| | | | | | | | | | * 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
* about: fix compilation error on Nim 1.14bptato2024-01-061-1/+4
|
* cha-finger: skip leading slash in pathbptato2024-01-031-1/+1
|
* Add spartan supportbptato2024-01-031-0/+47
| | | | why not
* Remove outdated readme in adapter/bptato2023-12-251-7/+0
| | | | the "long-term goal" is already achieved :)
* gmi2html: rewritebptato2023-12-222-241/+69
| | | | | | | | * Rewrite in Nim * This time, do not use a state machine (it was a very bad idea) * Do not emit <br> for every line; use CSS instead * Avoid double-newline caused by margins using CSS * Properly support list items
* gopher2html: do not use streamsbptato2023-12-211-4/+2
|
* file: remove symlink codebptato2023-12-211-19/+4
| | | | It was never reached anyway.
* file: do not use streamsbptato2023-12-211-23/+19
|
* Fix compilation on Nim 1.6.14bptato2023-12-165-5/+16
|
* about: actually error out on errorbptato2023-12-151-5/+8
|
* cha-finger: proper error message outputbptato2023-12-151-6/+12
|
* ftp: fix unnecessary slashes being added to path; move bindings/curlbptato2023-12-156-26/+461
| | | | also in ftp: clean up resources before exit
* file: complain about hostnamebptato2023-12-141-0/+5
| | | | fixes error on reloading stdin
* Various fixesbptato2023-12-135-37/+62
| | | | | | | * Makefile: fix parallel build, add new binaries to install target * twtstr: split out libunicode-related stuff to luwrap * config: quote default gopher2html URL env var for unquote * adapter/: get rid of types/url dependency, use CURL url in all cases
* http: use CURLU for URLsbptato2023-12-132-2/+23
|
* break up twtstr somewhatbptato2023-12-131-0/+1
| | | | | Avoid computing e.g. charwidth data for http which does not need it at all.
* Move http out of main binarybptato2023-12-1310-51/+255
| | | | | | | | | | | | 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
* Move gopher to adapter/bptato2023-12-123-15/+129
| | | | Also, move default urimethodmap config to res.
* Move out ftp: protocol; fix some local CGI bugsbptato2023-12-121-0/+193
|
* Move out file: protocol handling to adapter/bptato2023-12-121-0/+111
|
* adapter/: re-structurebptato2023-12-126-0/+0
|
* local CGI improvements, move data: to cgi-binbptato2023-12-121-0/+29
| | | | error codes are WIP, not final yet...
* twtstr: import functions from gopher2htmlbptato2023-12-121-17/+2
|
* cha-finger: use MAPPED_URI_*bptato2023-12-121-25/+15
| | | | | Much simpler & more efficient than the ugly regex parsing we used to have.
* local CGI: add mapped URI env vars; move about: to adaptersbptato2023-12-121-0/+14
| | | | | | | | | | | | | | | * 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)
* Add support for gemini by default, update readmebptato2023-12-103-0/+936
| | | | | No need to leave gemini support in the bonus folder. Still TODO: proxy support.
* Separate gopher conversion from main binarybptato2023-12-101-0/+149
| | | | | | | | | | | | | | | | | | | | | Now we use a (much simplified) gopher2html binary in libexec, instead of converting gopher directories to HTML in loader/gopher. This has two advantages: * Less ugly conversion logic in the loader module; we can just convert the file line by line. (The previous converter also had some correctness issues, that is fixed now as well.) * If the user desires, they can replace the gopher converter with another binary using the mailcap mechanism. The disadvantages are: * For now, source display is broken. This is a problem with all mailcap filters in general, and should be fixed in the future. (That said, the previous version also only displayed the converted HTML source, which was not really useful anyway.) * The proper directory structure is required for this to work; OTOH plenty of work has been done so that this is as frictionless as possible, so it should not really be a problem.
* Enable finger protocol by defaultbptato2023-12-101-0/+49
* Add a default urimethodmap that points finger: to cha-finger * Install cha-finger to /usr/local/libexec/cha/cgi-bin by default * cha-finger: use ALL_PROXY if given, die if curl is not installed