Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎁 Service to split previously ingested pdf #292

Closed
wants to merge 3 commits into from

Conversation

laritakr
Copy link
Contributor

@laritakr laritakr commented Nov 20, 2023

Note: This is currently an untested WIP but is based on two known working pieces.

Story

This creates a new service which combines:

  • IiifPrint::SplitPdfs::DestroyPdfChildWorksService
  • IiifPrint::Jobs::ChildWorksFromPdfJob

Beginning with a PDF fileset, it removes any existing child works (found by either the fileset ID or the title), any pending relationship table entries (found by parent id and fileset ID), and then submits a new job to do the pdf splitting.

Note that pending relationship entries will not be removed if they don't have the file_id (which is the id of the fileset that spawned them). This is to avoid removing pending relationships that could still be needed for another fileset on the parent work.

Ref #294

This creates a new service which combines:
- IiifPrint::SplitPdfs::DestroyPdfChildWorksService
- IiifPring::Jobs::ChildWorksFromPdfJob

Beginning with a PDF fileset, it removes any existing child works (found
by either the fileset ID or the title), any pending
relationship table entries (found by parent id and fileset ID), and then
submits a new job to do the pdf splitting.

Note that pending relationship entries will not be removed if they don't
have the file_id (which is the id of the fileset that spawned them). This
is to avoid removing pending relationships that could still be needed for
another fileset on the parent work.
jeremyf added a commit that referenced this pull request Nov 27, 2023
For applications that have already installed IiifPrint, you'll need to
manually add the following to your `config/routes.rb` file:

```ruby
mount IiifPrint::Engine, at: '/'
```

Related to:

- #292
- #294

Co-authored-by: LaRita Robinson <[email protected]>
jeremyf added a commit that referenced this pull request Nov 27, 2023
For applications that have already installed IiifPrint, you'll need to
manually add the following to your `config/routes.rb` file:

```ruby
mount IiifPrint::Engine, at: '/'
```

Related to:

- #292
- #294

Co-authored-by: LaRita Robinson <[email protected]>
@jeremyf
Copy link
Contributor

jeremyf commented Nov 27, 2023

Favor #302 instead.

@jeremyf jeremyf closed this Nov 27, 2023
jeremyf added a commit that referenced this pull request Nov 28, 2023
For applications that have already installed IiifPrint, you'll need to
manually add the following to your `config/routes.rb` file:

```ruby
mount IiifPrint::Engine, at: '/'
```

Related to:

- #292
- #294

Co-authored-by: LaRita Robinson <[email protected]>
@jeremyf jeremyf deleted the service-to-split-pdf-from-fileset branch February 23, 2024 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants