Skip to main content

Developing the iText Publishing Tool - 2015/16

Custom modules for GitLab integration and LeanPub export

We created a developer workflow to publish a code sample book from StackOverflow to LeanPub, using Drupal and GitLab

Developing the iText Publishing Tool - 2015/16

Custom modules for GitLab integration and LeanPub export
We created a developer workflow to publish a code sample book from StackOverflow to LeanPub, using Drupal and GitLab

We needed a work environment that would allow us to publish code samples stored in GitLab, to share responses in answer to questions on StackOverflow, to generate manuscripts that could be published as books on LeanPub. We knew that our project would only succeed if we found the right partner. (Bruno Lowagie, CEO iText)

iText developers and content authors needed a new approach to their then slow and tedious workflow

Developers and authors were:

  • manually copy-pasting code samples into Example pages
  • manually updating code samples when changes were pushed into GitLab
  • manually creating Leanpub-specific book content from Drupal pages

From GitLab to LeanPub using Drupal: a new workflow implemented

  • allowing authors to browse the GitLab repo from the Drupal interface
  • automatically embedding code samples from selected files
  • automatically updating code samples when content is saved
  • allowing automatic creation of Leanpub-specific book content from Drupal pages

With Pronovix, we found a partner who really listened to our needs, and who understood what we wanted: creating a website for a community of developers. (Bruno Lowagie, CEO iText)

Technical challenges solved

  • GitLab

    • Manage GitLab accounts from inside the Drupal interface. The accounts data is securely stored, thanks to the OpenSSL encryption.
    • Create a specific GitLab Field module to be able to link/use and display remote GitLab files at nodes.
    • Automatically generate changelog of a project in the given time interval from GitLab. The generated changelogs could be inserted to any content types' any text fields in plain-text or markdown format (new formats can be added easily)
  • Leanpub

    • Use Leanpub specific markdown syntax together with the plain markdown syntax, such as set table width or highlight the code by specifying its language using geshi filter.
    • Using the Drupal core’s Book module to generate the Leanpub specific book structure, which allows the Books to be exported from Drupal and to be imported into Leanpub.
    • Display the content created with the Leanpub text filter in Drupal the same way as the Leanpub generates it.

At iText, we wanted more than only having a website. It was a pleasure working with Pronovix. (Bruno Lowagie, CEO iText)

Newsletter

Articles on devportals, DX and API docs, event recaps, webinars, and more. Sign up to be up to date with the latest trends and best practices.

 

Subscribe