Skip to content

Commit

Permalink
fix: Remove Google Drive
Browse files Browse the repository at this point in the history
  • Loading branch information
munen committed Jun 3, 2022
1 parent d7b24b3 commit 729465b
Show file tree
Hide file tree
Showing 17 changed files with 53 additions and 538 deletions.
2 changes: 0 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
REACT_APP_DROPBOX_CLIENT_ID=your_dropbox_client_id
REACT_APP_GOOGLE_DRIVE_API_KEY=your_google_drive_api_key
REACT_APP_GOOGLE_DRIVE_CLIENT_ID=your_google_drive_oauth_client_id
REACT_APP_GITLAB_CLIENT_ID=your_gitlab_client_id
REACT_APP_GITLAB_SECRET=your_gitlab_secret
57 changes: 22 additions & 35 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Community chat: #organice on IRC [[https://libera.chat/][Libera.Chat]], or [[htt

organice is an implementation of [[http://orgmode.org/][Org mode]] without the dependency of
[[https://www.gnu.org/software/emacs/][Emacs]]. It is built for mobile and desktop browsers and syncs with
[[https://www.dropbox.com/][Dropbox]], [[https://gitlab.com/][GitLab]], [[https://en.wikipedia.org/wiki/WebDAV][WebDAV]] and [[https://drive.google.com][Google Drive]].
[[https://www.dropbox.com/][Dropbox]], [[https://gitlab.com/][GitLab]], and [[https://en.wikipedia.org/wiki/WebDAV][WebDAV]].

At [[https://200ok.ch/][200ok]], we run an instance of organice at https://organice.200ok.ch,
which is open for anyone to use! organice does not have a back-end
Expand Down Expand Up @@ -387,8 +387,8 @@ yarn install --production=false

*** Setup any of the synchronization back-ends

organice can sync your Org files using Dropbox, GitLab, WebDAV or
Google Drive as back-ends.
organice can sync your Org files using Dropbox, GitLab, and WebDAV as
back-ends.

If you want to develop a feature that needs synchronization, then you
will have to set up any of those options. If you want to work on a
Expand All @@ -400,25 +400,25 @@ organice has support for WebDAV and ships with a Docker container with
a WebDAV server based on Apache. You can make use of that and use this
WebDAV back-end for local development.

Having said that, if you're a Dropbox or Google Drive user, then it's
convenient to have working setups for either of them if you want to
test on files that are already in those back-ends. But it doesn't have
to be a barrier, just to get started. And maybe you don't want to host
your files with either of them anyway and use WebDAV all the way.
Having said that, if you're a Dropbox, then it's convenient to have a
working setup for it if you want to test on files that are already in
those back-ends. But it doesn't have to be a barrier, just to get
started. And maybe you don't want to host your files with either of
them anyway and use WebDAV all the way.

In any case, [[#faq_webdav][here's how to get running locally with a WebDAV setup]].

**** Dropbox, Google Drive, or GitLab
**** Dropbox or GitLab

To test against your own Dropbox or Google Drive application, you'll
need to create a ~.env~ file by copying [[file:.env.sample][.env.sample]] to just ~.env~.
To test against your own Dropbox or GitLab application, you'll need to create a
~.env~ file by copying [[file:.env.sample][.env.sample]] to just ~.env~.

#+BEGIN_SRC shell
cp .env.sample .env
#+END_SRC

Then, fill in the blanks in ~.env~ with your Dropbox, Google Drive, or
GitLab credentials. More information about that is in the section
Then, fill in the blanks in ~.env~ with your Dropbox or GitLab
credentials. More information about that is in the section
[[https://organice.200ok.ch/documentation.html#synchronization_back_ends][Synchronization back-ends]].

*** Running the application
Expand Down Expand Up @@ -476,12 +476,12 @@ If your new feature doesn't require a synchronization back-end, just
open the =sample.org= file which doesn't require a login. You're good
to go.

*Synchronizing with Dropbox or Google Drive*
*Synchronizing with Dropbox or GitLab*

If your new feature does require the Dropbox or Google Drive
synchronization back-end, there's an extra step you need to perform.
If your new feature does require the Dropbox or GitLab synchronization
back-end, there's an extra step you need to perform.

Both Dropbox and Google Drive require a whitelist of domains that they
Both Dropbox and GitLab require a whitelist of domains that they
can be synchronized from. The whitelist for local domains is
exclusively short: =http://localhost:3000=.

Expand Down Expand Up @@ -579,7 +579,7 @@ Since organice is a front-end only application, it can easily be
deployed to any server capable of serving a static application.

Please note: If you want the hosted application to connect to Dropbox,
WebDAV or Google Drive, please read the section on [[https://organice.200ok.ch/documentation.html#synchronization_back_ends][Synchronization
GitLab or WebDAV, please read the section on [[https://organice.200ok.ch/documentation.html#synchronization_back_ends][Synchronization
back-ends]].

** FTP
Expand Down Expand Up @@ -698,19 +698,6 @@ In the [[https://organice.200ok.ch/documentation.html#faq_webdav][WebDAV FAQ]],
WebDAV
- Documentation on Nextcloud sharing

*** Google Drive
:PROPERTIES:
:CUSTOM_ID: google_drive
:END:

To configure your own instance of organice for Google Drive, please go
consult the [[https://developers.google.com/drive/api/v3/quickstart/js][Google Developer documentation]]. In the Google Cloud
Platform console,you will create a Google Drive API key and an OAuth
Client ID. Then, you will create a new ~.env~ file (analogous to
~.env.sample~) and add those as values for the keys
=REACT_APP_GOOGLE_DRIVE_API_KEY= and
=REACT_APP_GOOGLE_DRIVE_CLIENT_ID=.

*** GitLab
:PROPERTIES:
:CUSTOM_ID: gitlab
Expand Down Expand Up @@ -743,9 +730,9 @@ regarding OAuth applications, if interested.
:CUSTOM_ID: encryption
:END:

If you do not trust your data with Dropbox or Google, you are free to
use Gitlab ([[https://about.gitlab.com/solutions/open-source/][which is open-source]]) or host your own [[https://organice.200ok.ch/documentation.html#webdav][WebDAV]] server and
take any number of precautionary measures.
If you do not trust your data with third parties like Dropbox, you are
free to use Gitlab ([[https://about.gitlab.com/solutions/open-source/][which is open-source]]) or host your own [[https://organice.200ok.ch/documentation.html#webdav][WebDAV]]
server and take any number of precautionary measures.

For example, you can encrypt your data on disk. organice itself is
just a front-end application, requires no server and has no tracking
Expand Down Expand Up @@ -835,7 +822,7 @@ parameters are required and must be URL encoded:

- ~captureTemplateName~: the name of the capture template to use. This
capture template must already exist in Settings > Capture templates.
- ~captureFile~: the =path= (for Dropbox) or =id= (for Google Drive)
- ~captureFile~: the =path= for Dropbox
of the file in which to execute the capture template.
- ~captureContent~: the content you'd like to capture. This content
will be placed at the cursor position if specified in the capture
Expand Down
3 changes: 0 additions & 3 deletions bin/compile_and_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ set -e
cp .env.sample .env
[ -z ${REACT_APP_DROPBOX_CLIENT_ID+x} ] || sed -i "s/your_dropbox_client_id/${REACT_APP_DROPBOX_CLIENT_ID}/" .env

[ -z ${REACT_APP_GOOGLE_DRIVE_API_KEY+x} ] || sed -i "s/your_google_drive_api_key/${REACT_APP_GOOGLE_DRIVE_API_KEY}/" .env
[ -z ${REACT_APP_GOOGLE_DRIVE_CLIENT_ID+x} ] || sed -i "s/your_google_drive_oauth_client_id/${REACT_APP_GOOGLE_DRIVE_CLIENT_ID}/" .env

[ -z ${REACT_APP_GITLAB_CLIENT_ID+x} ] || sed -i "s/your_gitlab_client_id/${REACT_APP_GITLAB_CLIENT_ID}/" .env
[ -z ${REACT_APP_GITLAB_SECRET+x} ] || sed -i "s/your_gitlab_secret/${REACT_APP_GITLAB_SECRET}/" .env

Expand Down
15 changes: 15 additions & 0 deletions changelog.org
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ All user visible changes to organice will be documented in this file.

When there are updates to the changelog, you will be notified and see a 'gift' icon appear on the top right corner.

* [2022-06-03 Fri]
** Removed
- Google Drive support. This backend had a few issues:
1. We waited [[https://github.com/200ok-ch/organice/issues/127][for years for Google to put the Google Drive API into
production mode]]. Without that, only very few people were actually
allowed by Google to use organice with Google Drive. A lot of
time and effort went into this from quite a few of people. Even
Google employees tried to expedite from within Google, but to no
avail. The maintainers of organice gave up on this issue since
[[https://github.com/200ok-ch/organice/issues/127#issuecomment-655339244][July 2020 and announced]] that the support for Google Drive will be
removed unless someone steps up and takes over this task. Nobody
did in the two years since, so we're removing it.
2. [[https://github.com/200ok-ch/organice/issues/109][Replace integration of Google Drive through <script> include in index.html with NPM module]]
3. [[https://github.com/200ok-ch/organice/issues/107][Sign in to Google Drive from new versions of Chrome dysfunctional]]

* [2022-06-01 Wed]
** Added
- Proper Landing Page
Expand Down
2 changes: 1 addition & 1 deletion doc/setupfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/htmlize.css"/>
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css"/>

#+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
#+HTML_HEAD: <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
#+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
9 changes: 1 addition & 8 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta
name="description"
content="Directly edit org-mode files online. Optimized for mobile. Syncs with Dropbox, Google Drive and WebDAV."
content="Directly edit org-mode files online. Optimized for mobile. Syncs with Dropbox, GitLab or WebDAV."
/>
<meta
name="viewport"
Expand Down Expand Up @@ -37,13 +37,6 @@
<ExternalLink href="https://github.com/200ok-ch/organice" />
</div>
</noscript>
<script
async
defer
src="https://apis.google.com/js/api.js"
onload="this.onload=function() {}; window.handleGoogleDriveClientLoad && window.handleGoogleDriveClientLoad()"
onreadystatechange="if (this.readyState === 'complete') this.onload()"
></script>
<div id="root"></div>
<script>
var {pathname} = window.location;
Expand Down
8 changes: 4 additions & 4 deletions sample.org
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Give them a try on these nested headers to get a feel for how they operate:
***** Clooney
** Syncing
The "cloud" button in the lower left hand corner syncs changes to your
chosen sync service (Dropbox, GitLab, WebDAV or Google Drive).
chosen sync service (Dropbox, GitLab, or WebDAV).

If there's a newer version on the server and no local changes, it'll pull.

Expand Down Expand Up @@ -438,10 +438,10 @@ SCHEDULED: <2018-09-17 Mon>
** This entry also only shows on exactly one day
<2020-02-17 Mon>
* Syncing
organice pulls down your org files from Dropbox, GitLab, WebDAV or Google Drive. Click the "Sign in" button in the upper right hand corner to sign in with either of them and authenticate organice.
organice pulls down your org files from Dropbox, GitLab, or WebDAV. Click the "Sign in" button in the upper right hand corner to sign in with either of them and authenticate organice.

** Backups
The first time you push changes from organice back up to your chosen sync service, organice will make a backup of the original file first. It'll be named {your-file-name}.organice-bak. Dropbox and Google Drive also both keep a full version history of your files for you, but this is an additional precaution in case something goes wrong pushing the file back up.
The first time you push changes from organice back up to your chosen sync service, organice will make a backup of the original file first. It'll be named {your-file-name}.organice-bak. Dropbox keeps a full version history of your files for you, but this is an additional precaution in case something goes wrong pushing the file back up.

Generally, when working with distributed Org files, we're recommending to put them under version control and to check for bugs and racing conditions between clients.

Expand All @@ -456,7 +456,7 @@ Default behaviour:
You can adjust these defaults on a file per file basis by creating file settings in the [[/settings][settings menu]].

* organice operates completely client side
You don't log in to organice directly because organice doesn't have a back end - it operates completely client side using Dropbox, GitLab, WebDAV or Google Drive as back-ends for storage.
You don't log in to organice directly because organice doesn't have a back end - it operates completely client side using Dropbox, GitLab, or WebDAV as back-ends for storage.
* Capture URL params and Siri support
organice supports a flexible mechanism for capturing using URL parameters. This mechanism integrates very nicely with the new [[https://support.apple.com/guide/shortcuts/welcome/ios][Siri Shortcuts]] feature in iOS 12, allowing you to use Siri to execute capture templates.

Expand Down
8 changes: 0 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { signOut } from './actions/sync_backend';
import { setDisappearingLoadingMessage, restoreStaticFile } from './actions/base';

import createDropboxSyncBackendClient from './sync_backend_clients/dropbox_sync_backend_client';
import createGoogleDriveSyncBackendClient from './sync_backend_clients/google_drive_sync_backend_client';
import createWebDAVSyncBackendClient from './sync_backend_clients/webdav_sync_backend_client';
import createGitLabSyncBackendClient, {
createGitlabOAuth,
Expand Down Expand Up @@ -105,13 +104,6 @@ export default class App extends PureComponent {
}
}
break;
case 'Google Drive':
client = createGoogleDriveSyncBackendClient();
initialState.syncBackend = Map({
isAuthenticated: true,
client,
});
break;
case 'GitLab':
const gitlabOAuth = createGitlabOAuth();
if (gitlabOAuth.isAuthorized()) {
Expand Down
3 changes: 0 additions & 3 deletions src/actions/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ export const setShouldStoreSettingsInSyncBackend = (newShouldStoreSettingsInSync
)
);
break;
case 'Google Drive':
client.deleteFileByNameAndParent('.organice-config.json', 'root');
break;
default:
}

Expand Down
8 changes: 0 additions & 8 deletions src/actions/sync_backend.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global gapi */
import { ActionCreators } from 'redux-undo';

import { setLoadingMessage, hideLoadingMessage, clearModalStack, setIsLoading } from './base';
Expand All @@ -18,9 +17,6 @@ export const signOut = () => (dispatch, getState) => {
case 'Dropbox':
persistField('dropboxAccessToken', null);
break;
case 'Google Drive':
gapi.auth2.getAuthInstance().signOut();
break;
case 'GitLab':
persistField('gitLabProject', null);
createGitlabOAuth().reset();
Expand Down Expand Up @@ -98,10 +94,6 @@ export const pushBackup = (pathOrFileId, contents) => {
case 'WebDAV':
client.createFile(`${pathOrFileId}.organice-bak`, contents);
break;
case 'Google Drive':
pathOrFileId = pathOrFileId.startsWith('/') ? pathOrFileId.substr(1) : pathOrFileId;
client.duplicateFile(pathOrFileId, (fileName) => `${fileName}.organice-bak`);
break;
case 'GitLab':
// No-op for GitLab, because the beauty of version control makes backup files redundant.
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,6 @@ export default ({
<code>/org/todo.org</code>
</Fragment>
)}
{syncBackendType === 'Google Drive' && (
<Fragment>
{' '}
Specify the file id of each file. You can find the file id in the URL of the file in
organice (e.g.,{' '}
<code>
/file/
{'<file id>'}
</code>
).
</Fragment>
)}
</div>

<Collapse
Expand Down
8 changes: 3 additions & 5 deletions src/components/FileBrowser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const FileBrowser = ({
isLoadingMore,
syncBackendType,
syncBackend,
additionalSyncBackendState,
// INFO: This was required back when we had Google Drive support.
// Leaving it here in case another sync backend requires it.
// additionalSyncBackendState,
}) => {
useEffect(() => syncBackend.getDirectoryListing(path), [syncBackend, path]);

Expand All @@ -30,10 +32,6 @@ const FileBrowser = ({
case 'WebDAV':
const pathParts = path.split('/');
return pathParts.slice(0, pathParts.length - 1).join('/');
case 'Google Drive':
return !!additionalSyncBackendState.get('parentId')
? '/' + additionalSyncBackendState.get('parentId')
: null;
default:
return null;
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/PrivacyPolicy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ const PrivacyPolicy = () => {
<strong>User data</strong>
</p>
<p>
No user data, including user data from third-party services such as Dropbox or Google, will
be stored or monitored by our Service. All access to user data is done through the proper
APIs of the respective services, and all data is only processed by the browser. No data will
be shared with any other service.
No user data, including user data from third-party services such as Dropbox will be stored
or monitored by our Service. All access to user data is done through the proper APIs of the
respective services, and all data is only processed by the browser. No data will be shared
with any other service.
</p>

<p>
Expand Down
Loading

0 comments on commit 729465b

Please sign in to comment.