GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FAUP(1) FreeBSD General Commands Manual FAUP(1)

faup
Finally An Url Parser!

faup [-ablptu] [-d delim] [-f scheme | credential | subdomain | domain | domain_without_tld | host | tld | port | resource_path | query_string | fragment] [-m module1 module2 ...] [-o csv | json | module] [-r count] [-w ip:port] ⟨url | file

Everytime faup is called with an url or a file containing a list of URLs, it will split the various parts of it.

faup is designed to be really fast to do that operation, much faster than a regex, and give you much more features. The problem is harder than what it first appears. If you want to get fields like subdomains from an URL, you will need to extract the TLD properly. And since extracting the TLD properly is impossible with a regex, you will be stuck.

The following options are available:

skip provided argument file open check
Run the webserver in background
delim
Use delim as the field delimiter character instead of the comma character.
field
Extract only the wanted field which can be one of the following: scheme, credential, subdomain, domain, domain_without_tld, host, tld, port, resource_path, query_string, fragment
Prefix each line with the line number. Works only if the output is CSV.
module1 module2 ..
Load the modules in the wanted order. If the list is empty, faup will run without any module.
format
Output in the wanted format which can be one of the following: csv, json, module
print the header (applies to CSV only)
count
Remove the count number of characters from the end. Useful to remove the dot in DNS urls given.
do not extract TLD > 1 (eg. only get 'uk' instead of 'co.uk')
Update the TLD suffix list
ip:port
Start faup in webserver mode

The faup utility exits 0 on success, and >0 if an error occurs.

Extract the TLD from slashdot.org:

faup -f tld www.slashdot.org

Run faup in webserver mode in background:

faup -b -w 0.0.0.0:9876

List all the available modules:

faup $ modules list all

Enable the uppercase lua module:

faup $ modules enable uppercase.lua

Output the wanted url in json

faup -o json http://www.example.co.uk:1234/foo.html#bar

The following environment variable affects the exectution of faup :
If the environment variable FAUP_DATA_DIR is set, tell faup where to find its datadir, to get modules or the tld prefix list ('mozilla.tlds')

August 5, 2014 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.