https://github.com/mrglaster/code-from-screenshot-api-re
Reverse engineered API for Code-From-Screenshot (codefromscreenshot.com) with python realization
https://github.com/mrglaster/code-from-screenshot-api-re
Last synced: 10 months ago
JSON representation
Reverse engineered API for Code-From-Screenshot (codefromscreenshot.com) with python realization
- Host: GitHub
- URL: https://github.com/mrglaster/code-from-screenshot-api-re
- Owner: mrglaster
- Created: 2024-02-03T04:45:22.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-03T04:52:53.000Z (almost 2 years ago)
- Last Synced: 2025-01-15T07:11:34.471Z (12 months ago)
- Language: Python
- Size: 446 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Code From Screenshot: Reverse Engineered API
### Description
This project is the result of [Code From Screenshot](https://www.codefromscreenshot.com/) service API reverse engineering. In api_demo.py you will find the implementation of the API as well as an usage example

### Results demo
#### Source Image

#### Recognized Code
```
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("How old are you?: ");
int age = in.nextInt();
if (age < 16) {
System.out.println("Sorry, you are not quite old enough to drive!");
} else {
System.out.println("Yeah! Happy driving!");
}
}
}
```
#### Source Image

#### Recognized Code
```
@Controller
@RequestMapping("student/registration")
public class StudentRegistrationController {
@InitBinder
public void initBinder(WebDataBinder dataBinder) {
StringTrimmerEditor stringTrimmerEditor = new StringTrimmerEditor(true);
dataBinder.registerCustomEditor(String.class, stringTrimmerEditor);
}
@RequestMapping("/registrationForm")
public String showForm(Model theModel) {
Student theStudent = new Student();
theModel.addAttribute("student", theStudent);
return "student-registration-form";
}
}
```