From patchwork Mon Feb 4 13:30:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1035923 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="H5+/azmZ"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43tT945zLHz9sCh for ; Tue, 5 Feb 2019 00:30:16 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AC4FC86FD3; Mon, 4 Feb 2019 13:30:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AsPnCry2fnNE; Mon, 4 Feb 2019 13:30:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 3C16B86F9E; Mon, 4 Feb 2019 13:30:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 299EE1BF3B1 for ; Mon, 4 Feb 2019 13:30:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 263D886D82 for ; Mon, 4 Feb 2019 13:30:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lFGnXWtfwHUo for ; Mon, 4 Feb 2019 13:30:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by whitealder.osuosl.org (Postfix) with ESMTPS id B19FE86F76 for ; Mon, 4 Feb 2019 13:30:09 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id b11so13217519wmj.1 for ; Mon, 04 Feb 2019 05:30:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id; bh=rNIkC6AHENifqCQD7pGkjka0WLgfeB7EhV8ovlimCyU=; b=H5+/azmZn9YxHAGmuO4A6G0YaG/36H7hrYVCBPg2Ir6Jsq/Q/eQd0NN2Xpr+Sh4E9w ScSB4hQ5myrK5Co8BL4228NfCdWdo5cpCPzESDVqnXUW6nsiRNgzsMI07VjWWoXRVlS8 aKOIILQqF+WF7XEsKjlZMLj+1LFi3oEvy2HBo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rNIkC6AHENifqCQD7pGkjka0WLgfeB7EhV8ovlimCyU=; b=aaBHbhc9sQJ3f8XrkLaJV3u1UEwvhYR8+8wSmRp58TTo3l4f2dCmBangbbO7+scSVU JqRvVZTutiEHFV9YeVnaNpChiPx00SfgEdE/lQlDhi3WRMX1PKDU1+iLZcukueiEaUQo btf69ahwg/RW/XZhe1WQSpuB3gQwDUg281X7sffI0fje54ZcYNGGu2jCc8TpBhzrVF0s IHT7WTHI3SGVVZ85EQ1nw5ygayo4FZJKiNs78BF95hX2U1wsK2oKKcxHRWN3VdM3x2vO n3NN3kgHyJRGe2mkvjMPAYwgM3NJ8eAa618T/Qi59AZGPq28Rp8RQT7KdRoKDon86pam U5BQ== X-Gm-Message-State: AHQUAub7SOjIeB0PfEjkW7+myFPVg2bJhARQNMHMQChlyPJBpmpV1cDc DUxtUuKjvxsCk+hG5n5icOdy+8nHLs7wQg== X-Google-Smtp-Source: AHgI3IbFaF+IOpLrE3YBtYVdWm5LwRMF2OJxicevWIRMowzDJgDerlCdZvh64dhHS/us3uvI4OWz6A== X-Received: by 2002:a1c:5a42:: with SMTP id o63mr13342615wmb.88.1549287006941; Mon, 04 Feb 2019 05:30:06 -0800 (PST) Received: from localhost.localdomain ([2620:0:1055:fd00:3c25:d51f:f59f:7d82]) by smtp.gmail.com with ESMTPSA id 129sm18879661wmd.18.2019.02.04.05.30.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Feb 2019 05:30:06 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Mon, 4 Feb 2019 14:30:04 +0100 Message-Id: <1549287004-13747-1-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH] docs/website: fixing query.yahooapis.com shutdown X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch rework the use of query.yahooapis.com to do the conversion from xml to json required by our script and moves to the use of a js library. Datas are therefore now converted in json format on the client. Unfortunately, cause of the CORS restriction on nabble and buildroot.org, we cannot retrieve directly the xml data from these servers and we need a CORS proxy to do that. Signed-off-by: Angelo Compagnucci --- I'm in contact with anbble system administrator to give us access to cors request for their mailing archive so hopefully we can remove the call to an external service in a not so distant future. docs/website/footer.html | 1 + docs/website/js/buildroot.js | 19 +++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/website/footer.html b/docs/website/footer.html index 5b18047..820c269 100644 --- a/docs/website/footer.html +++ b/docs/website/footer.html @@ -1,6 +1,7 @@ + diff --git a/docs/website/js/buildroot.js b/docs/website/js/buildroot.js index ec28cbb..fa5ad9a 100644 --- a/docs/website/js/buildroot.js +++ b/docs/website/js/buildroot.js @@ -1,17 +1,16 @@ function load_activity(feedurl, divid) { - var yqlURL = "https://query.yahooapis.com/v1/public/yql"; - var yqlQS = "?q=select%20entry%20from%20xml%20where%20url%20%3D%20'"; - var yqlOPTS = "'%20limit%2010&format=json&callback="; var container = document.getElementById(divid); - var url = yqlURL + yqlQS + encodeURIComponent(feedurl) + yqlOPTS; - - $.getJSON(url, function(data){ - var result = data.query.results; + $.ajax({ + url: "https://cors.io/?" + feedurl + }) + .done(function(data){ + var x2js = new X2JS(); + var result = x2js.xml_str2json(data); var loaded = 0; var nb_display = 8; if (result==null) return; - for (var i = 0; i < result.feed.length; i++) { - var entry = result.feed[i].entry; + for (var i = 0; i < result.feed.entry.length; i++) { + var entry = result.feed.entry[i]; if (entry.title.indexOf("git commit") != -1) continue; loaded += 1; @@ -24,7 +23,7 @@ function load_activity(feedurl, divid) { var text = document.createTextNode(data); link.appendChild(text); link.title = entry.title; - link.href = entry.link.href; + link.href = entry.link._href; div.appendChild(link); container.appendChild(div); }