Skip to main content

DBnomics PowerPoint (pptx) tools

Project description

DBnomics PowerPoint (pptx) tools

This CLI tool allows to update data coming from DBnomics in PowerPoint presentations.

Usage

First, define a YAML metadata file describing the charts and tables on each slide to update.

For example see simple_presentation_1.yaml.

See the metadata file section below for more details.

The dbnomics-pptx CLI command provides 2 commands: fetch and update.

fetch command

This command reads all the series needed by the charts and tables of all slides in the YAML metadata file, deduplicate and download them in a cache directory, where they are stored as JSON files.

dbnomics-pptx fetch samples/simple_presentation_1.yaml

Use the -v option to display debug messages.

By default, the series that are already present in the cache directory are skipped, in order to avoid putting pressure on DBnomics servers. Use the --force option to always download them.

update command

This command takes a PowerPoint presentation file in input, and a YAML metadata file, and updates the charts and tables defined in the metadata file, then saves the result in an output presentation file (it does not modify the input one).

dbnomics-pptx update samples/simple_presentation_1.pptx --metadata-file samples/simple_presentation_1.yaml samples/simple_presentation_1.output.pptx

Use the -v option to display debug messages.

Metadata file

slides:
  My slide 1: # the title of the slide
    charts:
      My chart 1: # the name of the chart (as defined in the "Selection pane")
        series:
          - OECD/GDP_GROWTH/W.USA.tracker_yoy # simple form: the series ID
          - id: OECD/GDP_GROWTH/W.Eurozone.tracker_yoy # extended form: a map of the ID and the name of the series
            name: Eurozone
    tables:
      My table 1: # the name of the table (as defined in the "Selection pane")
        series:
          - OECD/KEI/NAEXKP01.EA19.GP.A
          - OECD/KEI/NAEXKP01.DEU.GP.A
          - OECD/KEI/NAEXKP01.FRA.GP.A
          - OECD/KEI/NAEXKP01.ITA.GP.A
series: # a map of properties for series, shared between all the charts and tables of all slides
  OECD/GDP_GROWTH/W.USA.tracker_yoy:
    name: United States
  OECD/KEI/NAEXKP01.DEU.GP.A:
    name: Germany
  OECD/KEI/NAEXKP01.EA19.GP.A:
    name: Euro Area
  OECD/KEI/NAEXKP01.FRA.GP.A:
    name: France
  OECD/KEI/NAEXKP01.ITA.GP.A:
    name: Italy

Series properties defined in charts of tables have a higher precedence level than the ones defines in the top-level series map (which act as a fallback).

For example, here the name of the series OECD/GDP_GROWTH/W.Eurozone.tracker_yoy is defined at the chart level, in "My chart 1" (the name is "Eurozone"), and it is not defined in the top-level series map. On the contrary, in "My chart 1", the named of the series OECD/GDP_GROWTH/W.USA.tracker_yoy is not defined, and will be found in the top-level series map, where it is defined as "United States".

How to know the names of the charts/tables?

The names of the charts and tables can be read or modified in the "Selection pane" in PowerPoint.

The "Selection pane" can be opened with Alt+F10 in PowerPoint. Then you just have to select a chart or a table, and it will highlight the corresponding line in the "Selection pane", showing its name.

You can also modify the name to improve readability.

Once you get the name of a chart or a table, you can put it in the YAML file. In the previous example, the names are "My chart 1" and "My table 1".

See also:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbnomics_pptx_tools-0.2.6.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

dbnomics_pptx_tools-0.2.6-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file dbnomics_pptx_tools-0.2.6.tar.gz.

File metadata

  • Download URL: dbnomics_pptx_tools-0.2.6.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.9 Linux/5.10.0-14-amd64

File hashes

Hashes for dbnomics_pptx_tools-0.2.6.tar.gz
Algorithm Hash digest
SHA256 6c35f8e3d69570be8d930de7c308d2e92cad5ef5ad28b65fd7511d5f8a7934bb
MD5 16360307dfc25ea1b2720d50ca9ede3e
BLAKE2b-256 b9c771c98bd2fe2b7049751803c1aebd9e68343c59a5857d90cca630ac3671c3

See more details on using hashes here.

File details

Details for the file dbnomics_pptx_tools-0.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for dbnomics_pptx_tools-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f8a3e47a2bc01b787b16dbb30bec63969bf08414aa2022d5c19c39dadddee50f
MD5 6b4eda601e1c05ed48a027a7dfb6e268
BLAKE2b-256 99f8269298a213d23d64ee8daffa50f7bdbd362b2357b0ed44dbbd64b97994da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page