How to export contentful ERD - erd

I want to make ER diagram of my contentful space.Is there a way for the same .There is a option to get the table structure in JSON format .

There is no out of the box feature to get your content structure in an ER format. You could however easily pull down your entire content structure in JSON by making a request similar to this:
https://cdn.contentful.com/spaces/YOURSPACE/content_types/?access_token=YOURACCESSTOKEN
This would result in a JSON response with your entire content type structure and you could then parse this into an ER model however you please.
If you specifically want the JSON-schema for entries, content types etc. they are available in the documentation that you can find here: https://www.contentful.com/developers/docs/references/content-delivery-api.
Just click on the sample for any request and there's a small button to show the JSON schema:

The same issue came up for me recently. I also didn't find a satisfactory answer. So I wrote my own solution. The contentful-plantuml-generator executable converts a space's content model to a PlantUML diagram.
After installing it and plantuml. You can use it like this:
contentful-plantuml-generator <SPACE_ID> <ACCESS_TOKEN> \
| plantuml -pipe -tsvg \
> my-diagram.svg

Related

Customize IBM DiffMerge to export a custom Report

I am using IBM DiffMerge to generate a Report that shows all differences between two .cls files or .sbs files. I was playing with it and I saw that there is a filed in option menu that allows you to change the format of the report, but it implies some keywords, like $elemname to print the element's name or $elemtype to print its type $leftonly or $rightonly which show how many differences are in the left diagram or in the right one.
Now, I was wondering if there are more variables like those above, especially one that can print a component's GUID (unique ID in Rhapsody).
Thanks,
Daniel
I would expect that $GUID will give you what you're looking for.
Under the ReporterPlus installation folder there is a folder named Templates. In it you'll find a file named DiffReport.dpl which you can load it into ReporterPlus for editing like any other template. You must run Rep+ with a command line option so that it loads with the Diffmerge specific schema:
Reporter.exe /mode=dfm
After that you can load the Diffmerge template, and edit it to customize the output of DiffMerge reports. When you do, try adding $GUID into the output.
Regards, Simon

mvcgrid.net unable to use toolbar

I'm working on a website with a feature that can sort users.
I'm using mvcgrid.net libs but I can't figure it out. the toolbar doesn't work.
I used most of the basic source codes from mvcgrid.net but when i press something in the search bar it doesn't work or the items per page selection.
If you have specific code to take a look at, please post. Otherwise, here are a few things you can check:
(1) Be sure you've applied the mvcgrid data attributes needed. For example, for a search field you might have these attributes:
<input
type="search"
data-mvcgrid-apply-additional="change"
data-mvcgrid-type="additionalQueryOption"
data-mvcgrid-option="search"
data-mvcgrid-name="ContactGrid">
(2) Be sure the value you chose for mvcgrid-option (in this example, "search") is then added when you configure the grid. For example:
MVCGridDefinitionTable.Add("ContactGrid", new MVCGridBuilder<ContactViewModel>(defaults)
.WithAdditionalQueryOptionNames("Search")
...
(3) You then need to read the attribute (again in the grid config) in your .WithRetrieveDataMethod()
string search = options.GetAdditionalQueryOptionString("search");
I've forgotten step 2 in the past -- that's generally what has tripped me up.

Getting the right data from webpage

I am looking to extract some data from website:
http://www.delfi.lv/bizness/biznesa_vide/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5
from me it's valuable to get info like:
"<h3 class="ca56269332 comment-noavatar listh3 comment-noavatar-author">
vārds
</h3>"
In this example "ca56269332" and "vārds" are dynamic variables.
For me I want to achieve something like this:
"<h3 class="* comment-noavatar listh3 comment-noavatar-author">
*
</h3>"
where "*" means a dynamic value, and export in some kind of excel or data file.
Also I want to extract multiple pages, like:
/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5&no=0
/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5&no=20
/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5&no=40
ect.
Can anyone please share some valuable resources to achieve that, I know that you can make it with PHP file_get but I want easier solution because my goal is not to publish it to webpage but use as source for my study project as a data file.
How to EXTRACT dynamic data to AVOID saving EVERY page with ALL the useless information it contains and make it easier, avoiding to manually process large number of web comments?

Yahoo Pipes - Build an RSS-URL using specific parameters pulled from another RSS feed's content

The main Data Type used by Yahoo Pipes is the [Item], which is RSS feed content. I want to take an RSS's content or sub-element, make it into [Text] (or a number might work), and then use it as an INPUT into a [Module] to build a RSS-URL with specific parameters. I will then use the new RSS-URL to pull more content.
Could possibly use the [URL Builder Module] or some work-around.
The key here is using "dynamic" data from an RSS feed (not user input, or a static data), and getting that data into a Data Type that is compatible (and/or accessible) as an INPUT into a module.
It seems like a vital functionality, but I cannot figure it out. I have tried many, many work-around attempts, with no success.
The Specific API and Methods (if you are interested)
Using the LastFM API.
1st Method: user.getWeeklyChartList. Then pick the "from" (start) and "to" (end) Unix timestamps from 1 year-ago-today.
2nd Method: user.getWeeklyAlbumChart using those specific (and "dynamic") timestamps to pull my top albums for that week.
tl;dr. Build an RSS-URL using specific parameters from another RSS feed's content.
I think I may have figured it out. I doubt it is the best way, but it works. The problem was the module I needed to use didn't have and input node. But the Loop module has an input node, so if I embed the URL builder into the Loop module I can then access sub-element content from the 1st feed to use as parameters to build the URL for the 2nd feed! Then I can just scrap all the extra stuff generated by the Loop, by using Truncate.

Why is ImportXML not working for a specific field while trying to scrape kickstarter.com?

I am trying to screen scrape funding status of a specific Kickstarter project.
I am using following formula in my Google spreadsheet, what I am trying here is to get the $ amount of project's funding status:
=ImportXML("http://www.kickstarter.com/projects/1904431672/trsst-a-distributed-secure-blog-platform-for-the-o","//data[#class='Project942741362']")
It returns #N/A in the cell, with comment:
error: The xPath query did not return any data.
When I try using ImportXML on other parts of the same webpage it seems to work perfectly well. Could someone please point out what I am doing wrong here?
It seems that the tag "data" is not correctly parsed.
A choice of workaround may be:
=REGEXEXTRACT(IMPORTXML("http://...", "//div[#id='pledged']"), "^\S*")

Resources