em_filter
- Library for registering Emergence filters.
Authors: Steve Roques.
em_filter
- Library for registering Emergence filters
filter_url() = string()
port_number() = 1..65535
clean_text/3 | |
decode_hex_entities/1 | |
decode_html_entities/1 | |
decode_named_entities/1 | |
decode_numeric_entities/1 | |
ensure_binary/1 | |
extract_attribute/2 | |
extract_elements/2 | |
find_port/0 | Finds an available TCP port for the filter service. |
get_filter_port/1 | Gets the port number for a running filter. |
get_text/1 | |
parse_string/1 | |
register_filter/1 | Registers a filter with the discovery service. |
resolve_named_entity/1 | |
safe_binary_replace/3 | |
should_skip_link/2 | |
start_filter/2 | Starts a filter service with the given name and handler module. |
stop_filter/1 | Stops a running filter service. |
clean_text(DescText0, IconText0, DtText0) -> any()
decode_hex_entities(Text) -> any()
decode_html_entities(Text) -> any()
decode_named_entities(Text) -> any()
decode_numeric_entities(Text) -> any()
ensure_binary(Text) -> any()
extract_attribute(Element, Attribute) -> any()
extract_elements(Html, Selector) -> any()
find_port() -> {ok, port_number()} | {error, no_ports_available}
returns: {ok, Port} if an available port is found, or {error, no_ports_available} if no port is available
Finds an available TCP port for the filter service. Searches for a free port in the range 8081-9000.
get_filter_port(FilterName::atom()) -> {ok, port_number()} | {error, not_found}
FilterName
: Name of the filter
returns: {ok, Port} if filter is running, or {error, not_found} if filter is not running
Gets the port number for a running filter.
get_text(Element) -> any()
parse_string(Html) -> any()
register_filter(FilterUrl::filter_url()) -> {ok, registered} | {error, term()}
FilterUrl
: URL of the filter service to register
returns: {ok, registered} if registration is successful, or {error, Reason} if registration fails
Registers a filter with the discovery service.
This function sends an HTTP POST request to the discovery service with the filter information in JSON format.resolve_named_entity(X1) -> any()
safe_binary_replace(Subject, Pattern, Replacement) -> any()
should_skip_link(Link, ExcludedContent) -> any()
start_filter(FilterName::atom(), HandlerModule::module()) -> {ok, pid()} | {error, term()}
FilterName
: Name of the filter (atom)
HandlerModule
: Module to handle requests (module)
returns: {ok, Pid} if startup is successful, or {error, Reason} if startup fails
Starts a filter service with the given name and handler module.
stop_filter(FilterName::atom()) -> ok | {error, not_running}
FilterName
: Name of the filter to stop (atom)
returns: ok if stopped successfully, or {error, not_running} if filter is not running
Stops a running filter service.
Generated by EDoc