Feature Request: Add DJVU Support to Logseq
Description:
Logseq currently lacks support for DJVU file format, which poses a limitation for users who have documents in DJVU format instead of PDF. While it’s possible to manually insert screenshots or clipped images from DJVU files into Logseq, it would greatly enhance the user experience if Logseq directly supported DJVU files.
Suggested Solution:
I came across a promising project called djvujs (GitHub - RussCoder/djvujs: DjVu.js is a program library for working with .djvu files online without any connection with the server. DjVu.js Viewer is a widget that allows viewing .djvu files right in the browser and can be easily embedded into any web page.), developed under Node.js. It would be beneficial to explore the possibility of integrating this project into Logseq, enabling DJVU support. By integrating djvujs, Logseq could provide users with the ability to view and interact with DJVU documents directly within the application.
Implementation Steps:
-
Evaluate the djvujs project: Familiarize yourself with djvujs, understand its functionalities, and ensure it works as a standalone Node.js application.
-
Identify integration points: Examine the Logseq codebase to determine where DJVU support should be added. This may involve modifying existing code or developing a plugin system to accommodate djvujs.
-
Adapt djvujs to Logseq: Adjust the djvujs codebase to fit within the Logseq architecture, considering aspects such as file uploading, rendering DJVU content, and interacting with the DJVU viewer.
-
Implement integration: Incorporate the necessary changes to Logseq’s codebase or develop a Logseq plugin to integrate djvujs seamlessly. Ensure the integration aligns with Logseq’s design principles and maintains stability.
Community Engagement:
Engaging with the Logseq community or reaching out to the official development team would be valuable during the integration process. Seeking feedback and guidance from the community can provide insights into existing plans, ongoing developments, or alternative approaches for supporting DJVU in Logseq.
Considerations:
Integrating third-party libraries into an existing application can be complex, particularly when the library wasn’t originally designed for such integration. While this feature request offers a potential solution, it’s essential to recognize the development effort required and carefully assess the impact on Logseq’s stability and user experience.
Additionally, exploring Logseq’s existing documentation and plugin system thoroughly may unveil alternative ways to extend Logseq’s functionality without directly modifying the source code.
By addressing the lack of DJVU support in Logseq, users will have a more comprehensive tool for organizing and interacting with their documents, enhancing the overall utility and versatility of the Logseq platform.