mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2024-11-22 07:43:46 +01:00
Remove Transformation Suffix from Transformation classes
This commit is contained in:
parent
a72cdc14a1
commit
7dc1de2912
@ -1,11 +1,11 @@
|
|||||||
import { Enum } from 'enumify';
|
import { Enum } from 'enumify';
|
||||||
|
|
||||||
import NoOpTransformation from './transformations/NoOpTransformation.jsx';
|
import NoOp from './transformations/NoOp.jsx';
|
||||||
import RoundCoordinatesTransformation from './transformations/RoundCoordinatesTransformation.jsx';
|
import RoundCoordinates from './transformations/RoundCoordinates.jsx';
|
||||||
import CombineSameYTransformation from './transformations/CombineSameYTransformation.jsx';
|
import CombineSameY from './transformations/CombineSameY.jsx';
|
||||||
import RemoveRepetitiveElements from './transformations/RemoveRepetitiveElements.jsx'
|
import RemoveRepetitiveElements from './transformations/RemoveRepetitiveElements.jsx'
|
||||||
import ToTextPagesTransformation from './transformations/ToTextPagesTransformation.jsx';
|
import ToTextPages from './transformations/ToTextPages.jsx';
|
||||||
import ToSingleTextPageTransformation from './transformations/ToSingleTextPageTransformation.jsx'
|
import ToSingleTextPage from './transformations/ToSingleTextPage.jsx'
|
||||||
|
|
||||||
// Holds the state of the Application
|
// Holds the state of the Application
|
||||||
export default class AppState {
|
export default class AppState {
|
||||||
@ -16,12 +16,12 @@ export default class AppState {
|
|||||||
this.fileBuffer;
|
this.fileBuffer;
|
||||||
this.pdfPages = [];
|
this.pdfPages = [];
|
||||||
this.transformations = [
|
this.transformations = [
|
||||||
new NoOpTransformation(),
|
new NoOp,
|
||||||
new RoundCoordinatesTransformation(),
|
new RoundCoordinates(),
|
||||||
new CombineSameYTransformation(),
|
new CombineSameY(),
|
||||||
new RemoveRepetitiveElements(),
|
new RemoveRepetitiveElements(),
|
||||||
new ToTextPagesTransformation(),
|
new ToTextPages(),
|
||||||
new ToSingleTextPageTransformation()];
|
new ToSingleTextPage()];
|
||||||
|
|
||||||
//bind functions
|
//bind functions
|
||||||
this.render = this.render.bind(this);
|
this.render = this.render.bind(this);
|
||||||
|
@ -45,7 +45,7 @@ function combineTextItems(textItems:TextItem[]) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class CombineSameYTransformation extends Transformation {
|
export default class CombineSameY extends Transformation {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Combine Text On Same Y");
|
super("Combine Text On Same Y");
|
@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
|
|||||||
import PdfPage from '../PdfPage.jsx';
|
import PdfPage from '../PdfPage.jsx';
|
||||||
import ContentView from '../ContentView.jsx';
|
import ContentView from '../ContentView.jsx';
|
||||||
|
|
||||||
export default class NoOpTransformation extends Transformation {
|
export default class NoOp extends Transformation {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Original");
|
super("Original");
|
@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
|
|||||||
import PdfPage from '../PdfPage.jsx';
|
import PdfPage from '../PdfPage.jsx';
|
||||||
import ContentView from '../ContentView.jsx';
|
import ContentView from '../ContentView.jsx';
|
||||||
|
|
||||||
export default class RoundCoordinatesTransformation extends Transformation {
|
export default class RoundCoordinates extends Transformation {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("Round Coordinates");
|
super("Round Coordinates");
|
@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
|
|||||||
import TextPage from '../TextPage.jsx';
|
import TextPage from '../TextPage.jsx';
|
||||||
import ContentView from '../ContentView.jsx';
|
import ContentView from '../ContentView.jsx';
|
||||||
|
|
||||||
export default class ToSingleTextPageTransformation extends Transformation {
|
export default class ToSingleTextPage extends Transformation {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("To Single Text Page");
|
super("To Single Text Page");
|
@ -3,7 +3,7 @@ import PdfPage from '../PdfPage.jsx';
|
|||||||
import TextPage from '../TextPage.jsx';
|
import TextPage from '../TextPage.jsx';
|
||||||
import ContentView from '../ContentView.jsx';
|
import ContentView from '../ContentView.jsx';
|
||||||
|
|
||||||
export default class ToTextPagesTransformation extends Transformation {
|
export default class ToTextPages extends Transformation {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super("To Text Pages");
|
super("To Text Pages");
|
Loading…
Reference in New Issue
Block a user