{"id":17795175,"url":"https://github.com/matt-dray/wordup","last_synced_at":"2026-01-19T23:03:16.740Z","repository":{"id":219926727,"uuid":"653715577","full_name":"matt-dray/wordup","owner":"matt-dray","description":":page_with_curl::speaking_head: R package: Word to Govspeak [WIP]","archived":false,"fork":false,"pushed_at":"2024-01-30T11:02:04.000Z","size":64,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T13:36:17.005Z","etag":null,"topics":["govspeak","uk-gov-data-science","word","xml"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matt-dray.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-14T15:23:00.000Z","updated_at":"2023-10-08T09:22:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"19462dba-e94b-4b8e-9c6b-6f0ecf9c2e80","html_url":"https://github.com/matt-dray/wordup","commit_stats":null,"previous_names":["matt-dray/wordup"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matt-dray/wordup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-dray%2Fwordup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-dray%2Fwordup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-dray%2Fwordup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-dray%2Fwordup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matt-dray","download_url":"https://codeload.github.com/matt-dray/wordup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matt-dray%2Fwordup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28588969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["govspeak","uk-gov-data-science","word","xml"],"created_at":"2024-10-27T11:24:53.251Z","updated_at":"2026-01-19T23:03:16.722Z","avatar_url":"https://github.com/matt-dray.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# {wordup}\n\n\u003c!-- badges: start --\u003e\n[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)\n[![R-CMD-check](https://github.com/matt-dray/wordup/workflows/R-CMD-check/badge.svg)](https://github.com/matt-dray/wordup/actions)\n[![Blog post](https://img.shields.io/badge/rostrum.blog-post-008900?labelColor=000000\u0026logo=data%3Aimage%2Fgif%3Bbase64%2CR0lGODlhEAAQAPEAAAAAABWCBAAAAAAAACH5BAlkAAIAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAC55QkISIiEoQQQgghRBBCiCAIgiAIgiAIQiAIgSAIgiAIQiAIgRAEQiAQBAQCgUAQEAQEgYAgIAgIBAKBQBAQCAKBQEAgCAgEAoFAIAgEBAKBIBAQCAQCgUAgEAgCgUBAICAgICAgIBAgEBAgEBAgEBAgECAgICAgECAQIBAQIBAgECAgICAgICAgECAQECAQICAgICAgICAgEBAgEBAgEBAgICAgICAgECAQIBAQIBAgECAgICAgIBAgECAQECAQIBAgICAgIBAgIBAgEBAgECAgECAgICAgICAgECAgECAgQIAAAQIKAAAh%2BQQJZAACACwAAAAAEAAQAAAC55QkIiESIoQQQgghhAhCBCEIgiAIgiAIQiAIgSAIgiAIQiAIgRAEQiAQBAQCgUAQEAQEgYAgIAgIBAKBQBAQCAKBQEAgCAgEAoFAIAgEBAKBIBAQCAQCgUAgEAgCgUBAICAgICAgIBAgEBAgEBAgEBAgECAgICAgECAQIBAQIBAgECAgICAgICAgECAQECAQICAgICAgICAgEBAgEBAgEBAgICAgICAgECAQIBAQIBAgECAgICAgIBAgECAQECAQIBAgICAgIBAgIBAgEBAgECAgECAgICAgICAgECAgECAgQIAAAQIKAAA7)](https://www.rostrum.blog/2023/06/21/wordup-tables/)\n\u003c!-- badges: end --\u003e\n\n## Purpose\n\nConvert a Microsoft Word document (docx) to [Govspeak Markdown](https://www.gov.uk/guidance/how-to-publish-on-gov-uk/markdown), which is the format required to publish on [GOV.UK](https://www.gov.uk/).\n\nThis package is a personal project for learning purposes. It may never be finished and has no guarantees.\n\n## Motivation and scope\n\nProducers of [statistical publications](https://www.gov.uk/search/research-and-statistics?content_store_document_type=statistics_published\u0026order=updated-newest) might draft their reports in docx format. Publishers need to convert these to Govspeak Markdown so they can be uploaded to the Government's publishing platform. This can be time consuming to do manually and there is potential for error. There's a [Govspeak converter tool](https://govspeak-preview.publishing.service.gov.uk/), but there's some missing functionality, such as handling images and tables.\n\n## Installation\n\nThe package is available from GitHub. It isn't stable.\n\n```{r eval=FALSE}\ninstall.packages(\"remotes\")  # if not yet installed\nremotes::install_github(\"matt-dray/wordup\")\n```\n\nHere's the list structure of an example `word/document.xml` from an unzipped docx file.\n\n```{r}\nlibrary(wordup)\npath \u003c- system.file(\"examples/simple.docx\", package = \"wordup\")\nbody_list \u003c- wu_read(path)\nstr(body_list, give.attr = FALSE, max.level = 3)\n```\nWe can delve into this structure to retrieve text, etc.\n\n```{r}\nbody_list$document$body[[5]]\n```\nHopefully {wordup} will get functions to grab text and styles, apply Govspeak styling and then output a Markdown file. It could also convert images to SVG and insert anchor links for them.\n\n## Related\n\nThere are existing packages that can convert [R Markdown](https://rmarkdown.rstudio.com/) to Govspeak: \n\n* [{govspeaker}](https://github.com/best-practice-and-impact/govspeakr) (archived)\n* [{mojgovspeak}](https://github.com/moj-analytical-services/mojspeakr)\n* [{rgovspeak}](https://github.com/Defra-Data-Science-Centre-of-Excellence/rgovspeak)\n\nFor handling Word documents in R:\n\n* [{officer}](https://davidgohel.github.io/officer/) can read a Word document to a tidy table\n* [{docxtractr}](https://github.com/hrbrmstr/docxtractr) can extract tables, comments and other things\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt-dray%2Fwordup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatt-dray%2Fwordup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatt-dray%2Fwordup/lists"}