xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.46k stars 78 forks source link

Turn `/src/dict` into a library `libgoldendict` #905

Open shenlebantongying opened 1 year ago

shenlebantongying commented 1 year ago

Let GD lives beyond itself.

for alternative frontends like the command line https://github.com/goldendict/goldendict/issues/37 , or http version https://github.com/goldendict/goldendict/issues/618 (or maybe an Electron frontend)

Someone did this before https://github.com/kernel1024/goldendict-lib (but he no longer uses it https://github.com/kernel1024/jpreader/commit/b69b6f9d3c4e65696c1fb74e57767eba6b2dfd24)

Making a new binary (like gdcl) from scratch for the CLI is easier than hacking the QtSingleApplication to support bi-directional communication.

Having a GUI running is not really necessary.

We can make a binary for CLI gdcl first, then consider making the shared part with goldendict into a lib later (Probably after using CMake as the primary build tool.)

For possible HTTP capability, we can start a new process like gdserver https://github.com/xiaoyifang/goldendict-ng/issues/229 instead of complicating existing code.

xiaoyifang commented 1 year ago

Sounds ok.