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
Here is a dummy file with made-up IDs to show how it is structured:
slides:
AE_GDP: # the ID of the slide (as defined in the slide notes, cf below)
charts:
US_EU_GDP: # the ID of the chart (as defined in the "Selection pane")
series:
- id: OECD/GDP_GROWTH/W.USA.tracker_yoy # the ID of the series on DBnomics
name: United States
- id: OECD/GDP_GROWTH/W.Eurozone.tracker_yoy
name: Eurozone
tables:
EU_GDP: # the ID of the table (as defined in the "Selection pane")
series:
- id: OECD/KEI/NAEXKP01.EA19.GP.A
name: Euro Area
- id: OECD/KEI/NAEXKP01.DEU.GP.A
name: Germany
- id: OECD/KEI/NAEXKP01.FRA.GP.A
name: France
- id: OECD/KEI/NAEXKP01.ITA.GP.A
name: Italy
Slide ID
To be updated, a slide must have been given an ID. As PowerPoint does not provide a way to assign one, we decided to use a special string in the slide notes, by using the syntax slide_id:xxx
where xxx
is to be replaced with the real value. For example, in the YAML file above, the slide ID is AE_GDP
, so we expect the corresponding slide notes to contain the string slide_id:AE_GDP
.
Chart and table ID
The IDs of the charts and tables can be read or modified from 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 ID.
You can also modify the ID to improve readability.
Once you get the ID of a chart or a table, you can put it in the YAML file. In the previous example, the IDs are "My chart 1" and "My table 1".
See also:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dbnomics_pptx_tools-0.2.17.tar.gz
.
File metadata
- Download URL: dbnomics_pptx_tools-0.2.17.tar.gz
- Upload date:
- Size: 58.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c73c7a64997b37d7206f7e3686165ed93f02e38672f2626756de67e681d4c20a |
|
MD5 | 1d83fe6a8b8d944bc932fde0aa94fad9 |
|
BLAKE2b-256 | 470d600129e5723ca2e35964dbfa8bfdca1f22147ace9a0615061b57054c6c55 |
File details
Details for the file dbnomics_pptx_tools-0.2.17-py3-none-any.whl
.
File metadata
- Download URL: dbnomics_pptx_tools-0.2.17-py3-none-any.whl
- Upload date:
- Size: 52.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e67dd13e39db9b8d9b6260f382b1a7240e812b73f6752317b7ad973ea485f52 |
|
MD5 | 16d34e07311d027b3534bc2f6c45870c |
|
BLAKE2b-256 | 7432124de67b756d29219ffc387695e884a1324bd9dd4f0ef74231966680414f |