Skip to content

darren8c/biblica-tpt-transformation-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typesetting Preview Service

License

  • License information can be found in the LICENSE.txt file within the project.

Configuration

  • Biblica OpenVPN required
  • Private IP: 10.20.2.4
  • Service Port: 9875
  • Username: Administrator
  • EC2 instance SSH Keypair: biblica-remote-dev-1-kp
  • ASP.NET 3.0

Project Setup

Development Environment

To build the Typesetting Preview Service, one will need the following:

  • Visual Studio 2019 and extensions
    • ASP.NET and web development
    • .NET desktop development
    • Universal Windows Platform development

Application Configuration

Typesetting Preview Service Settings

These are settings related to how the typesetting preview service behaves and for how it communicates with InDesign server. Location: Properties > serviceSettings.json

Parameter Description Example
InDesignServerUri The URL of InDesign Server servicce. http://10.20.2.4:9876/service
MaxConcurrentServerRequests The maximum number of requests that can be served at the same time. 4
PreviewScriptPath The path of the InDesign scripts located on the InDesign server. C:\Work\ Scripts\TypesettingPreviewRoman.jsx
PreviewOutputDirectory The location to store the generated previews. C:\Work\Output
MaxPreviewAgeInSec The age in seconds in which to keep previews around. 86400

Development settings

These are development related settings. Location: appsettings.json

Startup

  1. Start the EC2 intance biblica-toolbox-indesign-server Note: It'll take roughly a minute to startup
  2. RDP into the instance
  3. Run the "Relicense InDesign Server" shortcut located on the desktop Note: This is due to InDesign forgetting it's licensed upon restarting.

API

There's a REST API for requesting the generation, checking the status of, and download of typesetting previews.

For examples, see the postman collection Resources/Typesetting Preview Tool.postman_collection.json.

Operation VERB URL Payload
Request a typesetting preview. POST /api/PreviewJobs
  • projectName
Get information about a typesetting preview job. GET /api/PreviewJobs/{preview-job-guid}
Delete a typesetting preview job. DELETE /api/PreviewJobs/{preview-job-guid}
Download a typesetting preview. GET /api/PreviewFile/{preview-job-guid}

Building

Perform the Visual Studio Build Operations

Deployment

On the build machine

  1. Right-click the visual studio project tools-tpt-transformation-service
  2. Click "publish"
  3. First time publishing will require a publish profile be created
    1. Publish Target: Folder
    2. (Under advanced)
    3. Configuration: Release
    4. Target Framework: netcoreapp3.0
    5. Deployment Mode: Framework -Dependent
    6. Target Runtime: Portable
    7. Folder or File share: "choose target location"
    8. Click publsh
  4. Copy <project>/properties into the publish folder
  5. Zip up the publish folder
  6. Using RDP, copy the publish zip file to the Typesetting Preview server

On the build machine:

  1. Extract the zip contents to a temp location
  2. Open "Internet Information Services (IIS) Manager"
    1. Navigate to EC2AMAZ-H25RBUO > Sites > "TPT Service"
    2. Remove TPT Service
  3. Remove the contents of C:\Work\Service
  4. Copy the publish folder's contents to C:\Work\Service
  5. In ISS: 6. Right click "EC2AMAZ-H25RBUO > Sites" and click "Add Website" 7. For the settings: 8. Site name: TPT Service 9. Application Pool: TPTPool 10. Physical Path: C:\Work\Service 11. IP Address: All Unassigned 12. Port: 9875 13. Click OK

Logs

Logs for the Typesetting Preview Tool and InDesign are located in the Windows Event Viewer.

Navigate to "Event View" > "Windows Logs" > "Application.

Migrations

When a persisted model changes, use the Entity Framework Core Tools to create migrations and upate the database snapshot.

E.g. dotnet ef migrations add <migration name> to create a migration, or dotnet ef database drop && dotnet ef database update to use a fresh local database.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 98.3%
  • JavaScript 1.7%