Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanlucut committed Sep 23, 2023
1 parent 4995b34 commit 61eb07c
Show file tree
Hide file tree
Showing 8 changed files with 800 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .run/[Local] Run converter.run.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="[Local] Run converter" type="NodeJSConfigurationType" node-parameters="--require ts-node/register" path-to-js-file="runner.ts" working-dir="$PROJECT_DIR$">
<configuration default="false" name="[Local] Run converter" type="NodeJSConfigurationType" node-parameters="--require ts-node/register --require dotenv/config" path-to-js-file="runner.ts" working-dir="$PROJECT_DIR$">
<envs>
<env name="DOTENV_CONFIG_PATH" value="./.env.local" />
<env name="FORCE_RELEASE_OF_ALL_SONGS" value="true" />
</envs>
<method v="2" />
</configuration>
</component>
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,11 @@ cd proto
protoc --decode rv.data.Presentation ./presentation.proto < ~/Documents/ProPresenter/Libraries/Default/TEMP.pro > ../TEMP_decoded_from_propres7.txt
```

#### Decode a single win presentation file called `TEMP.pro` to `TS`

```unix
cd proto
protoc --decode rv.data.Presentation ./presentation.proto < ../win-debug/TEST_TEMPLATE_3.pro > ../win-debug/TEST_TEMPLATE_3.txt
```
7 changes: 4 additions & 3 deletions runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ const CONFIG = {
arrangementName: 'BES',
ccliSettings: {
publisher: 'Biserica Emanuel Sibiu',
author: 'Ioan Lucuț',
author: 'Echipa Versuri',
copyrightYear: new Date().getFullYear(),
album: `Biserica Emanuel Sibiu ${new Date().getFullYear()}`,
songNumber: 0,
} as Presentation_CCLI,
fontConfig: {
name: 'CMGSans-Regular',
name: 'CMGSans-BoldCnCAPS',
size: 58,
family: 'CMGSans',
bold: true,
family: 'CMG Sans Cn CAPS',
face: 'Bold',
} as Graphics_Text_Attributes_Font,
graphicSize: {
width: 1920,
Expand Down
2 changes: 1 addition & 1 deletion src/converterService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const getConvertedAndWrittenToLocalOutDirSongs = (
const songInProPresenter7Format = convertSongToProPresenter7(song, config);

const songFileName = fileName.replace(TXT_EXTENSION, PRO_EXTENSION);
const songFilePath = path.join(dir, fileName);
const songFilePath = path.join(dir, songFileName);

fs.writeFileSync(
songFilePath,
Expand Down
2 changes: 1 addition & 1 deletion src/gDriveConverterRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const convertSongsToPP7FormatRemotely = async ({

if (process.env.FORCE_RELEASE_OF_ALL_SONGS === 'true') {
console.log(
`[Remote]: Force release of all songs from GH. Skip incremental deployments by doing a full deployment. Please proceed with applying the theme.`,
`[Remote]: Force release of all songs from GH. Skip incremental deployments by doing a full deployment. Please proceed with applying the theme.`,
);

await uploadSongsAndManifestToGDrive(
Expand Down
12 changes: 12 additions & 0 deletions src/localConverterRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ export const convertSongsToPP7FormatLocally = async ({
// Create directory
fsExtra.ensureDirSync(deploymentVersionedDir);

if (process.env.FORCE_RELEASE_OF_ALL_SONGS === 'true') {
console.log(`Just debug.`);

getConvertedAndWrittenToLocalOutDirSongs(
deployableSongs,
deploymentVersionedDir,
config,
);

return;
}

fs.writeFileSync(localManifestFilePath, JSON.stringify(currentManifest));

// ---
Expand Down
Binary file added win-debug/TEST_TEMPLATE_3.pro
Binary file not shown.
Loading

0 comments on commit 61eb07c

Please sign in to comment.