rdmorganiser / rdmorganiser/rdmo
In views, define style / formatting so that it is propagated by Pandoc
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 133
- Forks
- 60
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 21
Description
Description / Beschreibung
Most funders require a DMP in PDF or DOCX format, which adheres faithfully to their own template (including text colour, titles, tables etc.)
In HTML, text formatting may be defined either on the place (e.g. <p style="">) or by referring to a CSS block, either at the beginning of the file (preferably within <head>) or in an external file.
RDMO tolerates a command <style type="text/css"> within the document body and correctly renders it within the HTML document. Yet the whole formatting is lost when exporting the document to another format.
A workaround is to use a reference-doc but that is not practical during development, as it requires to update the reference-doc often, which requires system-admin privileges on the test instance. Moreover, that would require two source files instead of one for each view.
Expected behaviour / Erwartetes Verhalten
There should be a way to add a CSS script at the beginning of the HTML-Django source file, to define formatting centrally for the whole document.
Alternatively/Complementarily, a way to make visible the Pandoc options regulating the conversion from HTML to other formats (-t, -css).
Steps to reproduce / Schritte zum Reproduzieren
- Go to RDMOcat and open a sample view of a sample project: it is well formatted.
- Export it as a DOCX or PDF.
- Open the exported file.
- The formatting is lost!
References / Verweise
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Django view templates and the Pandoc export path for HTML-to-PDF and DOCX conversion; the issue names no specific files. Check how inline or centralized style blocks and Pandoc options are currently handled, then verify that one view preserves its formatting in both export formats without a separate reference document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, django, html, python
- Domain
- backend, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100