manually edit JSON for extractor? - import.io

In import.io, is there any way to manually edit the JSON for the extractor? I can view it, but not edit. I can't get manual row training to work on a page. I created a striped-down version of the page, trained the rows, and can see the content of resultXPaths in the JSON, but there's no way to copy this to the extractor for the original page.

Silly me. All I had to do was make my own copy of the problem page, simplify the messy code so manual row training works, save the extractor, then point it at the original page.

Related

Why does the "I've got what I need" button sometimes not work in import.io?

I am using import.io and trying to create a crawler based on this page:
http://www.flashscore.com/match/IeHoEHvJ/#match-statistics;0
After selecting single rows (one row per page), and adding some columns and training them, I want to click on the button "I've got what I need!" in order to proceed and train another similar page. But it is not possible to click on the button, it is as if the program is waiting for me to train more even though it is not necessary (I have successfully completed this procedure on other website, but for some reason this page does not work).
Any idea why this does not work?
Please see the following screenshot of import.io when I am trying to click the button without success:
http://puu.sh/j5Vlm/fcc322549a.png
UPDATE: Got a reply from the import.io facebook group. Building a Crawler might not work due to robots.txt. But building an Extractor seems to work, only have to find an easy way to collect all the links to use in the extractor.
the website you're trying to scrape is probably protected by a robots.txt file so as the Facebook group told you I suggest you to try with Extractor.
The solution is a bit tricky but it should work.
Create an Extractor to grab the data you need from the page you want data from. I did it and it worked.
Create an Extractor to get the links: (Mine is here: 5ef25069-f0cc-4ac7-9184-b2a035277403) for this page
Then download the dataset as CSV, open it with a spreadsheet processor and add this string of text at the end of the link: #match-statistics;0
Finally copy the list of links and go back to import.io. Choose the feature Bulk Extract on the first API and paste the list of URLs.
It should work ;)

Modifying photosphere on website thing

What i am trying to do is to use a photosphere on my website so that it shows up on full screen as a website cover page. The problem is the the code to embed a photosphere in a webpage given here by google
https://developers.google.com/photo-sphere/web/
lets only the photosphere size to be hardcoded as
displaysize="600,400"
what ever the values but its still hardcoded. What i want is that it gets adjusted to the screen of the user and gets displayed in the whole browser window. Any one got an idea how to pull it off? I didn't find any stuff about 'photosphere on web' other than the google link i gave above.
Indeed the API is currently designed to take static values. I think it's a good point that users might want to set the dimensions to 100% and let it resize dynamically.
I put it on the TODO list and will try to get to it shortly.
In the meantime, one work around is the following: After the viewer loads you will find an iframe on the page which contains it. You can change it's dimensions dynamically to your liking and the viewer should adapt.
The API provided by Google wraps the whole photosphere in layers of iFrames.
You can use the API to request a certain photosphere but only use the response to parse it for the values you need. Then you create your own request and the result can be shown fullscreen.
An example link is this
I created this link dynamically from the JSON response from the elements
media$group media$content 0 url
Hope it helps.
Can't you take the raw image and just use webgl to project it on the inside of a sphere?

Combining a page map with a PDF so that annotations move with pages in updated PDFs

Has anyone managed to provide an end-user with an updated PDF, allowing that user to transfer his local annotations to the new PDF and keeping the annotations on the correct page, even when there are pages inserted into the update PDF at a point earlier in the PDF than the annotations.
I thought there might be a page map or page guid approach that someone has used.
Sorry - I hope that is clear.
Instead of using the page index as ID of the page, you can use the page content stream instead (after decoding/decompression). Most PDF libraries will give you access to that, so you could compute an MD5 hash from the page content and search for that instead on your "updated" file in order to know where to transfer your annotations.
This is assuming that the page content will be indeed identical, which is not a common scenario.

Content Editor not updating in Sitecore when I programatically update/add content

I am programatically adding/editing content in the master DB, and I know it saves correctly because if I run another 'app', I can see the content I created/updated.
However I can't see the content in the content editor. However if I go to the 'template' associated with the content I create/edited, and make a minor change, and save it. I get the message 'Updating content' which I expect to see... (it is applying the template change to the content).
Then I can see the content I created/edited...
So it appears that something needs to be triggered that modifying the template triggers that I am not.
Any ideas? Thank you.
Thanks for all the input. The issue is that the cache is not being cleared. Collapsing/Expanding the tree did not work. I literally had to clear the cache and it worked. Thank you all. Hope if anyone else has this issue, my answer helps them!
The content tree won't automatically update following external changes to the content structure (eg another user adding/deleting something under the node you are looking at). If you collapse and expand the parent node of where your content is programmatically created, that should be enough to show the newly created content.

Any way to predefine an image for flattr-things?

Is there any possibility to manually define an image for flattered things?
Or are there plans by the devs to implement this?
Specify the image using Open Graph metadata in the page that is submitted, like you do for eg. Facebook: http://ogp.me/
If you're using WordPress or such there's likely a plugin that you could use.
I just checked the API and there seems to be no way of defining the image upfront. Not with an auto-submit URL and not with the create-thing request.
Only thing I could find is once you created a thing, you can edit it using this URL:
https://flattr.com/thing/edit/<thing-id>
The form has a text field that is labeled Change image by providing an url. (will take some time to update). Enter a URL to an image.
I tried it and it took about 30 secs to update.