Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Application For Google Summer of Code 2020 in Joplin: 2.1 Synopsis

You are on page 1of 5

Application for Google Summer of Code 2020 in

Joplin

1 Introduction
• Name: Deep Majumder

• Github handle: RedDocMD

• Email: deep.majumder2019@gmail.com

2 Project
2.1 Synopsis
I am interested in working on one of the following ideas for my GSoC project,
taken from the ideas page of Joplin (https://joplinapp.org/gsoc2020/
ideas.html):

• Support for multiple profiles

• OCR support

2.2 Benefits
2.2.1 Multiple profiles
The multiple profiles feature is important for people who use Joplin heavily
and for multiple purposes. While the concept of notebooks allow grouping of
notes, it does not insulate notebooks from each other. For an example, it is a
very common scenario for a user to use Joplin for both taking notes at home
and at work. Having separate work and home profiles will be advantageous
to them, so that the home notebooks don’t show up while working at his/her
office. In general, the concept of profiles allows for blackbox separation
between notes.

1
2.2.2 OCR support
As for OCR, little has to be said about the advantages of this marvelous
technology. It will definitely be useful to have the facility to extract the text
from handwritten notes, thus digitizing them.

2.3 Deliverables
Assuming that both these projects are assigned to me, users after the com-
pletion of this project will be able to do the following:

1. The user will be able to create multiple profiles with different names,
apart from the default profile which is automatically created when the
user opens Joplin for the first time. The profiles will be completely
insulated from each other. On switching profiles, the app may be
required to restart (depending on the final implementation). It may
be possible to add support for multiple instances of Joplin running on
different profiles.

2. The user will be able to extract the text from an image using the OCR
tool. The text will be unformatted because it is often impossible to
guess from the image how the writer intended to format his writing.

My plans are to first implement these features for the desktop version. If
time permits, I will implement it also for the mobile client.

2.4 Details
The following details are based off the desktop client. I will work on the
mobile client if time permits and my mentor allows it.

2.4.1 Multiple profiles


I will be taking ideas from the Github issue on this (https://github.com/
laurent22/joplin/issues/591). Currently, the files and directories where
the metadata and database is stored are hard-coded in BaseApplication.js
via a profileDir variable. I intend to make a new class called in Profile
in a file Profile.ts (As instructed in CONTRIBUTING.md, I will be using
Typescript). The class roughly would look like this:

class Profile {
id: number;
directoryName: string;
parentDirectory: string;

...
}

2
Figure 1: The Profile change popover

The BaseApplication object will contain a Profile object, which will store
the current Profile which is being used. In addition, since the app will restart
when profiles are switched, the next profile to open must be stored in the
root folder of all profiles (the .joplin-desktop directory). As mentioned
in the Github issue, it is a good idea to have an additional Profiles.ini
file in the root directory. For handling that file, a separate class must be
made, which I plan to call ProfilesHandler. An object of this class will
be loaded in app.js. When the app restarts, it will look up the profile to
load up and pass the requisite Profile object to BaseApplication.
As for the user interface, I intend to add a menu option in the Files
menu, saying ‘Switch Profile;, which will open up a screen or a pop-over. It
is easier to make a screen, but a pop-over will look better. The pop-over
will show the existing profiles as well as an option to create a new one.
Overall, this can be implemented in a file called ProfileScreen.tsx, with
some changes in app.js.

2.4.2 OCR support


The OCR service will use the Tesseract library as mandated in the ideas
page. The image loading will be made independent of the current re-
source library because the loaded image need not be stored in the database.
Firstly, there would be a new menu item, in the Files menu, called ‘Per-
form OCR’. This would open up a new screen, whose code would reside in

3
Figure 2: The OCR popover

OCRScreen.tsx. This screen would first launch a file-chooser with


showOpenDialog() from bridge.js. After the file being chosen, a preview
of it would be shown and the user can now extract text from the image. The
text would automatically be inserted into the currently open note. This is
an implementation detail and I haven’t figured it out yet. The OCR per-
forming code would reside in OCR.ts. This is relatively straightforward to
implement since Tesseract.js is very well documented.

2.5 Schedule
My exams are expected to be over by the first week of May, although there
is a bit of uncertainty considering the current virus scenario. I intend to
spend the remaining community bonding period to discuss with my future
mentor the design of the code as well as the UI design, to have a first draft
to work on. I am comfortable with communicating to my mentor through
whatever mode he/she suggests. Of the 12 weeks of coding period that we
have, I would set aside 2 weeks as backup for unforeseen scenarios.The rest
10 weeks would be divided equally for both the tasks. In the first 5 weeks, I
would work on the profiles task while the next 5 weeks I would work on the
OCR task. A week-wise split up of my plan is as follows:

4
Week Work to do
1 Write code for Profile.ts and ProfilesHandler.ts
2 Write code for ProfileScreen.tsx
3 Write tests for ProfilesHandler.ts
4 Integrate profiles code with BaseApplication.js,
insert Electron menu
5 Test and check if profile switching is working correctly
6 Write code for OCR.ts
7 Test OCR.ts on images and if necessary fine-tune parameters
8 Write code for OCRScreen.tsx
9 Create Electron menu item,
integrate service with rest of the app
10 Test and check whether OCR service acts as expected

3 Biodata
Hi, I am Deep Majumder, a first-year undergraduate student in Indian Insti-
tute of Technology (IIT), Kharagpur, majoring in Computer Science and En-
gineering. I would turn 19 this summer. I have been programming for about
8 years now and have a fair amount of experience in several languages such
as Java, C++, C, Python, JavaScript etc. I have recently grown an interest
in client-side browser based apps using JavaScript and am working on mak-
ing a Scrabble app, written using React js (the code is on Github: https:
//github.com/RedDocMD/ScrabbleOnline). I have done application devel-
opment previously, making two tabulation apps for my school’s quiz and elo-
cution events (they were written in Java). I have also contributed to Joplin
as well, working on issues like #2643 (https://github.com/laurent22/
joplin/issues/2643), #2703 (https://github.com/laurent22/joplin/
issues/2703) and have had one pull request merged, #2730 (https://
github.com/laurent22/joplin/pull/2730). I have also written a Python
script for solving a certain type of captcha using OpenCV and Tesseract
(available on Github: https://github.com/RedDocMD/captcha).
I believe I have the requisite knowledge for working on the project I have
mentioned and am confident that I would be able to positively contribute
to Joplin through GSoC.

You might also like