How to have summary API in my own wikidata - summary

I would like to have the summary API to show in the tooltip just like in wikipedia page.
The example could be
https://en.wikipedia.org/api/rest_v1/page/summary/Fixed_point_(mathematics)
But then this is not one of the default end point. Is there any extension out there I have to install? Or this one is a custom one? The goal is to get a small part of text and image if available

Related

Google Sheet & App Script : how to get image from a link preview?

I am trying to reproduce a RSS reader like Feedly with Google Sheet and displaying with Glide as an app on my mobile phone.
Everything's fine with IMPORTFEED() function with titles, description, URL.
But it seems this function doesn't allow pictures to be displayed even if they are in the feed (which is not all the time).
So I am looking for a way to extract the main image from a blog post... the one displayed when you hover on a link in a Google Sheet cell.
I would like to get the link of that image displayed in the link preview and put that link in another cell.
Here is an example:
I tried IMAGE()
and also IMPORTXML when there is an image in the RSS feeds (but not all of them do... so I stopped)
Is it possible in Google Sheet to get the main image from the one displayed in the link preview ?
For instance, one of the blog I want to extract the main picture of a blog article would be Creajv (URL : https://creajv.com/ ; Feed : https://creajv.com/feed/)
So the IMPORTFEED() function I did in Google Sheets was :
=IMPORTFEED("https://creajv.com/feed/";"items";FALSE;3)
Which stands for :
=IMPORFEED(...) the function to import feeds from an URL
"items" the way to pull every data there is in the feed (you can use other parameters and can see all the possibilities on the GoogleFormulas documentation)
FALSE because I don't want the headers to be included
and the number 3 because I want only the last 3 results displayed.
And it displays perfectly : author, description, URL, date
But I did a little digging in Google and found that basically IMPORTFEED() cannot get images from feeds, even if it is added by the author of the blog (he has to add a feature to do it).
So I am now trying to see if there is another way which is not IMPORTFEED() to get every time the main image of a blog post.
And I saw Google Sheet is able to pull instantly it when I copy paste the URL of a blog article within a cell for instance for Creajv :
Print screen of the image I get when I click in the cell which contains the post URL
So my thoughts would be that I can pull the author, date, description etc. with IMPORTFEED (which works perfectly every time) and use a formula on the cell with the URL to get in another cell the URL of the picture pulled from the one in the link preview.
Two other possibilities might also be with Google App Script :
creating with the App Script a custom function
or creating a script pulling the image in a cell every time a new row is added via the IMPORTFEED() function.
Functions only, as Apps Script doesn't run on mobile Apps
How about this solution? I checked the website and inspected the image from the thumbnail.
Luckily, the structure is simple:
<div class="article-image">
<img src="https://creajv.com/wp-content/uploads/2020/11/HighresScreenshot00000.png" alt="Concours de Level Design avec Unreal Engine, du 11/11 au 05/12/2020">
</div>
You can get the url with IMPORTXML, and apply IMAGE to it:
=IMAGE(ImportXml("https://creajv.com/2020/11/08/concours-de-level-design-avec-unreal-engine/", "//div[#class='article-image']//img/#src"))
Since you are already retrieving the post url with your previous formula, change the source url by the correspondent cell:
=IMAGE(ImportXml(C1, "//div[#class='article-image']//img/#src"))
For example:

Create Index page for ASCII doc

I have a lot of ASCII docs at different locations and I want to create an index page which should render these documents. But the condition here is that I want to list all the document link on the index page and if the user clicks on any link then only the document should be displayed. I don't want to display the documents below the table of content. I just want to display the table of content on the index page.
Is there any way to do this?
If I understand you correctly, you wish to generate a multi-document website, but you want an index page that displays just the TOC, with the other documents served elsewhere. I believe the best way to get this effect would be to generate chunked XHTML output using the DocBook toolchain. I believe this should be possible with Asciidoctor tools, but I have only implemented this particular post-rendering toolchain with the original (Python-based) AsciiDoc rendering tool, as documented here. This setup is configurable to generate a TOC index page that links to chunked output (you can configure the level of chunking).
As you have already figured out, AsciiDoc's automated TOC generation only works on the present document, which requires including the subordinate document to get their headings for the TOC. I can think of ways to sort of game this, such as to include just the heading of the included document (include::path/to/document.adoc[lines=1]) and then hiding even those headings with CSS or something. The problem is, the links in the TOC will be pointing internally, so you'd need to handle that somehow.
Another way is to use any of the static-site generators that support or can be readily extended to support AsciiDoc. What you're talking about is not an out-of-the-box feature that I'm aware of, but they all at least make it possible to generate an organized TOC-type navigation.

Inserting a hyperlink in a TASK in Dynamics CRM 2013. Hyperlink does not render as HTML hyperlink

Using {Record URL(Dynamic)(Entity Name)} I have inserted it as part of system requirments into the "Description" of a TASK Activity.
But the URL does not render as a HTML hyperlink.
I have also tried using the <hyperlink> tag. But this does not work.
(Important Note : I heard notice this is achievable in an Email
Activity with the Record URL(Dynamic)(Entity Name) attribute. But I am
trying to achieve this in a Task Activity.)
Sample example of code in Workflow that creates this task is the Text given below:
..... project record, available here: {Record URL(Dynamic)(Entity Name)}.
We are using CRM 2013 for this cutomization and configuration.
Can you tell me what I am doing wrong and what I need to change to achieve this feature.?
Unlike email, the Description field of Tasks is plain text and doesn't support hyperlinks. Adding a formula to the task description will just display the formula text, not calculate it or generate a hyperlink.
If you need a link from a task to a specific record, add a custom lookup field to that entity. Another option would be to add an HTML Web Resource where you could show rich HTML with hyperlinks, but you'll need to create its content (with the link) on your own, no formula will generate the content for you.

Add Tripadvisor Review as Rich Snippet

I've read a bit about rich snippets and I'm interested in the reviews part.
Is there a way to add the TripAdvisor aggregate reviews dynamically as a rich snippet without "hard-coding" the number of stars and a review?
From what I've read rich snippets are not dynamic, so I can't add a link or a tag for example, that would automatically just load my star ratings and the text of the latest review (just like a widget would do).
Is there?
The site is created in Joomla and I've installed J4Schema to add rich snippets.
Figured it out eventually.
Rich snippets are currently a "manual thing". Meaning that you will insert them by hand in your code, and you can reference TripAdvisor externally, but this will not create a link to the TripAdvisor account.
Google, at some point (in my case, after 6-8 months) will process these rich snippets, and will show them for the search result in question.
Also, a periodic update of these snippets is to be maintained to insure relevance.

Retrieve the content of a section via MediaWiki API

I have a MediaWiki page set up in my company's intranet.
I would like to get the content of a section in a specific page using MediaWiki API (through AJAX).
I would like to refer to the section by its title like 'General' and refer to the page by its title as well, like 'Licenses'.
Is it possible somehow?
The only thing I could achieve is referring to the page by its title and refer to the section by a number like this:
http://mywiki.local/wiki/api.php?format=xml&action=parse&prop=text&page=Licenses&section=1
But let's say I create a new section before 'General' I would have to update all my AJAX URLs that queries this page. So this isn't good enough.
I couldn't find any working solution for this. Any ideas?
You can do this by first retrieving prop=sections to get the list of sections and their numbers:
http://en.wikipedia.org/w/api.php?format=xml&action=parse&prop=sections&page=License
Then make your original request, with the section number you figured out based on the previous request.
Keep in mind that two different sections can have the same name.

Resources