mdict-js icon indicating copy to clipboard operation
mdict-js copied to clipboard

A little chat

Open thangngoc89 opened this issue 8 years ago • 5 comments

Continue from my blog's comment

Nice to read your introduction about my mdict-js project on GitHub. I have problem to "load/discover local dictionary file without interference from user himself once reconfigured". Do you have any idea? I suppose parsing mdd/mdx through XmlHTTPRequest is quiet dumb, even for local resources. For a better reading experience with foreign language, I used to make a prototype like this: http://www.hi-pda.com/forum/vi... But the public online dictionary stopped to service, that's why I wrote mdict-js. Wish to share idea with you.

(Sorry, I know no Vietnamese. Thanks for Google translating service.)

I'm having trouble accessing Disqus from my country so I will continue the discussion here if it's OK with you.

As you probably know from my blog, I'm planing on building a truely cross-platform application for MDict using React and React Native. I have plan for Android, Linux and Windows (but it's easy to port to the rest thanks to React).

Now get to the point :

XmlHTTPRequest is quiet dumb

AFAIK, for security reason, there is no different way you can do this.

I looked at your project and it's a mess :( . I can refactor them to use npm as a dependencies manager and use Webpack as a build tool. This way, your MDict parser can be re-used elsewhere and decoupled from the website

thangngoc89 avatar Apr 05 '16 04:04 thangngoc89

Glad to hear.

mdict-js is my hobby project under construction (actually suspending for a while). Thanks if you can brush-up my code and turn it AMD/CommonJS/Node compatible.

One reason for why mdict-js running so smooth inside browser is that the parser reads as little as possible, never loading whole into memory. File#slice(..) https://developer.mozilla.org/en/docs/Web/API/File works for browser, but is XmlHttpRequest capable to read partial file (local inside extension/app) as efficiently as local file assigned by user? I yet get no resolution for this issue.

You work on React, while I'm now playing with Electron. :-).

2016-04-05 13:21 GMT+09:00 Khoa Nguyen [email protected]:

Continue from my blog's comment

Nice to read your introduction about my mdict-js project on GitHub. I have problem to "load/discover local dictionary file without interference from user himself once reconfigured". Do you have any idea? I suppose parsing mdd/mdx through XmlHTTPRequest is quiet dumb, even for local resources. For a better reading experience with foreign language, I used to make a prototype like this: http://www.hi-pda.com/forum/vi... But the public online dictionary stopped to service, that's why I wrote mdict-js. Wish to share idea with you.

(Sorry, I know no Vietnamese. Thanks for Google translating service.)

I'm having trouble accessing Disqus from my country so I will continue the discussion here if it's OK with you.

As you probably know from my blog, I'm planing on building a truely cross-platform application for MDict using React and React Native. I have plan for Android, Linux and Windows (but it's easy to port to the rest thanks to React).

Now get to the point :

XmlHTTPRequest is quiet dumb

AFAIK, for security reason, there is no different way you can do this.

I looked at your project and it's a mess :( . I can refactor them to use npm as a dependencies manager and use Webpack as a build tool. This way, your MDict parser can be re-used elsewhere and decoupled from the website

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/fengdh/mdict-js/issues/1

fengdh avatar Apr 05 '16 04:04 fengdh

You work on React, while I'm now playing with Electron. :-).

Actually, I planed to use React with Electron.

So my plan is:

  • Rebuild the website with React (for easy prototype)
  • Port the website to Electron
  • Port the website to React Native (for Android app)

It's pretty easy with React when you get used to it.

I'll play around with your code this weekend and send some PR if I can :)

Again. Thanks for an nice project.

thangngoc89 avatar Apr 05 '16 05:04 thangngoc89

@thangngoc89 @fengdh guys, FYI. There's need for it for my server-side project, so I ported it to node.js: https://github.com/jeka-kiselyov/mdict Sad, but there's no backward compatibility(it doesn't run in browser, as uses fs library), so I published it as separate repository, not submiting pull request to this one. So, if somebody can merge that 2 options, it would be cool.

@fengdh thanks for your work. That job you did here with binary data is real magic.

jeka-kiselyov avatar Feb 26 '17 16:02 jeka-kiselyov

dear fengdh, you have done an excellent work! but I have two questions about your project 1.will you add css support to the program later? 2.how did you deploy dynamic nodejs code to github pages? As far as I know githubpags can only support deployment of static pages. Best Regards, CraziNerdi

A1bertY avatar Feb 05 '18 00:02 A1bertY

Hi, CraziNerdi.

  1. What you look at http://fengdh.github.io/mdict-js/ is a prototype to demonstrate my little pure JavaScript implemented mdict parser and a reference renderer for browser. Not a full-fledged product. At this time, I have no intention or time to put more effort on the prototype. But you can improve it by yourself anyway, it's open and free. If you need help, just ask me any question.

  2. It is correct that Github pages can support only static pages, which is exactly how http://fengdh.github.io/mdict-js/ works. It consists only a set of static html/js/css files. You upload a *.mdx with optional *.mdd file, the page parse its header and render what you look up all in LOCAL browser. It will never transfer any file & data to an non-existed magic server behind at all.

You are welcome. Feng

fengdh avatar Feb 05 '18 00:02 fengdh