Package: dbnomics-pptx-tools
DBnomics PowerPoint (pptx) toolsThis CLI tool allows to update data coming from DBnomics in PowerPoint presentations.ExampleSee thesamples directoryUsageFirst, define a YAML metadata file describing the charts and tables on each slide to update.Read themetadata filesection below for more details.Take inspiration from the samplesimple_presentation_1.yamlfetchcommandThis 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-pptxfetchsamples/simple_presentation_1.yamlUse the-voption to display debug messages.By default, the series that always downloaded, even if they are already present in the cache directory.
Use the--resumeoption otherwise.save-data-archivecommandThis command creates a ZIP archive of the series used to update the presentation (cfupdatecommand).dbnomics-pptx-vsave-data-archivesamples/simple_presentation_1.yamlseries.zip
unzip-tseries.zipArchive:series.ziptesting:OECD/KEI/NAEXKP01.DEU.GP.A.csvOKtesting:OECD/GDP_GROWTH/W.Eurozone.tracker_yoy.csvOKtesting:OECD/KEI/NAEXKP01.EA20.GP.A.csvOKtesting:OECD/KEI/NAEXKP01.FRA.GP.A.csvOKtesting:OECD/GDP_GROWTH/W.USA.tracker_yoy.csvOKtesting:OECD/KEI/NAEXKP01.ITA.GP.A.csvOKNoerrorsdetectedincompresseddataofseries.zip.updatecommandThis 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-pptxupdatesamples/simple_presentation_1.pptx--metadata-filesamples/simple_presentation_1.yamlsamples/simple_presentation_1.output.pptxUse the-voption to display debug messages.Metadata fileHere 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 DBnomicsname:United States-id:OECD/GDP_GROWTH/W.Eurozone.tracker_yoyname:Eurozonetables:EU_GDP:# the ID of the table (as defined in the "Selection pane")series:-id:OECD/KEI/NAEXKP01.EA19.GP.Aname:Euro Area-id:OECD/KEI/NAEXKP01.DEU.GP.Aname:Germany-id:OECD/KEI/NAEXKP01.FRA.GP.Aname:France-id:OECD/KEI/NAEXKP01.ITA.GP.Aname:ItalySlide IDTo 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 syntaxslide_id:xxxwherexxxis to be replaced with the real value. For example, in the YAML file above, the slide ID isAE_GDP, so we expect the corresponding slide notes to contain the stringslide_id:AE_GDP.Chart and table IDThe 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:Manage objects with the Selection paneThe PowerPoint Selection Pane