{"id":13934836,"url":"https://github.com/Nikolay-Lysenko/readingbricks","last_synced_at":"2025-07-19T19:32:26.226Z","repository":{"id":48322410,"uuid":"110345613","full_name":"Nikolay-Lysenko/readingbricks","owner":"Nikolay-Lysenko","description":"A structured collection of notes (mostly, on machine learning) and a Flask app for reading and searching them.","archived":false,"fork":false,"pushed_at":"2024-07-06T11:03:20.000Z","size":1568,"stargazers_count":93,"open_issues_count":5,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-08T07:33:48.709Z","etag":null,"topics":["knowledge-base","lecture-notes","search-engine","tf-idf","theory","zettelkasten"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nikolay-Lysenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-11T12:58:48.000Z","updated_at":"2024-08-10T02:21:32.000Z","dependencies_parsed_at":"2024-01-06T19:33:35.255Z","dependency_job_id":"4132ddbd-5a16-4ede-b8c3-ddc9273ccf85","html_url":"https://github.com/Nikolay-Lysenko/readingbricks","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolay-Lysenko%2Freadingbricks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolay-Lysenko%2Freadingbricks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolay-Lysenko%2Freadingbricks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nikolay-Lysenko%2Freadingbricks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nikolay-Lysenko","download_url":"https://codeload.github.com/Nikolay-Lysenko/readingbricks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226666437,"owners_count":17665030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["knowledge-base","lecture-notes","search-engine","tf-idf","theory","zettelkasten"],"created_at":"2024-08-07T23:01:16.040Z","updated_at":"2024-11-27T02:30:58.927Z","avatar_url":"https://github.com/Nikolay-Lysenko.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook"],"sub_categories":[],"readme":"[![Build Status](https://github.com/Nikolay-Lysenko/readingbricks/actions/workflows/main.yml/badge.svg)](https://github.com/Nikolay-Lysenko/readingbricks/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/Nikolay-Lysenko/readingbricks/branch/master/graph/badge.svg)](https://codecov.io/gh/Nikolay-Lysenko/readingbricks)\n[![Maintainability](https://api.codeclimate.com/v1/badges/ac3959677909d81cb271/maintainability)](https://codeclimate.com/github/Nikolay-Lysenko/readingbricks/maintainability)\n[![PyPI version](https://badge.fury.io/py/readingbricks.svg)](https://pypi.org/project/readingbricks/)\n\n# ReadingBricks\n\n## Overview\n\nIt is a Flask app for reading and searching notes from a personal knowledge base. Here, knowledge base means a collection of Jupyter notebooks with Markdown cells which may have tags and may contain links to each other. So, the approach resembles [Zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten).\n\nFeatures of the search system include:\n- [x] Separate spaces for fields of knowledge\n- [x] Search by single tag\n- [x] Search by expressions consisting of tags, logical operators, and parentheses\n- [x] Full-text search with TF-IDF\n- [ ] Search within kNN-index built on vector representations of notes\n\nThe repository can be used either as a whole (with notes written by me) or as a Python package providing an interface to your notes.\n\n## Usage as existing knowledge base\n\nThe most valuable part of this project is not a software. It is the [notes](https://github.com/Nikolay-Lysenko/readingbricks/tree/master/notes) themselves. When writing them, I try to explain complicated things in a way that allows efficient grasping with as little ambiguity as possible. I write mostly on machine learning, but new topics are coming. Alas, there is a potential dealbreaker — as of now, the notes are in Russian only. If it does not suit you, please go to the [next section](#usage-as-an-interface).\n\nTo start with, you need to clone the repository to your local machine and install `readingbricks` package. This can be done by running the below commands from a terminal:\n```bash\ncd /your/path/\ngit clone https://github.com/Nikolay-Lysenko/readingbricks\ncd readingbricks\npython -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\npip install -e .\n```\n\nEvery time you want to start a Flask application, run these commands:\n```bash\ncd /your/path/readingbricks\nsource venv/bin/activate\npython -m readingbricks\n```\n\nThe last command launches a local server. After it is ready, open your web browser and go to `127.0.0.1:5000`. See [interface guide](#interface-guide) for further details.\n\n## Usage as an interface\n\nTo make your own knowledge base compatible with the app, it must be represented as follows:\n```\nnotes_directory\n├── field_one\n│   ├── notebook_one.ipynb\n│   ├── ...\n│   └── notebook_n.ipynb\n├── ...\n└── field_k\n    ├── notebook_one.ipynb\n    ├── ...\n    └── notebook_m.ipynb\n```\nHere, fields stand for independent domains (say, machine learning, chemistry, music theory, etc.). Within a particular field, distribution of notes among Jupyter notebooks can be arbitrary. For example, you may simply keep all notes in a single notebook.\n\nAll cells of a notebook must be Markdown cells starting with `## {title}`. To tag a note, activate tagging facilities with 'View -\u003e Cell Toolbar -\u003e Tags'. To add link from one note to an other note, special patterns `__root_url__/{field}/notes/{note_title}` and `__home_url__/notes/{note_title}` can be used. While the latter is less verbose, only the former supports cross-field links.\n\nSo far so good. The knowledge base is ready, but the app must be configured to use it. Create a JSON file somewhere that looks like this:\n```json\n{\n  \"LANGUAGE\": \"en\",\n  \"FIELDS\": [\"field_one\", \"field_two\"],\n  \"FIELD_TO_ALIAS\": {\"field_one\": \"Field #1\", \"field_two\": \"Field #2\"},\n  \"FIELD_TO_SEARCH_PROMPT\": {\"field_one\": \"the_most_popular_tag\", \"field_two\": \"the_most_popular_tag\"},\n  \"NOTES_DIR\": \"/absolute/path/to/notes_directory\",\n  \"RESOURCES_DIR\": \"/any/directory/for/storing/internal/files\"\n}\n```\n\nNow, let us install the Python package:\n```bash\nsource /your/path/venv/bin/activate\npip install readingbricks\n```\n\nAll that remains is to launch the app:\n```bash\npython -m readingbricks -c /absolute/path/to/config.json\n```\n\nAs in the previous section, go to `127.0.0.1:5000`.\n\n## Interface guide\n\nThe web interface is quite self-explanatory.\n\nThe only non-trivial control element is search bar which is located on home pages of fields. It can operate in three modes:\n* query in natural language (e.g., `transformers in recommender systems`);\n* query as expression consisting of tags, logical operators, and parentheses — special keyword `tags:` is required (e.g. `tags: transformers AND recommender_systems`);\n* combination of above options — symbols before `tags:` form natural language query and symbols after it form tag expression (e.g., `transformers tags: recommender_systems`).\n\nIf at least part of a query is in natural language, results are sorted by TF-IDF. Else, order of results depends on lexicographic positions of their notebooks inside their field directory and on positions of cells inside notebooks.\n\nEnjoy reading!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNikolay-Lysenko%2Freadingbricks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNikolay-Lysenko%2Freadingbricks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNikolay-Lysenko%2Freadingbricks/lists"}