Magnolia CMS: find references of any assets in all repositories

This Groovy code runs on any Magnolia CMS instance and helps you to find unused assets. It checks if an asset is linked within another repository.

It does not check if you link to an asset by URI. And of course it can not check if the asset is linked from somewhere else in the web.

import info.magnolia.module.dependencies.impl.DefaultDependencies
import info.magnolia.cms.beans.config.ContentRepository
import info.magnolia.cms.core.Content
import info.magnolia.cms.util.ContentUtil
import info.magnolia.cms.util.DumperUtil
import javax.jcr.Node;
session = ctx.getJCRSession("dam")
query = session.getWorkspace().getQueryManager().createQuery("select node.* from [mgnl:asset]", "JCR-SQL2")
// for debugging: start with a small amount if nodes
query.setLimit(100)
nodes = query.execute().getNodes()
dependencies = new DefaultDependencies()
// save the output to a file
File file = new File("/tmp/unusedAssets.txt")
def i = 0
def found = false
nodes.each { Node node ->
 for (workspace in ContentRepository.getAllRepositoryNames()) {
 // this is an optional whitelist of repositories
 if(workspace.startsWith("offer") || workspace.startsWith("product") || workspace.startsWith("website") || workspace.startsWith("rm-") || workspace.startsWith("category") || workspace.startsWith("resources") || workspace.startsWith("data")) {
 if(dependencies.getReferencesTo(node, workspace).isEmpty()) {
 found = true
 i++;
 // sleep every 20 nodes, otherwise the instance may be locked
 if (i % 20 == 0) {
 println(i)
 sleep(1000)
 }
 }
 }
 }
 // write node names to the file for later investigation
 if (found) {
 file << node.getPath()+"\r\n"
 found = false
 }
}
0

JIRA: Search Filter to find issues updates in the last 7 days

The query language in JIRA is able to use relative dates; using the issue properties like „updates“, „created“ etc. minus a numer of days.

project = X AND resolution = Unresolved and updated > -5d ORDER BY priority DESC, updated DESC

The notation „-5d“ is the shorthand for minus 5 days.

Web Frontend Development by Google

Da kann man sich gut mal eine Scheibe von abschneiden:

  1. Material Design Lite:
    • Material Design Lite lets you add a Material Design look and feel to your websites. It doesn’t rely on any JavaScript frameworks and aims to optimize for cross-device use, gracefully degrade in older browsers, and offer an experience that is immediately accessible.
    • Material Design Lite (MDL) is a library of components for web developers based on Google’s Material Design Philosophy: „A visual language for our users that synthesizes the classic principles of good design with the innovation and possibility of technology and science.“
    • www.getmdl.io
  2. Web Starter Kit:
  3. Web Fundamentals

Düsseldorf „Open Playground“ erfolgreich beendet

Düsseldorf Open Playground by Stöer
Düsseldorf Open Playground by Stöer

Neues von unserem #IoT-Projekt mit #Magnolia und Android:

„Der Open Playground hat gezeigt, dass von den durchschnittlich täglich 250.000 Bahnhofsbesuchern rund 40 Prozent Bluetooth aktiviert haben. Philips, Loreal, die Agentur t8y.com, die Sparkassen-Finanzportal GmbH und ein Softgetränkehersteller nutzten den Open Playground, um iBeacon Kampagnen in ihrer Zielgruppe zu testen.“

Tachty erhält den Ritterschlag zur Agentur 😉
Danke an Martin und Martin, es hat Spaß gemacht!

Düsseldorf „Open Playground“ erfolgreich beendet weiterlesen

Review: Magnolia Conference 2015 / Basel

Magnolia Conference 2015 is over – but you can relive the event with our videos and slides!

For videos, keep an eye on this playlist – you may find a talk with me speaking about the internet of things 😉
https://www.youtube.com/playlist/magnolia-congerence

For slides, search for mconf15 on SlideShare: http://www.slideshare.net/search/mconf15

‚webflow‘ wird Responsive-Design-wysiwyg-Editor

Mit ‚webflow‘ ist gerade ein neuer Page Editor in der Pipeline, der zum Ziel hat, anständiges responsive Design visuell erstellen zu können:

webflow – responsive design editor

Hier gehts zur Ankündigung: www.webflow.com

Vaadin 6.6.0 is here (there)

… Based on this, we have mobile device support with native look-and-feel coming up a little later. The TouchKit Add-on v2 is on its way and will follow Vaadin 6.6 next month. This release will bring you widgets that fit seamlessly first to IPhone and later releases will then support iPad and Android devices….

URL’s for Vaadin 6.6.0 aka „San Francisco“:

New Google Tool Tells You How to Make Your Site Faster

New Google Tool Tells You How to Make Your Site Faster.

Google has released Page Speed Online, a Google Labs project that analyzes any website for its speed and gives suggestions on how to improve it.

The experimental tool is straightforward to use; just type in a website and Google will come back with suggestions for how to improve that website’s speed. The suggestions are ranked as either High, Medium or Low. In addition, Google displays which rules of thumb a website is already following. Each website also gets an over score out of 100.“

via Mashable.