holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.64k stars 116 forks source link

Nextcloud access #71

Open ifuchs opened 4 years ago

ifuchs commented 4 years ago

I am using Nextcloud for file storage. If I call pickFolder, Nextcloud (and several other locations) are listed but grayed out. Only On My IPad and iCloud Drive can be selected. Is there a way to enable these other locations for access?

holzschu commented 4 years ago

The policy is that a-Shell supports all file providers that use Apple's FileProvider API. Unfortunately, many of the big file providers (Dropbox, Google Drive, ...) use proprietary APIs. I could implement these, but I would have to write specific code for each provider (and, in some cases, pay a license fee for the API). Right now, my favorite file providers that use the FileProvider API are WorkingCopy and Secure ShellFish. Adding support to the other file providers is on the TODO list.

ifuchs commented 4 years ago

Thanks. Nextcloud would probably not involve any license fees.

On Jun 9, 2020, at 11:00 AM, Nicolas Holzschuch notifications@github.com wrote:

The policy is that a-Shell supports all file providers that use Apple's FileProvider API. Unfortunately, many of the big file providers (Dropbox, Google Drive, ...) use proprietary APIs. I could implement these, but I would have to write specific code for each provider (and, in some cases, pay a license fee for the API). Right now, my favorite file providers that use the FileProvider API are WorkingCopy and Secure ShellFish. Adding support to the other file providers is on the TODO list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/holzschu/a-shell/issues/71#issuecomment-641354088, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLDPSEKLGIEFFUF3INMZ4TRVZFABANCNFSM4NXER6HA.

pck1980 commented 3 years ago

I thought as soon as an app like Nextcloud appears in the Files app as a provider (not sure if my terminology is correct here), those files can be accessed from all other apps just if they were local files (so that apps accessing those files don’t have to bother with the details where these files actually reside etc.). Am I mistaken here?

ifuchs commented 3 years ago

If I invoke pickFolder, "On My iPad" and "iCloud Drive" are selectable. Nextcloud appears in the list but cannot be selected. Interestingly "JSBox" also is selectable.

aramb-dev commented 3 years ago

Maybe you need to get a nextcloud app if they have one

aramb-dev commented 3 years ago

Then they may give a option in files to enable that file storage just like google drive

ifuchs commented 3 years ago

The Files app has no trouble accessing Nextcloud. However, I don't know how to get to the files using pickFolder (or any other way)

ifuchs commented 3 years ago

Nextcloud IS accessible from Files app but not from a-shell.

On Nov 14, 2020, at 8:02 PM, Aram Services notifications@github.com wrote:

 Then they may give a option in files to enable that file storage just like google drive

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

aramb-dev commented 3 years ago

The PickFolder is supposed to bring up the files GUI and you should be able to use it from that.

aramb-dev commented 3 years ago

I am using Nextcloud for file storage. If I call pickFolder, Nextcloud (and several other locations) are listed but grayed out. Only On My IPad and iCloud Drive can be selected. Is there a way to enable these other locations for access?

@ifuchs @holzschu Now I see, that is with Apple. You may need to get a apple support. I have some other terminal apps on my iPad and all of the extra file locations are grayed out.

holzschu commented 3 years ago

All the file providers that are grayed use a specific API for identification and connection. I can add them, but I need to dive into their API, identification and everything, one by one. It's on the list of things to do.

ifuchs commented 3 years ago

+1 for Nextcloud :-)

aramb-dev commented 3 years ago

All the file providers that are grayed use a specific API for identification and connection. I can add them, but I need to dive into their API, identification and everything, one by one. It's on the list of things to do.

@holzschu @ifuchs How would you connect the API?

pck1980 commented 3 years ago

All the file providers that are grayed use a specific API for identification and connection. I can add them, but I need to dive into their API, identification and everything, one by one. It's on the list of things to do.

Just out of curiosity: Are the requirements for a shell different than for other apps that access a location such as Nextcloud? For all apps I tried, I could access files within my Nextcloud-folder (and other locations registered in the files app) without problems (and these where apps such as MS Office who probably wouldn't bother to explicitly add support for Nextcloud ;-) ). However, I also noticed that the dialog for opening a file shown be these apps looks different than the dialog shown by a-Shell: There's a sidebar listing all those locations (file providers) which basically seems to be the sidebar of the files app. Is this because all those apps only want to "pick" a specific file within a folder, whereas a-shell needs to access entire folders and wants to offer features such as navigating between folders without having to show the graphical dialog for every "cd" into a subfolder?

ifuchs commented 3 years ago

Is there any way that a WebDAV server could be supported as a file system in a-shell? Nextcloud supports WebDAV access).

ifuchs commented 3 years ago

Tried to install a WebDAV client:

$ pip install webdavclient3 Defaulting to user installation because normal site-packages is not writeable Collecting webdavclient3 Downloading webdavclient3-3.14.5.tar.gz (27 kB) Requirement already satisfied: requests in /private/var/mobile/Containers/Data/Application/5190CF10-63B9-4B91-96D9-01E8E7A9354B/Li brary/lib/python3.9/site-packages (from webdavclient3) (2.25.0) Collecting lxml Downloading lxml-4.6.2.tar.gz (3.2 MB) |████████████████████████████████| 3.2 MB 5.1 MB/s ERROR: Command errored out with exit status 1: command: /private/var/containers/Bundle/Application/0510C216-9D53-4265-A377-3BF884E7CB5D/a-Shell.app/Library/bin/python3 -c ' import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/mobile/Containers/Data/Application/5190CF10-63B9-4B91-96D9-01E8E 7A9354B/tmp/pip-install-7cizx0q3/lxml/setup.py'"'"'; file='"'"'/private/var/mobile/Containers/Data/Application/5190CF10-63B9-4 B91-96D9-01E8E7A9354B/tmp/pip-install-7cizx0q3/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read( ).replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/ mobile/Containers/Data/Application/5190CF10-63B9-4B91-96D9-01E8E7A9354B/tmp/pip-pip-egg-info-svsvwivv cwd: /private/var/mobile/Containers/Data/Application/5190CF10-63B9-4B91-96D9-01E8E7A9354B/tmp/pip-install-7cizx0q3/lxml/ Complete output (3 lines): Building lxml version 4.6.2. Building without Cython. Error: Please make sure the libxml2 and libxslt development packages are installed.

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

holzschu commented 3 years ago

For the record and for my own notes: I tried adding Nextcloud iOS-communication-library to a-Shell. https://github.com/nextcloud/ios-communication-library It doesn't change anything to the behaviour (Nextcloud is still grayed out). I think I need to invoke a login / connection screen, but the documentation is inexistant.

I'll try again later, once there is some sort of documentation on how to use the library.

ymgenesis commented 3 years ago

I'm trying to do the same but with FilebrowserGO. Option to select from files pop-up is greyed out similar to Nextcloud.

holzschu commented 3 years ago

It’s probably the same problem: if it doesn’t use iOS file provider API, we are not able to communicate with it. I’ll add FileBrowser GO to the list of file providers to support (but, based on my experience with NextCloud, DropBox and others, it’s very difficult)