1- import vegasEDL from "../src/vegasEDL/genVegasEDL" ;
2- import ResolevEdl from "../src/EDL/genEDL" ;
3- import FCPXML from "../src/FCPXML/genFCPXML" ;
4- import XML from "../src/XML/genXML" ;
1+ import { VegasEDL } from "../src/vegasEDL/genVegasEDL"
2+ import { ResolveEDL } from "../src/EDL/genEDL"
3+ import { FCPXML } from "../src/FCPXML/genFCPXML"
4+ import { XML } from "../src/XML/genXML"
5+
56import fs from "fs" ;
67import path from "path" ;
78
@@ -10,47 +11,49 @@ import path from "path";
1011let generators = { } ;
1112
1213
13- const project = JSON . parse ( fs . readFileSync ( path . join ( __dirname , "./test.json" ) ) . toString ( ) ) ;
14+ const project = JSON . parse ( fs . readFileSync ( path . join ( "JC-examples" , "./yoga.json" ) ) . toString ( ) ) ;
15+
16+ project [ "layers" ] [ 0 ] [ 0 ] [ "sourceFile" ] = "../JC-examples/yoga.mp4"
1417
18+ describe ( "generating vegasEDL for importing into Sony Vegas Pro" , ( ) => {
19+ it ( "should create a generator object that takes project as an argument" , ( ) => {
20+ let tmp = project ;
21+ generators [ "VegasEDL" ] = ( new VegasEDL ( tmp ) ) ;
22+ } ) ;
23+ it ( "generate a string representing a project in the EDL format Sony vegas supports" , ( ) => {
24+ fs . writeFileSync ( path . join ( __dirname , "./test.txt" ) , generators [ "VegasEDL" ] . generate ( ) ) ;
25+ } ) ;
26+ } ) ;
1527
1628describe ( "generating EDL for importing into DaVinci Resolve" , ( ) => {
17- it ( "should create a generator object that takes project as an argument" , ( ) => {
18- let tmp = project ;
19- generators [ "ResolveEDL" ] = ( new ResolevEdl ( tmp ) ) ;
20- } ) ;
21- it ( "generate a string representing a project in the EDL format" , ( ) => {
22- fs . writeFileSync ( path . join ( __dirname , "./test.edl" ) , generators [ "ResolveEDL" ] . generate ( ) ) ;
23- } ) ;
29+ it ( "should create a generator object that takes project as an argument" , ( ) => {
30+ let tmp = project ;
31+ generators [ "ResolveEDL" ] = ( new ResolveEDL ( tmp ) ) ;
32+ } ) ;
33+ it ( "generate a string representing a project in the EDL format" , ( ) => {
34+ fs . writeFileSync ( path . join ( __dirname , "./test.edl" ) , generators [ "ResolveEDL" ] . generate ( ) ) ;
35+ } ) ;
2436} ) ;
2537
2638
2739describe ( "generating FCPXML for importing into FinalCut Pro" , ( ) => {
28- it ( "should create a generator object that takes project as an argument" , ( ) => {
29- let tmp = project ;
30- generators [ "FCPXML" ] = ( new FCPXML ( tmp ) ) ;
31- } ) ;
32- it ( "generate a string representing a project in the FCPXML format" , ( ) => {
33- fs . writeFileSync ( path . join ( __dirname , "./test.fcpxml" ) , generators [ "FCPXML" ] . generate ( ) ) ;
34- } ) ;
40+ it ( "should create a generator object that takes project as an argument" , ( ) => {
41+ let tmp = project ;
42+ generators [ "FCPXML" ] = ( new FCPXML ( tmp ) ) ;
43+ } ) ;
44+ it ( "generate a string representing a project in the FCPXML format" , ( ) => {
45+ fs . writeFileSync ( path . join ( __dirname , "./test.fcpxml" ) , generators [ "FCPXML" ] . generate ( ) ) ;
46+ } ) ;
3547} ) ;
3648
3749
38- describe ( "generating vegasEDL for importing into Sony Vegas Pro" , ( ) => {
39- it ( "should create a generator object that takes project as an argument" , ( ) => {
40- let tmp = project ;
41- generators [ "vegasEDL" ] = ( new vegasEDL ( tmp ) ) ;
42- } ) ;
43- it ( "generate a string representing a project in the EDL format Sony vegas supports" , ( ) => {
44- fs . writeFileSync ( path . join ( __dirname , "./test.txt" ) , generators [ "vegasEDL" ] . generate ( ) ) ;
45- } ) ;
46- } ) ;
4750
48- describe ( "generating XML for importing into Sony Vegas Pro" , ( ) => {
49- it ( "should create a generator object that takes project as an argument" , ( ) => {
50- let tmp = project ;
51- generators [ "XML" ] = ( new XML ( tmp ) ) ;
52- } ) ;
53- it ( "generate a string representing a project in the EDL format Sony vegas supports" , ( ) => {
54- fs . writeFileSync ( path . join ( __dirname , "./test.xml" ) , generators [ "XML" ] . generate ( ) ) ;
55- } ) ;
51+ describe ( "generating XML for importing into Premiere Pro" , ( ) => {
52+ it ( "should create a generator object that takes project as an argument" , ( ) => {
53+ let tmp = project ;
54+ generators [ "XML" ] = ( new XML ( tmp ) ) ;
55+ } ) ;
56+ it ( "generate a string representing a project in the EDL format Sony vegas supports" , ( ) => {
57+ fs . writeFileSync ( path . join ( __dirname , "./test.xml" ) , generators [ "XML" ] . generate ( ) ) ;
58+ } ) ;
5659} ) ;
0 commit comments