Skip to content
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

PACK-1 & PACK-2 #5

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

PACK-1 & PACK-2 #5

wants to merge 15 commits into from

Conversation

lrq3000
Copy link

@lrq3000 lrq3000 commented Dec 31, 2017

This PR contains PACK-1 (for both desktop and Android, so it will ease development) as well as PACK-2 (all instructions are in DEVELOPER.md). This is done using Kivy. No compilation is necessary for the moment (although it is possible, ie to package as a standalone APK, more in DEVELOPER.md).

Here is the result on Android:

zimandroidmockup

Note this PR contains alternatives for the service (service2-4). I left them here in case they can be useful further in development but they are unused as of now, wsgiref seems to do the job well :-)

Note also that one of my high priority goals was to minimize the burden of developing for Android, thus:

  1. I maintained the desktop webview & server launching, with maximally shared codebases (basically the difference is that for desktop we use a thread to launch the server, whereas for android it's in a service). Thus, most of Zim Android features and UI can be developed and tested directly from a desktop computer without needing Android at all :-)
  2. On Android, the app can be run inside Kivy Launcher, which has some limitations compared to an APK built via Python-for-Android, but the big advantage is that no compilation is required (which is VERY time consuming, first because it can fail for many different reasons, secondly because it takes time to compile and then reinstall the APK on an Android device!). With Kivy Launcher + Bluestacks, it's very convenient to develop and see the changes done to the app, very fast (just a copy/paste using TotalCommander on Android - see DEVELOPER.md). Note that we can (and will) make an APK using Python-for-Android, Kivy Launcher is just a very convenient way of launching Python app (when it works) ;-)

@lrq3000 lrq3000 mentioned this pull request Dec 31, 2017
@lrq3000
Copy link
Author

lrq3000 commented Dec 31, 2017

BTW, I think the next step really should be PACK-3, we should try to render Zim notes as HTML asap, and later do the UI-1 to UI-3 milestones. I would like to ensure that rendering Zim notes is possible (particularly I am worried about the dependencies required by Zim, as Kivy Launcher is quite picky...).

@jaap-karssenberg Could you maybe add to the repo the minimal set of python files from Zim that are required to read a Zim note and convert it to HTML? I could then give it a try on Android.

@lrq3000
Copy link
Author

lrq3000 commented Dec 31, 2017

A bit in advance of UI-3, I just tested contentEditable=True on the pages to see if it could work out as a way to enable edition of Zim notes inside Android. It works beautifully well :-) The demo is updated, so we can have a taste of what the Zim for Android would behave like with edition capabilities :-)

Of course the changes are not stored anywhere, we would need to implement a MutationObserver (if an expert of Javascript is passing by, please give us a hand!), but other than that it works well. I previously heard that there were issues with the editing cursor on Android but I did not see any such issue, the rendering during edition is instantaneous and perfect :-)

@lrq3000
Copy link
Author

lrq3000 commented Dec 31, 2017

I could compile an APK! I did not test it though, but at least it compiles, so it's now only a matter of giving the correct arguments to include all the necessary packages. I added instructions for compilation in DEVELOPER.md.

Note that I did not add these instructions to the wiki but in md files inside my repo, because the instructions are for the moment subject to change, they are related to a specific version of the mockup. When it will be more mature then it might be a good idea to move them to the wiki :-)

@lrq3000
Copy link
Author

lrq3000 commented Jan 8, 2018

I think I've found the perfect javascript editor for Zim:

https://github.com/nhnent/tui.editor

It is made for Markdown but it should be relatively easy to convert to Zim syntax :-)

@jaap-karssenberg
Copy link
Owner

Hi Stephen,

Apologies for the slow response time, I'm "underwater" doing the Gtk3 port, which I can only complete by blocking part of my inbox.

Great to see this merge request and such progress! Will have a more detailed look in another ~ 2 weeks and merge it.

Regards,

Jaap

@lrq3000
Copy link
Author

lrq3000 commented Jan 30, 2018

@jaap-karssenberg Great! No problem as anyway I can't work on it again until at least March, so no hurry but when you're done with GTK3 if you can help with providing a minimal Zim -> html decoder I can give a try at PACK-3, so we could have a working Zim reader for Android :-)

(PS: when I say minimal I mean with minimal 3rd-party dependencies, we just need a Zim -> HTML converter, text only, just so that I can try to compile on Android)

@fredericjacob
Copy link

@jaap-karssenberg Is the pull request still going to be merged some day (or is this repo not maintained anymore)? I'm a big fan of the Zim Desktop Wiki and would be interested to participate in the development of an app in the long run, but the project seems to be more or less dead at the moment...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants