Reading and writing Hippo content - hippocms

What is the best way to read and write Hippo content programmaticaly? I want to build a migration tool that writes some pages and binary files to Hippo. I am now using the JCR API to create nodes in the repo, is there any better approach?

Have you tried:
http://import-tool.forge.onehippo.org/
(you can checkout source code and use it as a reference if needed)
Another one you could check is:
https://forge.onehippo.org/svn/restimporter/
(no documentation other than:
https://forge.onehippo.org/svn/restimporter/trunk/README.txt
)
hth

Related

how can I execute a three.js example in my project folder?

How can I execute a three.js example in my project folder? The example I want to execute is this:
https://threejs.org/examples/webgl_animation_keyframes.html
.
After installing three.js through npm, I copied example's source code:
https://github.com/mrdoob/three.js/blob/master/examples/webgl_animation_keyframes.html
in my empty examples folder located at '/node_modules/three/examples'.
I think there's a path direction problem importing some of including library files such as
"import { RoomEnvironment } from './jsm/environments/RoomEnvironment.js';"
"loader.load( 'models/gltf/LittlestTokyo.glb', function ( gltf )"
etc.
Do I have to copy those library files and paste it on the right path by hand? I'm afraid this is not a correct solution. Is there a solution something like, as I wish, downloading all necessary library files in the right places by input some npm command?
The situation is certainly not ideal, but here are some tips:
You can clone the whole repository so you have all the resources used by the examples: git clone --depth=1 https://github.com/mrdoob/three.js.git
You can use a web browser's web page saving feature (Ctrl+S) but be sure to replace the HTML with the example's source HTML, because it will be much cleaner. You'll need to fix up file path references, and it may still miss some resources. Also make sure not to get the iframe containing page, but rather the demo itself.
If Save Webpage As misses some resources, you can use Chrome's dev tools Network tab. Refresh the page to populate it, then right click inside the table > Copy > Copy All as CURL. This will give you a command you can paste in your terminal (in an empty directory, ideally) to download all the resources used by the webpage. This can still miss some resources that are dynamically loaded, such as with 1. the model selector in the LDraw Loader example, in which case you could switch to each model to purposely populate the network requests table, or 2. a fallback for older browsers, in which case you may not be able to get it through this method.
It's much easier to remove features than to add and combine them, so try to find an example that uses as many of the things you want as possible (without being overwhelmingly complex). It's worth looking outside of the official examples to real projects and third party experiments. Just note that they may not be up to date with the latest APIs.
I hope someone writes a script to automate setting up a Three.js project from an example... and posts a better answer than this!

Extract changes from Wikipedia/Wikimedia revision pages

I have a simple query regarding the Wikimedia/Wikipedia API.
I have to fetch the changes made from a list of "revids". I am able to fetch the XML content for a batch of "revids", but I failed to extract only the changed text.
Does API provide any way to extract only the changed sentences? If not any external script/module that can do this job?
Query to fetch the revision details: https://en.wikipedia.org/w/api.php?action=query&prop=info|revisions&rvprop=user|userid|ids|tags|comment|content&format=jsonfm&revids=1228415
I would appreciate any suggestions/solutions that could solve this issue!
(Currently, I am using the Wikitools python module to make the queries)
You can get the diff between the old and new text with action=compare, but it segments text by wikitext lines, not sentences, isn't meant to be machine-readable, and is generally not that helpful. Since you are using Python, the client-side library deltas will probably work better for you.

Generation of migration files from ezplatform with kaliop

Using ezplatform with "kaliop/ezmigrationbundle": "^3.0".
I read and re-read the manual but cannot see anything about auto-generating yml files from exsiting content types; does anyone have any experience with this and happen to know if/where the docs might live?
We have a list of content types that were created in the backend via the gui and now we need to create migration files for them for better development with the dev team.
Update: This is available on v4+ https://github.com/kaliop-uk/ezmigrationbundle/issues/34#issuecomment-317524072#issuecomment-317524072
This is available on v4+ and answers the question
https://github.com/kaliop-uk/ezmigrationbundle/issues/34#issuecomment-317524072#issuecomment-317524072
I guess that is not how it works!
the bundle generate just an empty yaml file for you and you should fill up the content types (or any other Backend Changes you want) yourself in that yaml file and then take it and apply to your stage or Live Environment.
so unlike Symfony DoctorineMigrationBunlde, this bundle does not read the difference and produce stuff itself.

Alfresco web-scripts-application-context.xml

I want to register a bean. I'am following this tutorial http://aboutalfresco.blogspot.com/2010/07/java-backed-web-scripts.html.
But i can't found the file tomcat\webapps\alfresco\WEB-INF\classes\web-scripts-application-context.xml.
Is it deprecated ?
Should i create it ? or should i use the file alfresco\web-client-application-context.xml wich also define beans ?
What is the difference bettwen this 2 files ? Alfresco version?
I'm using Alfresco 5.0.d.
In Alfresco 5 many of the context files have been bundled up in jars that you won't be able to access.
Besides, best practice involves you creating your own custom context file rather than overwriting a system context file. Your best bet if you don't want to create an amp is to put your bean definition in a file named something like custom-webscripts-context.xml and putting it in shared/classes/extension. Alfresco will pick up anything that ends in -context.xml.
Also, please don't follow a 5 year old tutorial. The tutorials linked in the comments are created by Jeff Potts, the old Community Manager for Alfresco, so really are the most up to date and easiest to follow you're going to find.

Migrating Contents to Ektron

I am working in Ektron 8.6.
I need to migrate contents from Vignette CMS to Ektron.Is there is any option in ekron to automate the content migration process rather than doing it manually(creation of contents by fetching the HTML from other CMS)?
You need to use the Ektron API to add content. You will have to write that code yourself. The folders you use to organize your content in Ektron will be different from anyone else's. Also the way content is organized in Vignette is unique to your site so the import code has to be custom.
I have found that if you have fewer than 400 pieces of content it is easier to do it manually.