-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[to do ] add an embed http server in goldendict #229
Comments
provide an unified structure is difficult and will cost too much effort and time . This can be set as an new feature alone. about the embed http server, My initial purpose is to offer the search result through website. and can simply convert html to plain text to satisfy the CLI. |
a video demo? Anyway this is great if this can be implemented , and should we switch GPL license to AGPL ,as GPL does not provide webservice protection. With this and nginx, goldendict can be served as a common dictionary server. |
Some steps(In future maybe):
|
I tried civetweb and made another one: https://github.com/SourceReviver/civetweb_qt_demo The code includes serving a QImage generated via libcairo. We just need to reinvent Video: civetweb is a fork of mangoose, but they are very different now. Mangoose only provides a mechanism to do multi threads, while civetweb manages threads on its own 😅. |
WOW I'm glad I discovered this issue thread. I've been waiting for this feature on official GoldenDict repo on and off for 5+ years! I'm happy to help. Note that regarding GoldenDict, I know more from a user's (and not a developer's) perspective,
I think this idea stems from this comment of mine. Yes, GoldenDict (for PC at least) uses this
I know that there is an HTTP server implementation for another dictionary format, SLOB (Sorted BLOB, which is little known), you can check its implementation here, itkach/aard2-web . It uses Java. Anyway, I'm subscribing to this issue, because I want to see this idea get implemented =) |
While I no longer have time to work on this, I think a reasonable path would be to decouple dict-related code into an independent module/library. Think about it, we can create a python binding to it, and creating a web interface would be as simple as dumping results into an HTML template. The design of existing code does not consider anything else other than working with the Qt GUI. It is a lot of labour work. BTW, I highly doubt anyone would want to learn the unnecessary internal indexing implementation used by Goldedict. It has been good for years and does a good job for the original/first GD developer to practice implementing the algorithm after university, but why not use something that is well studied and well known, like sqlite. The core value of GD is obviously not implementing yet another mini database 😅 Sorry for just talking and doing nothing, but I do think the above two issues have to be solved first, and the HTTP frontend would be as easy as writing a short script. |
Also would like to express interest in this. I've been requesting a way to have a dictionary api locally since 2019 along with TAbdiukov 😅 |
请问目前有实现计划吗? |
like the implementation in kiwix

the benifit of this feature:
related to the issues like Run a WEB Service on localhost, other software can send HTTP request to query words goldendict/goldendict#618
command line version goldendict/goldendict#37
The text was updated successfully, but these errors were encountered: