back

pub / serci

Search the web with !keywords
git clone https://https://src.jayvii.de/pub/serci.git
Home | Log | Files | Exports | Refs | README | RSS

Activity: Jul, 2024 - Nov, 2024

Less More

serĉi

Search the web with !keywords.

Please send patches or remarks to jayvii+serci[AT]posteo[DOT]de.

FAQs

What does serĉi mean?

It is the Esperanto term for “to search”.

What are !keywords?

An idea lent from the search Engine DuckDuckGo, which has been utilized by many others since. They call their keywords bangs, but it is the same concept and usability:

bangs are shortcuts that quickly take you to search results on other sites. For example, when you know you want to search on another site like Wikipedia or Amazon, our bangs get you there fastest. A search for !w filter bubble will take you directly to Wikipedia.

Remember, though, because your search is actually taking place on that other site, you are subject to that site’s policies, including its data collection practices.

We’ve had bangs since 2008 as part of our geek roots. Now we have thousands of !bangs and you can even submit your own.

serĉi implements keywords for all kinds of search engine and transparently redirects you right to them. The default set of search engine and fall-backs is geared towards privacy and data minimalism. However, you can simply host serĉi yourself any time and configure your own favorite search engines and !keywords.

If you think there are !keywords that other people would benefit from, feel free to contribute!

How can I use serĉi?

Hosting

Simply upload the entire content of this repository to your webhost. Edit opensearch.xml accordingly. If the domain you want to run serĉi under is search.example.com, you can simply run:

sed -e 's/%%URL%%/http:\/\/search.example.com/g' -i opensearch.xml

Search-Engines and !keywords are configured in config/config.php. For fast access to !keywords and categories, seriĉi uses mappings written to json files. Before first run, you need to generate them from your config via lib/generate_mappings.php. This needs to be re-run everytime you adjust your config/config.php.

php lib/generate_mappings.php

Speed-Deployment:

DOMAIN="search.example.com"
mkdir -p /var/www/serci && \
cd /var/www/serci && \
wget https://src.jayvii.de/pub/serci/exports/main.tar.gz -O - | \
tar xfvz - && \
sed -e "s/%%URL%%/https:\/\/${DOMAIN}/g" -i opensearch.xml && \
php lib/generate_mappings.php

Example-configuration for Apache2:

<VirtualHost *:80>
# server name and directory
ServerAdmin webmaster[AT]example[DOT]com
ServerName search.example.com
DocumentRoot /var/www/serci

# log- and error files
ErrorLog ${APACHE_LOG_DIR}/search.example.com_error.log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" custom
CustomLog ${APACHE_LOG_DIR}/search.example.com.log custom

# do not allow file browsing
Options -Indexes

</VirtualHost>

Testing

There are test scripts in place to test the validity of your configuration. Tests may be conducted to check:

  1. Whether all categories assigned to search engines are defined themselves
  2. Whether all defined categories have at least one search engine assigned to them
  3. Whether all keywords are unique, i.e. no keyword is assigned to multiple search engines
php tests/categories.php
php tests/keywords.php

License

serĉi is under the AGPL-3.0 license. It is REUSE compliant!

Icons are licensed under CC-BY-SA-4.0.

Other bundled assets are:


Clone this repository via:
git clone https://https://src.jayvii.de/pub/serci.git