Jump to content

Create Topic with Seeq-API and fill with dynamically created documents / pages


hanskanns

Recommended Posts

I´m planning to do the following but I´m not sure if this is feasable via the seeq Rest api and Python

There is a Seeq "Template" (a monthly Report) -> a Organizer Topic with 1 Page (document).
Within this document are some data-ranges defined and there are some text fields (with f.e. the Name of the regarding month)

If a new month begins, python will have the name of the just finished month together with the data ranges.

Now can this be automated via the seeq-rest-api: ?
Use the "Template" document and create a new document in another Organizer Topic, rename it, modify the data-ranges,
automatically update the linked seeq content of the page and rename some text fields (with f.e. the Name of the regarding month)
As far I know, there is only the Date Ranges Variables in the Org. Topic, so I guess it is difficult to update the text fields.

Link to comment
Share on other sites

  • Administrators

To change the text in a document you would need to alter the HTML. It could probably be automated with spy.workbooks but it would be a lot of work. Also, if you wanted to copy the report and reuse it you would need to create a new script or make an addition to the script to separately handle the HTML for the new topic since they won’t be the same.

I am not sure what version you are on but in newer versions you have the ability to make a date range as a text label. This feature might be what you are looking for. See screenshot below.

image.png

Link to comment
Share on other sites

  • 3 months later...
  • Seeq Team

There is a new capability in SPy version 184.12 (released today to PyPI) called Workbook Templates that I believe fits the bill for what @hanskanns wants to do.

To see it in action, you'll need to install the new version of SPy using the instructions at https://pypi.org/project/seeq and then get the updated documentation by doing

spy.docs.copy()

Then you'll see a new documentation notebook called Workbook Templates.ipynb that will walk you through it. You can put some "placeholders" for text fields that you want to replace using syntax like

{{MyTextField}}

in your Organizer Topic.

If you end up trying it, let us know if you have any problems getting it to work.

image.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...