Commit 2bbd8b41 authored by Étienne Oz's avatar Étienne Oz 🖖

initial commit

parents
{
"require": {
"hedii/zotero-api": "^1.1"
}
}
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "a87792389c218b076a3d9c0f086eed7a",
"packages": [
{
"name": "guzzlehttp/guzzle",
"version": "6.3.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
"shasum": ""
},
"require": {
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.4",
"php": ">=5.5"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
"psr/log": "^1.0"
},
"suggest": {
"psr/log": "Required for using the Log middleware"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "6.3-dev"
}
},
"autoload": {
"files": [
"src/functions_include.php"
],
"psr-4": {
"GuzzleHttp\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle is a PHP HTTP client library",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"time": "2018-04-22T15:46:56+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Promise\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
}
],
"description": "Guzzle promises library",
"keywords": [
"promise"
],
"time": "2016-12-20T10:07:11+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.4.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
"reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
"psr/http-message": "~1.0"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Schultze",
"homepage": "https://github.com/Tobion"
}
],
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": [
"http",
"message",
"request",
"response",
"stream",
"uri",
"url"
],
"time": "2017-03-20T17:10:46+00:00"
},
{
"name": "hedii/zotero-api",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/hedii/zotero-api.git",
"reference": "d7f49ae15899aa31b63a5f38018565dafeeef1a6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hedii/zotero-api/zipball/d7f49ae15899aa31b63a5f38018565dafeeef1a6",
"reference": "d7f49ae15899aa31b63a5f38018565dafeeef1a6",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^6.2",
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "^5.4"
},
"type": "library",
"autoload": {
"psr-4": {
"Hedii\\ZoteroApi\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "hedii",
"email": "hedi.chaibs@gmail.com",
"homepage": "https://hedichaibi.com"
}
],
"description": "A php wrapper for zotero web api.",
"homepage": "https://github.com/hedii/zotero-api",
"keywords": [
"hedii",
"php",
"zotero",
"zotero-api"
],
"time": "2016-09-28T08:11:17+00:00"
},
{
"name": "psr/http-message",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-message.git",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
"reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP messages",
"homepage": "https://github.com/php-fig/http-message",
"keywords": [
"http",
"http-message",
"psr",
"psr-7",
"request",
"response"
],
"time": "2016-08-06T14:39:51+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
<script type="text/javascript" src="js/functions.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
<?php if($debug == true) ini_set('display_errors', 'On'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Wwwahou</title>
<link rel="stylesheet" type="text/css" href="style/reset.css" />
<link rel="stylesheet" type="text/css" href="style/main.css" />
<!-- <link rel="stylesheet/less" type="text/css" href="style/main.less" /> -->
<script type="text/javascript" src="js/lib/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="js/lib/less.min.js"></script>
</head>
<body>
<?php
$debug = false;
?>
<?php
include('inc/variables.php');
include('inc/functions.php');
include('inc/head.php');
$url = file_get_contents('https://api.zotero.org/users/1756997/collections/7DWKWTHG/items/?format=json&limit=100');
$url2 = file_get_contents('https://api.zotero.org/users/1756997/collections/7DWKWTHG/items/?format=json&start=100&limit=100');
$url3 = file_get_contents('https://api.zotero.org/users/1756997/collections/7DWKWTHG/items/?format=json&start=200&limit=100');
$array = json_decode($url, TRUE);
$array2 = json_decode($url2, TRUE);
$array3 = json_decode($url3, TRUE);
$items = array_merge($array, $array2, $array3);
$allTags = [];
foreach ($items as $item) {
foreach ($item as $data) {
$tags = $data['tags'];
foreach ($tags as $tag) {
if ($tag['tag'] != 'notShowed' && $tag['tag'] != 'cambreOk' && $tag['tag'] != 'pourMoi') {
array_push($allTags, $tag['tag']);
}
}
}
}
$allTags = array_unique($allTags);
echo '<ul class="tags">';
echo '<li><h1>Wwwahou</h1></li>';
foreach ($allTags as $tag) {
echo '~ <li class="tag">' . $tag . '</li> ';
}
echo '</ul>';
foreach ($items as $item) {
foreach ($item as $data) {
if (is_array($data) && in_array('webpage', $data)) {
$title = $data['title'];
$url = $data['url'];
$date = substr($data['dateAdded'], -10);
$abstract = $data['abstractNote'];
$tags = $data['tags'];
echo '<div class="item';
foreach ($tags as $tag) {
if ($tag['tag'] != 'notShowed' && $tag['tag'] != 'cambreOk' && $tag['tag'] != 'pourMoi') {
echo ' ' . $tag['tag'];
}
}
echo '">';
echo '<sub>' . $date . ' </sub>';
echo '<a href=" ' . $url . ' " target="_blank">' . ($title ? $title : '----') . '</a>';
echo '<sup>';
foreach ($tags as $tag) {
if ($tag['tag'] != 'notShowed' && $tag['tag'] != 'cambreOk' && $tag['tag'] != 'pourMoi') {
echo ' <span>' . $tag['tag'] . '</span>';
}
}
echo '</sup>';
echo ' <p>'. $abstract . '</p>';
echo '</div>';
}
}
}
include('inc/foot.php');
?>
body{
font-family: monospace;
font-size: 12px;
}
ul li,
ul li h1{
display: inline;
font-size: 12px;
}
ul li:not(:nth-of-type(1)){
cursor: pointer;
border: 1px solid;
padding: 0 3px;
}
ul li:after{
/* content: ' ~ '; */
}
.item {
transform: skewY(.75deg);
transform-origin: 0 0;
line-height: 1.25rem;
}
.item *{
line-height: 1.25rem;
}
.item:nth-of-type(odd) *{
background: lightyellow;
}
p{
display: inline-block;
margin: 0;
transform: skewY(-1.5deg);
transform-origin: 0 0;
}
sub{
color: darkgreen;
}
sup span{
border: 1px solid;
padding: 0 3px;
}
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1687b4686c947799d241efec7e595ed0::getLoader();
This diff is collapsed.
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
);
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
);
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'),
'Hedii\\ZoteroApi\\' => array($vendorDir . '/hedii/zotero-api/src'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
);
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit1687b4686c947799d241efec7e595ed0
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit1687b4686c947799d241efec7e595ed0', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit1687b4686c947799d241efec7e595ed0', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1687b4686c947799d241efec7e595ed0::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit1687b4686c947799d241efec7e595ed0::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire1687b4686c947799d241efec7e595ed0($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire1687b4686c947799d241efec7e595ed0($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit1687b4686c947799d241efec7e595ed0
{
public static $files = array (
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
);
public static $prefixLengthsPsr4 = array (
'P' =>
array (
'Psr\\Http\\Message\\' => 17,
),
'H' =>
array (
'Hedii\\ZoteroApi\\' => 16,
),
'G' =>
array (
'GuzzleHttp\\Psr7\\' => 16,
'GuzzleHttp\\Promise\\' => 19,
'GuzzleHttp\\' => 11,
),
);
public static $prefixDirsPsr4 = array (
'Psr\\Http\\Message\\' =>
array (
0 => __DIR__ . '/..' . '/psr/http-message/src',
),
'Hedii\\ZoteroApi\\' =>
array (
0 => __DIR__ . '/..' . '/hedii/zotero-api/src',
),
'GuzzleHttp\\Psr7\\' =>
array (
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
),
'GuzzleHttp\\Promise\\' =>
array (
0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
),
'GuzzleHttp\\' =>
array (
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
),
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit1687b4686c947799d241efec7e595ed0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1687b4686c947799d241efec7e595ed0::$prefixDirsPsr4;
}, null, ClassLoader::class);
}
}
[
{
"name": "guzzlehttp/promises",
"version": "v1.3.1",
"version_normalized": "1.3.1.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "^4.0"
},
"time": "2016-12-20T10:07:11+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4-dev"