Skip to content

A Kotlin based android app to convert all the documents to text by scanning it from your phone's camera.

License

Notifications You must be signed in to change notification settings

treaknite/Simple-OCR

Repository files navigation

Awesome Hacktoberfest Awesome

Hacktoberfest is a chance to level up your coding skills and get small goodies in reward.


Logo

Official website for registration and tips on how to get started

Table of Contents


Simple_OCR

This was just a fun project in order to explore the field of Android development using Kotlin.

Built With

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

1. Register yourself to Hacktoberfest 2020

2. Get Started to start contributing

3. Star and Fork this Repository

You can star ⭐ and fork 🍽️ this repository on GitHub by navigating at the top of this repository.

GitHub repository URLs will reference both the username associated with the owner of the repository, as well as the repository name.
When you’re on the main page for the repository, you’ll see a button to "Star" and “Fork” the repository on your upper right-hand side of the page, underneath your user icon.

4. Clone the Repository

To make your own local copy of the repository you would like to contribute to, let’s first open up a terminal window.
We’ll use the git clone command along with the URL that points to your fork of the repository.
This URL will be similar to the URL above, except now it will end with .git. In the example above, the URL will look like this:

https://github.com/dscabesit/Simple-OCR.git

You can alternatively copy the URL by using the green “Clone or download” button from your repository page that you just forked from the original repository page. Once you click the button, you’ll be able to copy the URL by clicking the binder button next to the URL:

Once we have the URL, we’re ready to clone the repository. To do this, we’ll combine the git clone command with the repository URL from the command line in a terminal window:

git clone https://github.com/dscabesit/Simple-OCR.git

5. Create New Branch

Once the project is opened create a new branch and checkout in it where you can make the changes in the code.
You can do this either from terminal or Directly in your text editor.
To do from Terminal:

git branch new-branch

git checkout new-branch

6. Commit and Push

After making the required changes commit and push your code
Terminal:
To add the changes after you have made the modifications

git add . or git add -A

To commit and push the changes

git commit -m <Your-commit-message>


git push --set-upstream origin new-branch

7. Update Local Repository

While working on a project alongside other contributors, it is important for you to keep your local repository up-to-date with the project as you don’t want to make a pull request for code that will cause conflicts. To keep your local copy of the code base updated, you’ll need to sync changes.
We’ll first go over configuring a remote for the fork, then syncing the fork.

8. Configure a Remote for the Fork

You’ll have to specify a new remote upstream repository for us to sync with the fork. This will be the original repository that you forked from. you’ll have to do this with the git remote add command.

git remote add upstream https://github.com/dscabesit/Simple_OCR

In this example, // upstream // is the shortname we have supplied for the remote repository since in terms of Git, “upstream” refers to the repository that you cloned from. If you want to add a remote pointer to the repository of a collaborator, you may want to provide that collaborator’s username or a shortened nickname for the shortname.

9. Sync the Fork

Once you have configured a remote that references the upstream and original repository on GitHub, you are ready to sync your fork of the repository to keep it up-to-date.

To sync your fork, from the directory of your local repository in a terminal window, you’ll have to use the // git fetch // command to fetch the branches along with their respective commits from the upstream repository. Since you used the shortname “upstream” to refer to the upstream repository, you’ll have to pass that to the command:

git fetch upstream

Switch to the local master branch of our repository:

git checkout master

Now merge any changes that were made in the original repository’s master branch, that you will access through your local upstream/master branch, with your local master branch:

git merge upstream/master

10. Create Pull Request

At this point, you are ready to make a pull request to the original repository.
Now navigate to your forked repository, and press the “New pull request” button on your left-hand side of the page.

Prerequisites

  1. Android Studio
  2. An android phone (with USB debugging turned on)
  3. Java JDK 14.0.1

Installation

You will need to install Android Studio (download link - https://developer.android.com/studio)

Download java jdk 14.0.1 (download link - https://www.oracle.com/in/java/technologies/javase-downloads.html)

Preferably an android phone to run the app (check here how to turn on USB debugging - https://developer.android.com/studio/debug/dev-options) avoid using the emulator provided by the android studio itself.

Deployment

Start android studio and when prompted to open the project choose this cloned repository and

IMPORTANT NOTE: when the project gets opened then proceed to the file menu on the top left -> project structure -> project and then -

1.now first go to android gradle version and select "4.0.0"

  1. choose "gradle version" from the same project menu and choose "6.5"

Now, simply wait for the gradle build to finish whose running status will be visible on the bottom (will take about 10 minutes or so)

Leave the system idle as this will require some heavy usage of RAM.

Meanwhile connect your phone and MAKE SURE THE USB DEBUGGING IS ON TURNED and then your phone name will show up on the top of the android studio devices list.

Once the gradle build is finished then simply click "run" option which will be visible on the top right right the device listing.

License

Distributed under the MIT License. See LICENSE for more information.

Author

Contributors

About

A Kotlin based android app to convert all the documents to text by scanning it from your phone's camera.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages