mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2024-11-21 23:33:31 +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 NoOpTransformation from './transformations/NoOpTransformation.jsx';
|
||||
import RoundCoordinatesTransformation from './transformations/RoundCoordinatesTransformation.jsx';
|
||||
import CombineSameYTransformation from './transformations/CombineSameYTransformation.jsx';
|
||||
import NoOp from './transformations/NoOp.jsx';
|
||||
import RoundCoordinates from './transformations/RoundCoordinates.jsx';
|
||||
import CombineSameY from './transformations/CombineSameY.jsx';
|
||||
import RemoveRepetitiveElements from './transformations/RemoveRepetitiveElements.jsx'
|
||||
import ToTextPagesTransformation from './transformations/ToTextPagesTransformation.jsx';
|
||||
import ToSingleTextPageTransformation from './transformations/ToSingleTextPageTransformation.jsx'
|
||||
import ToTextPages from './transformations/ToTextPages.jsx';
|
||||
import ToSingleTextPage from './transformations/ToSingleTextPage.jsx'
|
||||
|
||||
// Holds the state of the Application
|
||||
export default class AppState {
|
||||
@ -16,12 +16,12 @@ export default class AppState {
|
||||
this.fileBuffer;
|
||||
this.pdfPages = [];
|
||||
this.transformations = [
|
||||
new NoOpTransformation(),
|
||||
new RoundCoordinatesTransformation(),
|
||||
new CombineSameYTransformation(),
|
||||
new NoOp,
|
||||
new RoundCoordinates(),
|
||||
new CombineSameY(),
|
||||
new RemoveRepetitiveElements(),
|
||||
new ToTextPagesTransformation(),
|
||||
new ToSingleTextPageTransformation()];
|
||||
new ToTextPages(),
|
||||
new ToSingleTextPage()];
|
||||
|
||||
//bind functions
|
||||
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() {
|
||||
super("Combine Text On Same Y");
|
@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
|
||||
import PdfPage from '../PdfPage.jsx';
|
||||
import ContentView from '../ContentView.jsx';
|
||||
|
||||
export default class NoOpTransformation extends Transformation {
|
||||
export default class NoOp extends Transformation {
|
||||
|
||||
constructor() {
|
||||
super("Original");
|
@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
|
||||
import PdfPage from '../PdfPage.jsx';
|
||||
import ContentView from '../ContentView.jsx';
|
||||
|
||||
export default class RoundCoordinatesTransformation extends Transformation {
|
||||
export default class RoundCoordinates extends Transformation {
|
||||
|
||||
constructor() {
|
||||
super("Round Coordinates");
|
@ -2,7 +2,7 @@ import Transformation from './Transformation.jsx';
|
||||
import TextPage from '../TextPage.jsx';
|
||||
import ContentView from '../ContentView.jsx';
|
||||
|
||||
export default class ToSingleTextPageTransformation extends Transformation {
|
||||
export default class ToSingleTextPage extends Transformation {
|
||||
|
||||
constructor() {
|
||||
super("To Single Text Page");
|
@ -3,7 +3,7 @@ import PdfPage from '../PdfPage.jsx';
|
||||
import TextPage from '../TextPage.jsx';
|
||||
import ContentView from '../ContentView.jsx';
|
||||
|
||||
export default class ToTextPagesTransformation extends Transformation {
|
||||
export default class ToTextPages extends Transformation {
|
||||
|
||||
constructor() {
|
||||
super("To Text Pages");
|
Loading…
Reference in New Issue
Block a user