httpindex(1)

✨ httpindex β€” the manual page bestie πŸ’–

okay so this is httpindex(1), from the General Commands Manual section, and honestly? she's a whole vibe. let's get into it 🫢


🌸 NAME 🌸

httpindex β€” the HTTP front-end for the SWISH++ indexer. she's the girl in the group chat who goes out and grabs stuff from the internet so the indexer can do her thing. no cap. πŸ’…


🌈 SYNOPSIS 🌈

wget [ options ] URL...  2>&1 | httpindex [ options ]

like. that's the whole pipeline. wget does the fetching, httpindex does the indexing. it's giving collaboration. it's giving duo. ✨


πŸ’œ DESCRIPTION πŸ’œ

so httpindex is a front-end for index++(1), and her whole job is indexing files that you copied off remote servers using wget(1). the files come over in a copy of the remote directory structure (yes, the whole tree, iconic), and after indexing you've got choices bestie β€” you can keep them, delete them, or replace them with their descriptions. pick your fighter. πŸŽ€


✨ OPTIONS ✨

πŸ¦‹ wget Options πŸ¦‹

the wget(1) options that are required are: -A, -nv, -r, and -x. non-negotiable. mandatory. the moment. πŸ”₯

the ones that are highly recommended are: -l, -nh, -t, and -w. you can skip these but like... why would you. (See the EXAMPLE, bestie, it's right there. πŸ‘€)

🌟 httpindex Options 🌟

httpindex accepts the same short options as index++(1) β€” EXCEPT for -H, -I, -l, -r, -S, and -V. those six are not invited to this party. πŸ™ˆ

the following options are unique to httpindex:

  • -d β€” replace the text of local copies of retrieved files with their descriptions after they've been indexed. this is so useful for showing file descriptions in search results without needing complete copies of the remote files, which saves you filesystem space (your disk said thank you 🫢). (See the extract_description() function in WWW(3) for the deets on how descriptions get extracted. iykyk.)
  • -D β€” delete the local copies of retrieved files after they've been indexed. this stops your local filesystem from filling all the way up with copies of remote files. she's a clean girl. she's minimal. πŸ’…

πŸ“ EXAMPLE πŸ“

say you wanna index all the HTML and text files on a remote web server while keeping the descriptions locally. say less:

wget -A html,txt -linf -t2 -rxnv -nh -w2 http://www.foo.com 2>&1 |
httpindex -d -e'html:*.html,text:*.txt'
heads up bestie β€” you need to redirect wget(1)'s output from standard error to standard output so you can pipe it into httpindex. that 2>&1 is not decorative. it's load-bearing. 😭

πŸ’€ EXIT STATUS πŸ’€

exits with a value of zero only if indexing completed successfully. otherwise it's non-zero. simple as that. no notes. ✨


πŸŽ€ CAVEATS πŸŽ€

on top of all the caveats that come with index++(1) (yes, she has her own baggage), httpindex does NOT correctly handle using multiple -e, -E, -m, or -M options. why? because the Perl script uses the standard GetOpt::Std package for processing command-line options, and that package doesn't handle it. so the last one of any of those options ``wins.'' periodt. πŸ‘‘

the work-around? use multiple values for those options separated by commas in a single one of those options. so if you wanna do this:

httpindex -e'html:*.html' -e'text:*.txt'

do this instead:

httpindex -e'html:*.html,text:*.txt'

same energy, fewer problems. you're welcome. πŸ’–


🌈 SEE ALSO 🌈

index++(1), wget(1), WWW(3)


πŸ‘‘ AUTHOR πŸ‘‘

Paul J. Lucas <pauljlucas@mac.com>


and that's the whole page, bestie 🧚 β€” brought to you by SWISH++, dated August 2, 2005. yeah she's vintage but she ATE and she's still serving. go index something. slay. πŸ’…βœ¨

πŸ“¦ where this page comes from