Giter Club home page Giter Club logo

encyclopedia.marginalia.nu's Introduction

This is a desktop-first low-distraction wikipedia mirror. The code isn't super actively maintained and won't win any beauty pageants, but it's an interesting project I'm sharing the sources for posterity.

The system requires JDK20.

Build

To build the code, run the following command

$ ./gradlew assemble distTar

The output will be build/distributions/encyclopedia-1.0-SNAPSHOT.tar.
Unpack it somewhere.

Initial set-up

To create an articles database, download an appropriate Wikipedia Zim File, en_all_nopic is a good choice for production, en_100 for testing.

Before serving the data, the zim file needs to be converted into a SQLite database. Convert the file to an articles database articles.db by running the command below

$ encyclopedia-1.0-SNAPSHOT/bin/encyclopedia convert file.zim articles.db

This will take a few hours if it's the full Wikipedia dataset.

Run

To serve the articles, run

$ encyclopedia-1.0-SNAPSHOT/bin/encyclopedia serve 8080 articles.db

Change 8080 to the port you want to serve the traffic from. At start-up the server constructs a trie used in searching, this will take a few minutes.

encyclopedia.marginalia.nu's People

Contributors

vlofgren avatar aitorres avatar

Stargazers

Mimuki avatar  avatar  avatar Josh avatar Marc Carran avatar  avatar  avatar Amory Meltzer avatar Michael Markl avatar  avatar Arjun P avatar

Watchers

 avatar  avatar

Forkers

aitorres

encyclopedia.marginalia.nu's Issues

Search bar not handling accented characters properly

Hi, thank you for this interesting experiment! :-)

I wanted to report a bug with the search bar: if you try to search any term with an accented character (e.g. é), the application will render an 500 internal server error.

You can reproduce by typing this and clicking Search:

Screenshot 2023-08-30 at 10 39 14 PM

I see that, by doing this, the app is directed to the path https://encyclopedia.marginalia.nu/find/%E9 (note the escaped character).

Screenshot 2023-08-30 at 10 40 33 PM

If I manually set the path to /find/é, the search works as expected and results are displayed properly:

Screenshot 2023-08-30 at 10 41 00 PM

I could try finding and solving the issue but it'd take me a few days as I'd need to ramp up on Java / Spark, which I haven't used much before (unless it's a very quick change, but I'm not sure!).

And again, thanks for this project!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.