Skip to content

Instantly share code, notes, and snippets.

View felixvd's full-sized avatar

Felix von Drigalski felixvd

  • Mujin Inc.
  • Tokyo, Japan
View GitHub Profile
openapi: 3.0.0
servers:
- url: 'http://petstore.swagger.io/v2'
info:
description: >-
This is a sample server Petstore server. For this sample, you can use the api key
`special-key` to test the authorization filters.
version: 1.0.0
title: OpenAPI Petstore
license:
@felixvd
felixvd / autodoc-myst-parser-bug.md
Created June 15, 2022 07:11
Content to reproduce a bug in MyST-Parser

With rST

This command will be rendered normally:

.. autoclass:: sphinx.util.docfields.Field
    :members:
    :noindex:
@felixvd
felixvd / drawioGettext.py
Last active September 11, 2024 08:40
Read draw.io diagrams in Python and read/write text fields
#!/usr/bin/python3
# Provides gettext-like functionality for drawio files:
# - Extract translatable strings from drawio diagram files (svg, png, xml) to PO files
# - Replace translatable strings in drawio diagram file with translations from a PO file
# - Regenerate the diagram in another language
# Reads .drawio.svg or .drawio.xml file, prints (or modifies) the `value` fields of the diagram, then writes a new file.
# Only changes the metadata, not the SVG. Use drawio to generate the SVG from the new metadata, e.g.:
# drawio -x -e -f svg -o regenerated.drawio.svg changed.drawio.svg
<mxfile host="app.diagrams.net" modified="2022-08-08T00:21:03.699Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" etag="Ew5GSj-MdiIKkWVcNSuW" version="20.2.3" type="device"><diagram id="Cpf80pf9YbQiV9m7Jv06" name="Page-1">dZNNU8MgEIZ/DcfMENC2HrWJ9aKX6Hh0aNgGlIQMoSbtrzcpkI+pncmBffZdWN4liG7LbmdYLV41B4UI5h2iCSIkviMEDR/mJ0fWa+pAYST3oglk8gweYk+PkkOzEFqtlZX1Eua6qiC3C8aM0e1SdtBqeWrNCrgCWc7UNf2U3ApHN/d44i8gCxFOjrHPlCyIPWgE47qdIZoiujVaW7cquy2owbzgi6t7vpEdGzNQ2X8K9P578INgxfb9TC6CtCqUbISrvPAvqKKP7GaWQ5SkLpvA0Ta5z4Ym+NuZKmItfuCHolo9vv9EWRSPlxubbuwpGNoKaSGrWT7Ebf9oEH0Sthw6jPul2/8XjIXu5kXnJ+xAl2DNqZf4Ahoc90+ObHzcTgOMg0bMhrfyjPk3U4xbT7b2C3+rEHqjQzgN9CKd/RY0/QM=</diagram></mxfile>