-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Please provide source for JS code in sphinx/search/*.py #1784
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
Comments
@shibukawa please take a look this ticket. |
Hi, Natural language processing code is generated by the following tool. This was modified from the original snowball code generator: https://github.com/shibukawa/snowball/ This tool is written in C. Original tool can generate C and Java, and my modified tool can generates Python and JSX(static altJS) code in addition to original C/Java. Generated Python scripts are in another pypi package: https://pypi.python.org/pypi/snowballstemmer And generated JSX code is in the following npm package: https://www.npmjs.com/package/snowball-stemmer.jsx And when I modified Sphinx code, I wrote description at the end of dev guide: http://sphinx-doc.org/devguide.html#debugging-tips I think bundling Snowball code generator is not needed (because it is a big tool and not special for Sphinx). And there have been the document describe it. So the task I have to do is only bundling non-minified JS code, I think. Is it ok for you? |
@shibukawa: Yes, having the non-minified JS code somewhere will be fine for us. |
I received the non-minified JS files from @shibukawa. I'll take over this issue. Just memo: amount of non-minified 16 language JS files is 1.2MB (as tgz: 128KB). |
I will be also fine with having a script to generate them in the tarball, even if the script will be using some external software — as an alternative to shipping non-minified files. |
@shimizukawa Any progress on this issue? This is currently blocking Sphinx 1.3 from being uploaded to Debian (and as I have already said, there are multiple ways to make us happy). |
@mitya57 Sorry, I kept you waiting. Now I occupied my day job... Maybe I can make a time at end of this April. |
@shimizukawa No problem. Can you please send me the “non-minified JS files that you received from @shibukawa” mentioned above, for the time being? (You can find my email in Sphinx commits log). |
Thanks! |
@shimizukawa Any update on this issue? Are you going to fix it, or should we go back to repacking tarball in Debian (as we did in past)? |
@mitya57 I made a change for the issue. Please can you try the stable code? |
@shimizukawa Much better now, thanks a lot! Can you please also tell me which commandline you used to generate the full JS file? (I realize that I need snowballstemmer, but I don't know anything about how to use it). |
Well, ... as @shibukawa mentioned at #1784 (comment) , generating full JS command is here (I guess..): https://www.npmjs.com/package/snowball-stemmer.jsx @shibukawa Is it correct? |
OK, thanks again! |
FWIW I have proposed a pull request to merge @shibukawa's generators into mainstream snowball, see snowballstem/snowball#24. This will allow Sphinx to use the original project's code, not the fork. |
I think this is still an issue, now the latest sphinx version seems to require the Please find attached a log of the issue I just encountered (I add to download manually the |
Seems fixed to me. Thanks. |
In most Python files in
sphinx/seach/*.py
, there is an embedded minified JavaScript code. While it looks tiny, it is actually quite large (for example, the version inru.py
contains over 14000 symbols).In distributions like Debian and Fedora, this is considered non-free code, and we can't ship it (see also previous discussions in #1434). Also, it is completely impossible to understand what is happening in that code and modify it.
As far as I understand, each such code is made of two parts (please correct me if my guess is wrong):
.py
files);It would be very nice if the following things are provided:
The text was updated successfully, but these errors were encountered: