tg-archive
tg-archive copied to clipboard
[FEATURE REQUEST] Searchengine
Is it possible to add a sitewide search into the static html-page? We got a pretty big archive and finding old posts will be much easier with a searchengine included.
I haven't thought about this, but I guess you could include some sort of a JS search plugin in your site template.
Suggestion for a static local search engine: Lunr
There's a Python implementation which produces files readable by the JavaScript version: https://pypi.org/project/lunr/
Will experiment with Lunr sometime, @joschi. The size of the index might get out of hand for big channels.
Why not search via MySQL. This would of course require that the database runs in a Mysql database.
@f0xcb MySQL is quite a heavy dependency and you'd need an active backend service talking to the MySQL database (which doesn't exist yet) in order to run searches.
MySQL is not necessary. tg-archive stores all data in an sqlite DB anyway, which has good full text support. It's possible to build a separate frontend which simply reads this DB file and presents a searchable site. That's not in the scope of tg-archive though, as it only aims to sync data and generate static sites.
I would like to have this feature too. My telegram group is deleted and I'm struggling to search for old but valuable content in chat history.
Relevant to this discussion: https://github.com/tinysearch/tinysearch
Would love to have server search as well.