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

Runnning Xowa in headless mode and connecting with command-line text-browser #223

Open
Sirpattalot opened this Issue Apr 20, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Sirpattalot

Sirpattalot commented Apr 20, 2018

Hello.
I am currently running Raspbian Jessie Lite, therefore no GUI. I have successfully installed Xowa in command line. The typical instructions are outlined here: #47

However, once I launch that server, I am unable to do anything else in that terminal, and if I push it to the background it stops. I am using the elinks text browser. Also nothing appears when I navigate to localhost:8080 or similarly 192.168.2.1:8080.

You mention in the previously linked issue that I can run it from command line using one of two such commands:

    (wikitext) java -jar xowa_linux_64.jar --app_mode cmd --show_license n --show_args n --cmd_text "app.shell.fetch_page('Help:Import/Command-line' 'wiki');"
    (html) java -jar xowa_linux_64.jar --app_mode cmd --show_license n --show_args n --cmd_text "app.shell.fetch_page('Help:Import/Command-line' 'html');"

However when using these I get the following errors:
cfg: itm not found; key=xowa.gui.toolbar.show_search
cfg: itm not found; key=xowa.gui.toolbar.show_allpages

I'm simply wanting to access wikipedia offline, strictly from the command line.

All help is appreciated. Thank you.

@Sirpattalot Sirpattalot changed the title from Runnning Xowa in headless mode and connectnig with command link test browser to Runnning Xowa in headless mode and connecting with command-line text-browser Apr 21, 2018

@gnosygnu

This comment has been minimized.

Owner

gnosygnu commented Apr 25, 2018

Hi, thanks for creating the ticket, and sorry for the delayed response on my side.

There are two issues:
First, the command-line syntax wasn't exactly correct

  • it needs to reference a wiki. For example, "home/wiki/Main_Page", not "Main_Page". Or "en.wikipedia.org/wiki/Earth"
  • it needs to reference a page which exists. "Help:Import/Command-line" no longer exists. It's now "Dev/Command-line"
  • it needs a comma between the url, and the format. For example, ("en.wikipedia.org/wiki/Earth", "wiki"

I tried out the following on my Windows box now and it works. It incorporates all three items above.

java -Djava.awt.headless=true -jar xowa_windows_64.jar --app_mode cmd --show_license n --show_args n --cmd_text "app.shell.fetch_page('home/wiki/Dev/Command-line',
'wiki');"

Second, the output always outputs the following two lines

cfg: itm not found; key=xowa.gui.toolbar.show_search
cfg: itm not found; key=xowa.gui.toolbar.show_allpages

I'll fix that in the next release. If you need this fixed on your side, let me know, and I'll upload a file for you to replace.

Hope this helps, and sorry again for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment