diff --git a/.metadata/.lock_info b/.metadata/.lock_info index 9f5b85b..8cede54 100644 --- a/.metadata/.lock_info +++ b/.metadata/.lock_info @@ -1,4 +1,4 @@ -#Sun Sep 06 15:25:26 CEST 2026 -host=fedora -process-id=3 -user=Kotama_Chio +#Wed Sep 09 15:38:19 CEST 2026 +display=\:0 +process-id=7 +user=kotama diff --git a/.metadata/.log b/.metadata/.log index bb86ae4..dd7f0bf 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -938,3 +938,586 @@ Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp !ENTRY ch.qos.logback.classic 1 0 2026-09-06 15:25:27.089 !MESSAGE Logback config file: /home/Kotama_Chio/Musique/SillyBlahaj.org/Java/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-06 21:57:22.477 ----------------------------------------------- +eclipse.buildId=4.40.0.20260604-0652 +java.version=21.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2026-09-06 21:57:28.866 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-06 21:58:27.921 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-06 21:58:27.922 +!MESSAGE Failed to read host name. +!STACK 0 +java.net.UnknownHostException: CelesteKC-PC: CelesteKC-PC: Name or service not known + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936) + at org.eclipse.ui.internal.ide.application.IDEApplication.getHostName(IDEApplication.java:493) + at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:434) + at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:375) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:179) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +Caused by: java.net.UnknownHostException: CelesteKC-PC: Name or service not known + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) + at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) + at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) + at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) + at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1931) + ... 15 more + +!ENTRY org.eclipse.core.resources 4 567 2026-09-06 21:58:28.081 +!MESSAGE Workspace restored, but some problems occurred. +!SUBENTRY 1 org.eclipse.core.resources 4 567 2026-09-06 21:58:28.081 +!MESSAGE Could not read metadata for '.org.eclipse.egit.core.cmp'. +!STACK 1 +org.eclipse.core.internal.resources.ResourceException(/.org.eclipse.egit.core.cmp)[567]: java.lang.Exception: The project description file (.project) for '.org.eclipse.egit.core.cmp' is missing. This file contains important information about the project. The project will not function properly until this file is restored. + at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42) + at org.eclipse.core.internal.resources.ResourceException.(ResourceException.java:38) + at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:1021) + at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:1004) + at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:983) + at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:825) + at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1689) + at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2677) + at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2369) + at org.eclipse.core.resources.ResourcesPlugin$WorkspaceInitCustomizer.addingService(ResourcesPlugin.java:591) + at org.eclipse.core.resources.ResourcesPlugin$WorkspaceInitCustomizer.addingService(ResourcesPlugin.java:1) + at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:947) + at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) + at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:257) + at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184) + at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:324) + at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:267) + at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:565) + at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:838) + at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(AccessController.java:571) + at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:830) + at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:780) + at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1082) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:394) + at org.eclipse.osgi.container.Module.doStart(Module.java:643) + at org.eclipse.osgi.container.Module.start(Module.java:500) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:528) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:620) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:353) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:418) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:523) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:439) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:195) + at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:194) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +!SUBENTRY 2 org.eclipse.core.resources 4 567 2026-09-06 21:58:28.084 +!MESSAGE The project description file (.project) for '.org.eclipse.egit.core.cmp' is missing. This file contains important information about the project. The project will not function properly until this file is restored. +!STACK 0 +java.lang.Exception: The project description file (.project) for '.org.eclipse.egit.core.cmp' is missing. This file contains important information about the project. The project will not function properly until this file is restored. + at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42) + at org.eclipse.core.internal.resources.ResourceException.(ResourceException.java:38) + at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:1021) + at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:1004) + at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:983) + at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:825) + at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1689) + at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2677) + at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2369) + at org.eclipse.core.resources.ResourcesPlugin$WorkspaceInitCustomizer.addingService(ResourcesPlugin.java:591) + at org.eclipse.core.resources.ResourcesPlugin$WorkspaceInitCustomizer.addingService(ResourcesPlugin.java:1) + at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:947) + at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) + at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:257) + at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184) + at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:324) + at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:267) + at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:565) + at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:838) + at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) + at java.base/java.security.AccessController.doPrivileged(AccessController.java:571) + at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:830) + at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:780) + at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1082) + at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:394) + at org.eclipse.osgi.container.Module.doStart(Module.java:643) + at org.eclipse.osgi.container.Module.start(Module.java:500) + at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:528) + at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122) + at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:620) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:353) + at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:418) + at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:523) + at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:439) + at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:195) + at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:194) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) + +!ENTRY ch.qos.logback.classic 1 0 2026-09-06 21:58:28.831 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml + +!ENTRY org.eclipse.jdt.core 4 4 2026-09-06 21:58:37.264 +!MESSAGE Failed to initialize module for: Classpath jar file /home/Kotama_Chio/libs/sqlite-jdbc-3.53.2.1.jar +!STACK 0 +java.nio.file.NoSuchFileException: /home/Kotama_Chio/libs/sqlite-jdbc-3.53.2.1.jar + at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) + at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) + at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171) + at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) + at java.base/java.nio.file.Files.readAttributes(Files.java:1854) + at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445) + at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:724) + at java.base/java.util.zip.ZipFile.(ZipFile.java:251) + at java.base/java.util.zip.ZipFile.(ZipFile.java:180) + at java.base/java.util.zip.ZipFile.(ZipFile.java:151) + at org.eclipse.jdt.internal.core.builder.ClasspathMultiReleaseJar.initializeModule(ClasspathMultiReleaseJar.java:50) + at org.eclipse.jdt.internal.core.builder.ModulePathEntry.(ModulePathEntry.java:48) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.collectModuleEntries(NameEnvironment.java:519) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.computeClasspathLocations(NameEnvironment.java:379) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.(NameEnvironment.java:82) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:721) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:214) + at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1146) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:363) + at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:486) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:489) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:601) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:549) + at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:631) + at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:208) + at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:309) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.jdt.core 4 4 2026-09-06 21:58:37.267 +!MESSAGE Failed to initialize module for: Classpath jar file /home/Kotama_Chio/libs/json-20250107.jar +!STACK 0 +java.nio.file.NoSuchFileException: /home/Kotama_Chio/libs/json-20250107.jar + at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) + at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) + at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171) + at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) + at java.base/java.nio.file.Files.readAttributes(Files.java:1854) + at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445) + at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:724) + at java.base/java.util.zip.ZipFile.(ZipFile.java:251) + at java.base/java.util.zip.ZipFile.(ZipFile.java:180) + at java.base/java.util.zip.ZipFile.(ZipFile.java:151) + at org.eclipse.jdt.internal.core.builder.ClasspathMultiReleaseJar.initializeModule(ClasspathMultiReleaseJar.java:50) + at org.eclipse.jdt.internal.core.builder.ModulePathEntry.(ModulePathEntry.java:48) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.collectModuleEntries(NameEnvironment.java:519) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.computeClasspathLocations(NameEnvironment.java:379) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.(NameEnvironment.java:82) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:721) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:214) + at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1146) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:363) + at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:486) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:489) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:601) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:549) + at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:631) + at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:208) + at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:309) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.jdt.core 4 4 2026-09-06 21:58:37.269 +!MESSAGE Failed to initialize module for: Classpath jar file /home/Kotama_Chio/libs/sqlite-jdbc-3.53.2.1.jar +!STACK 0 +java.nio.file.NoSuchFileException: /home/Kotama_Chio/libs/sqlite-jdbc-3.53.2.1.jar + at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) + at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) + at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171) + at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) + at java.base/java.nio.file.Files.readAttributes(Files.java:1854) + at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445) + at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:724) + at java.base/java.util.zip.ZipFile.(ZipFile.java:251) + at java.base/java.util.zip.ZipFile.(ZipFile.java:180) + at java.base/java.util.zip.ZipFile.(ZipFile.java:151) + at org.eclipse.jdt.internal.core.builder.ClasspathMultiReleaseJar.initializeModule(ClasspathMultiReleaseJar.java:50) + at org.eclipse.jdt.internal.core.builder.ModulePathEntry.(ModulePathEntry.java:48) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.collectModuleEntries(NameEnvironment.java:519) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.computeClasspathLocations(NameEnvironment.java:379) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.(NameEnvironment.java:82) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:722) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:214) + at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1146) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:363) + at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:486) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:489) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:601) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:549) + at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:631) + at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:208) + at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:309) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) + +!ENTRY org.eclipse.jdt.core 4 4 2026-09-06 21:58:37.271 +!MESSAGE Failed to initialize module for: Classpath jar file /home/Kotama_Chio/libs/json-20250107.jar +!STACK 0 +java.nio.file.NoSuchFileException: /home/Kotama_Chio/libs/json-20250107.jar + at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) + at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) + at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) + at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:171) + at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99) + at java.base/java.nio.file.Files.readAttributes(Files.java:1854) + at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1445) + at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:724) + at java.base/java.util.zip.ZipFile.(ZipFile.java:251) + at java.base/java.util.zip.ZipFile.(ZipFile.java:180) + at java.base/java.util.zip.ZipFile.(ZipFile.java:151) + at org.eclipse.jdt.internal.core.builder.ClasspathMultiReleaseJar.initializeModule(ClasspathMultiReleaseJar.java:50) + at org.eclipse.jdt.internal.core.builder.ModulePathEntry.(ModulePathEntry.java:48) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.collectModuleEntries(NameEnvironment.java:519) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.computeClasspathLocations(NameEnvironment.java:379) + at org.eclipse.jdt.internal.core.builder.NameEnvironment.(NameEnvironment.java:82) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.initializeBuilder(JavaBuilder.java:722) + at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:214) + at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1146) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:363) + at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:486) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) + at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:489) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:601) + at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:549) + at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:631) + at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:208) + at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:309) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) +!SESSION 2026-09-07 15:26:32.538 ----------------------------------------------- +eclipse.buildId=4.40.0.20260604-0652 +java.version=21.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2026-09-07 15:26:37.511 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-07 15:26:42.331 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-07 15:26:42.332 +!MESSAGE Failed to read host name. +!STACK 0 +java.net.UnknownHostException: CelesteKC-PC: CelesteKC-PC: Name or service not known + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936) + at org.eclipse.ui.internal.ide.application.IDEApplication.getHostName(IDEApplication.java:493) + at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:434) + at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:375) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:179) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +Caused by: java.net.UnknownHostException: CelesteKC-PC: Name or service not known + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) + at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) + at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) + at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) + at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1931) + ... 15 more + +!ENTRY ch.qos.logback.classic 1 0 2026-09-07 15:26:43.249 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-07 23:50:01.094 ----------------------------------------------- +eclipse.buildId=4.40.0.20260604-0652 +java.version=21.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2026-09-07 23:50:06.477 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-07 23:50:10.052 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-07 23:50:10.052 +!MESSAGE Failed to read host name. +!STACK 0 +java.net.UnknownHostException: CelesteKC-PC: CelesteKC-PC: Name or service not known + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936) + at org.eclipse.ui.internal.ide.application.IDEApplication.getHostName(IDEApplication.java:493) + at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:434) + at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:375) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:179) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +Caused by: java.net.UnknownHostException: CelesteKC-PC: Name or service not known + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) + at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) + at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) + at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) + at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1931) + ... 15 more + +!ENTRY ch.qos.logback.classic 1 0 2026-09-07 23:50:11.068 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-08 12:20:20.246 ----------------------------------------------- +eclipse.buildId=4.40.0.20260604-0652 +java.version=21.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2026-09-08 12:20:25.393 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-08 12:20:28.526 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-08 12:20:28.526 +!MESSAGE Failed to read host name. +!STACK 0 +java.net.UnknownHostException: CelesteKC-PC: CelesteKC-PC: Name or service not known + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936) + at org.eclipse.ui.internal.ide.application.IDEApplication.getHostName(IDEApplication.java:493) + at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:434) + at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:375) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:179) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +Caused by: java.net.UnknownHostException: CelesteKC-PC: Name or service not known + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) + at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) + at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) + at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) + at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1931) + ... 15 more + +!ENTRY ch.qos.logback.classic 1 0 2026-09-08 12:20:29.460 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml + +!ENTRY org.eclipse.jdt.ui 4 0 2026-09-08 13:09:00.977 +!MESSAGE AbortCompilation computing hover information in GitHubLGPLApi.java at offset 280 +!STACK 0 +org.eclipse.jdt.internal.compiler.problem.AbortCompilation: + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11585) + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11975) + at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:11916) + at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:10308) + at org.eclipse.jdt.core.dom.CompilationUnitResolver.parse(CompilationUnitResolver.java:656) + at org.eclipse.jdt.core.dom.CompilationUnitResolver.toCompilationUnit(CompilationUnitResolver.java:1432) + at org.eclipse.jdt.core.dom.CompilationUnitResolver$ECJCompilationUnitResolver.toCompilationUnit(CompilationUnitResolver.java:109) + at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached(ASTParser.java:1412) + at org.eclipse.jdt.core.dom.ASTParser.lambda$1(ASTParser.java:1291) + at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5742) + at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1291) + at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:933) + at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocContentAccessUtility.createAST(CoreJavadocContentAccessUtility.java:350) + at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocContentAccessUtility.getJavadocNode(CoreJavadocContentAccessUtility.java:318) + at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocAccess.javadoc2HTML(CoreJavadocAccess.java:423) + at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocAccess.getHTMLContentFromSource(CoreJavadocAccess.java:363) + at org.eclipse.jdt.core.manipulation.internal.javadoc.CoreJavadocAccess.getHTMLContent(CoreJavadocAccess.java:229) + at org.eclipse.jdt.internal.ui.text.javadoc.JavadocContentAccess2.getHTMLContent(JavadocContentAccess2.java:49) + at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:794) + at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:712) + at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:704) + at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:165) + at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:131) + at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:89) + at org.eclipse.jface.text.TextViewerHoverManager$1.run(TextViewerHoverManager.java:155) + Suppressed: java.lang.Throwable: Source line 14 : +----- +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class GitHubLGPLApi implements Api +{ + + public String |getName() +----- + at org.eclipse.jdt.internal.ui.util.SelectionUtil.logException(SelectionUtil.java:157) + at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:178) + ... 3 more +!SESSION 2026-09-09 07:38:04.148 ----------------------------------------------- +eclipse.buildId=4.40.0.20260604-0652 +java.version=21.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2026-09-09 07:38:09.281 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-09 07:38:13.412 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-09 07:38:13.413 +!MESSAGE Failed to read host name. +!STACK 0 +java.net.UnknownHostException: CelesteKC-PC: CelesteKC-PC: Temporary failure in name resolution + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936) + at org.eclipse.ui.internal.ide.application.IDEApplication.getHostName(IDEApplication.java:493) + at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:434) + at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:375) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:179) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +Caused by: java.net.UnknownHostException: CelesteKC-PC: Temporary failure in name resolution + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) + at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) + at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) + at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) + at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1931) + ... 15 more + +!ENTRY ch.qos.logback.classic 1 0 2026-09-09 07:38:14.466 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-09 15:38:12.027 ----------------------------------------------- +eclipse.buildId=4.40.0.20260604-0652 +java.version=21.0.11 +java.vendor=Eclipse Adoptium +BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en +Framework arguments: -product org.eclipse.epp.package.java.product +Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product + +!ENTRY ch.qos.logback.classic 1 0 2026-09-09 15:38:16.265 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-09 15:38:19.100 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-09 15:38:19.100 +!MESSAGE Failed to read host name. +!STACK 0 +java.net.UnknownHostException: CelesteKC-PC: CelesteKC-PC: Name or service not known + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936) + at org.eclipse.ui.internal.ide.application.IDEApplication.getHostName(IDEApplication.java:493) + at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:434) + at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:375) + at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:179) + at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149) + at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467) + at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) + at java.base/java.lang.reflect.Method.invoke(Method.java:580) + at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:615) + at org.eclipse.equinox.launcher.Main.basicRun(Main.java:563) + at org.eclipse.equinox.launcher.Main.run(Main.java:1415) + at org.eclipse.equinox.launcher.Main.main(Main.java:1387) +Caused by: java.net.UnknownHostException: CelesteKC-PC: Name or service not known + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) + at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52) + at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1211) + at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1828) + at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1139) + at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1818) + at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1931) + ... 15 more + +!ENTRY org.eclipse.core.resources 2 10035 2026-09-09 15:38:19.214 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY ch.qos.logback.classic 1 0 2026-09-09 15:38:19.834 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/15/405bb4215dac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/15/405bb4215dac00111450c012ccd5345a new file mode 100644 index 0000000..658901d --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/15/405bb4215dac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray(); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("pageURL"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/22/5024eaf65aac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/22/5024eaf65aac00111450c012ccd5345a new file mode 100644 index 0000000..ddf74cf --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/22/5024eaf65aac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "code")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/27/90bcb4b454ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/27/90bcb4b454ac00111450c012ccd5345a new file mode 100644 index 0000000..55d826b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/27/90bcb4b454ac00111450c012ccd5345a @@ -0,0 +1,49 @@ +package org.sillyjirafe.uoapi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.uoapi.binds.GitHubApacheApi; +import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; +import org.sillyjirafe.uoapi.binds.GitHubMITApi; +import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; +import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; + +public class Out { + List Apis = new ArrayList<>(); + + public List PreOut() + { + Apis.add(new GitHubMITApi()); + Apis.add(new GitHubLGPLApi()); + Apis.add(new GitHubApacheApi()); + Apis.add(new OpenVerseImagesApi()); + Apis.add(new OpenVerseAudiosApi()); + + List bindnames = new ArrayList<>(); + + for (Api api : Apis) + { + bindnames.add(api.getName()); + } + + return bindnames; + } + + public List out(Map bindpages, Map ApiKeys) throws Exception + { + List Elements = new ArrayList<>(); + + for (int i = 0; i < Apis.size(); i++) + { + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName())); + for (int j = 0; j < currentapi.size(); j++) + { + Elements.add(currentapi.get(j)); + } + } + return Elements; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/2b/e04613f012ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/2b/e04613f012ac00111663a416dae60ac7 new file mode 100644 index 0000000..9cf7fc9 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/2b/e04613f012ac00111663a416dae60ac7 @@ -0,0 +1,42 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("full_name"); + String password = key.getString("key"); + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/32/401a75e311ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/32/401a75e311ac00111663a416dae60ac7 new file mode 100644 index 0000000..ec85bec --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/32/401a75e311ac00111663a416dae60ac7 @@ -0,0 +1,35 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/39/f0eb149912ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/39/f0eb149912ac00111663a416dae60ac7 new file mode 100644 index 0000000..1dc7e02 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/39/f0eb149912ac00111663a416dae60ac7 @@ -0,0 +1,40 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3c/7051b11f6fab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/3c/7051b11f6fab0011163bc5228b28d1d0 new file mode 100644 index 0000000..3243d46 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/3c/7051b11f6fab0011163bc5228b28d1d0 @@ -0,0 +1,5 @@ +package org.sillyjirafe.json; + +public class ApiKeys { + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/40/101e9d0e13ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/40/101e9d0e13ac00111663a416dae60ac7 new file mode 100644 index 0000000..e89e569 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/40/101e9d0e13ac00111663a416dae60ac7 @@ -0,0 +1,42 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/41/f0993a7954ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/41/f0993a7954ac00111450c012ccd5345a new file mode 100644 index 0000000..019d5ac --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/41/f0993a7954ac00111450c012ccd5345a @@ -0,0 +1,49 @@ +package org.sillyjirafe.uoapi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.uoapi.binds.GitHubApacheApi; +import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; +import org.sillyjirafe.uoapi.binds.GitHubMITApi; +import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; +import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; + +public class Out { + List Apis = new ArrayList<>(); + + public List PreOut() + { + Apis.add(new GitHubMITApi()); + Apis.add(new GitHubLGPLApi()); + Apis.add(new GitHubApacheApi()); + Apis.add(new OpenVerseImagesApi()); + Apis.add(new OpenVerseAudiosApi()); + + List bindnames = new ArrayList<>(); + + for (Api api : Apis) + { + bindnames.add(api.getName()); + } + + return bindnames; + } + + public List out(Map bindpages, Map ApiKeys) throws Exception + { + List Elements = new ArrayList<>(); + + for (int i = 0; i < Apis.size(); i++) + { + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName()), ApiKeys.get(Apis.get(i).getName()); + for (int j = 0; j < currentapi.size(); j++) + { + Elements.add(currentapi.get(j)); + } + } + return Elements; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/42/e0a6e71f73ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/42/e0a6e71f73ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..0f61593 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/42/e0a6e71f73ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/47/e0cd01b470ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/47/e0cd01b470ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..6384ad9 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/47/e0cd01b470ab0011163bc5228b28d1d0 @@ -0,0 +1,14 @@ +package org.sillyjirafe.json; + +import java.io.File; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() + { + File file = new File("ApiKeys.json"); + + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/4b/8043819c70ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/4b/8043819c70ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..9f09de6 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/4b/8043819c70ab0011163bc5228b28d1d0 @@ -0,0 +1,11 @@ +package org.sillyjirafe.json; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() + { + File myObj = new File("ApiKeys.json"); + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/52/c029f0c872ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/52/c029f0c872ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..837dfe5 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/52/c029f0c872ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("example.txt"); + try { + List lines = Files.readString(filePath); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/53/6023f29013ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/53/6023f29013ac00111663a416dae60ac7 new file mode 100644 index 0000000..d9c289f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/53/6023f29013ac00111663a416dae60ac7 @@ -0,0 +1,47 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + Map ApiKeys = new; + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/53/90f11e4c55ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/53/90f11e4c55ac00111450c012ccd5345a new file mode 100644 index 0000000..ef8cacc --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/53/90f11e4c55ac00111450c012ccd5345a @@ -0,0 +1,45 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class GitHubLGPLApi implements Api +{ + + public String getName() + { + return "GitHubLGPLApi"; + } + + public String getURL(int page) { + return "https://api.github.com/search/repositories?q=license:lgpl-3.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "github", "code")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/59/10931aa214ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/59/10931aa214ac00111663a416dae60ac7 new file mode 100644 index 0000000..c3b3e66 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/59/10931aa214ac00111663a416dae60ac7 @@ -0,0 +1,47 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + Map ApiKeys = new HashMap(); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f4240673ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f4240673ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..a49f1fe --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f4240673ab0011163bc5228b28d1d0 @@ -0,0 +1,29 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + JSONObject json = new JSONObject(jsonraw); + try { + String jsonraw = Files.readString(filePath); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(jsonraw); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6/603b27b66fab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/6/603b27b66fab0011163bc5228b28d1d0 new file mode 100644 index 0000000..53b2e8b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6/603b27b66fab0011163bc5228b28d1d0 @@ -0,0 +1,12 @@ +package org.sillyjirafe.json; + +import java.io.File; + +import org.json.JSONML; + +public class ApiKeys { + public void read() + { + List lines = Files.readAllLines(Paths.get("filename.txt")); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6/606131b275ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/6/606131b275ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..4c460bd --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6/606131b275ab0011163bc5228b28d1d0 @@ -0,0 +1,45 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class GitHubLGPLApi implements Api +{ + + public String getName() + { + return "GitHubLGPLApi"; + } + + public String getURL(int page) { + return "https://api.github.com/search/repositories?q=license:lgpl-3.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>();8 + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "github", "code")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/6c/a07e4c9a6fab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/a07e4c9a6fab0011163bc5228b28d1d0 new file mode 100644 index 0000000..0d0580a --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/a07e4c9a6fab0011163bc5228b28d1d0 @@ -0,0 +1,5 @@ +package org.sillyjirafe.json; + +public class ApiKeys { + +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/76/90e6fa3870ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/76/90e6fa3870ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..7147712 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/76/90e6fa3870ab0011163bc5228b28d1d0 @@ -0,0 +1,9 @@ +package org.sillyjirafe.json; + + +public class ApiKeys { + public void read() + { + + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/78/40fe34f872ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/78/40fe34f872ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..8ef2dc1 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/78/40fe34f872ab0011163bc5228b28d1d0 @@ -0,0 +1,23 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + String jsonraw = Files.readString(filePath); + } + JSONObject json = new JSONObject(jsonraw); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/8008bb4672ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/8008bb4672ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..81d6c09 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/8008bb4672ab0011163bc5228b28d1d0 @@ -0,0 +1,31 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("example.txt"); + try { + List lines = Files.readAllLines(filePath); + for (String line : lines) { + System.out.println(line); + } + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8/e02874c310ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/8/e02874c310ac00111663a416dae60ac7 new file mode 100644 index 0000000..1a85791 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/8/e02874c310ac00111663a416dae60ac7 @@ -0,0 +1,31 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8/e0f0bf535dac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/8/e0f0bf535dac00111450c012ccd5345a new file mode 100644 index 0000000..3b360eb --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/8/e0f0bf535dac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray(""); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("pageURL"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/81/0030164854ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/81/0030164854ac00111450c012ccd5345a new file mode 100644 index 0000000..55d826b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/81/0030164854ac00111450c012ccd5345a @@ -0,0 +1,49 @@ +package org.sillyjirafe.uoapi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.uoapi.binds.GitHubApacheApi; +import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; +import org.sillyjirafe.uoapi.binds.GitHubMITApi; +import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; +import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; + +public class Out { + List Apis = new ArrayList<>(); + + public List PreOut() + { + Apis.add(new GitHubMITApi()); + Apis.add(new GitHubLGPLApi()); + Apis.add(new GitHubApacheApi()); + Apis.add(new OpenVerseImagesApi()); + Apis.add(new OpenVerseAudiosApi()); + + List bindnames = new ArrayList<>(); + + for (Api api : Apis) + { + bindnames.add(api.getName()); + } + + return bindnames; + } + + public List out(Map bindpages, Map ApiKeys) throws Exception + { + List Elements = new ArrayList<>(); + + for (int i = 0; i < Apis.size(); i++) + { + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName())); + for (int j = 0; j < currentapi.size(); j++) + { + Elements.add(currentapi.get(j)); + } + } + return Elements; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/a07194e872ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/88/a07194e872ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..d49ae00 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/88/a07194e872ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String Jsonraw = Files.readString(filePath); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(Jsonraw); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/90/e017133a71ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/90/e017133a71ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..30c4400 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/90/e017133a71ab0011163bc5228b28d1d0 @@ -0,0 +1,24 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + File file = new File("ApiKeys.json"); + try (Scanner Reader = new Scanner(file)) { + Reader.all + } + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/92/c0e148b45cac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/92/c0e148b45cac00111450c012ccd5345a new file mode 100644 index 0000000..dab8d6a --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/92/c0e148b45cac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("pageURL"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/98/2060069f12ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/98/2060069f12ac00111663a416dae60ac7 new file mode 100644 index 0000000..b128ea1 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/98/2060069f12ac00111663a416dae60ac7 @@ -0,0 +1,40 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject keys = items.getJSONObject(i); + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/99/b0c3c14a72ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/99/b0c3c14a72ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..a294b50 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/99/b0c3c14a72ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("example.txt"); + try { + List lines = Files.readString(filePath) + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a/a09eef8713ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/a/a09eef8713ac00111663a416dae60ac7 new file mode 100644 index 0000000..c3b3e66 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a/a09eef8713ac00111663a416dae60ac7 @@ -0,0 +1,47 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + Map ApiKeys = new HashMap(); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/a6/800ef8ab14ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/a6/800ef8ab14ac00111663a416dae60ac7 new file mode 100644 index 0000000..5371a8c --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/a6/800ef8ab14ac00111663a416dae60ac7 @@ -0,0 +1,43 @@ +package org.sillyjirafe.linker; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.db.Crawl_StateDB; +import org.sillyjirafe.db.ElementsDB; +import org.sillyjirafe.uoapi.*; + +public class Main { + public static void main(String[] args) throws Exception + { + Out Out = new Out(); + ElementsDB elementDB = new ElementsDB("jdbc:sqlite:elements.db"); + Crawl_StateDB crawlstateDB = new Crawl_StateDB("jdbc:sqlite:crawlstates.db"); + elementDB.LinkToDB(); + crawlstateDB.LinkToDB(); + + List bindNames = Out.PreOut(); + + Map pages = new HashMap<>(); + for (String nom : bindNames) { + pages.put(nom, crawlstateDB.getPage(nom)); + } + + + List elements = Out.out(pages); + + for (int i = 0; i < elements.size(); i++) + { + element el = elements.get(i); + elementDB.AddEllement(el.title(), el.url(), el.licence(), el.source(), el.type()); + } + + for (String name : bindNames) { + crawlstateDB.updatePage(name); + } + + elementDB.Close(); + crawlstateDB.Close(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/af/c0c2dbba6fab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/af/c0c2dbba6fab0011163bc5228b28d1d0 new file mode 100644 index 0000000..6ca33f9 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/af/c0c2dbba6fab0011163bc5228b28d1d0 @@ -0,0 +1,12 @@ +package org.sillyjirafe.json; + +import java.io.File; + +import org.json.JSONML; + +public class ApiKeys { + public void read() + { + + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/0072fb2f13ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/0072fb2f13ac00111663a416dae60ac7 new file mode 100644 index 0000000..d235dbf --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b/0072fb2f13ac00111663a416dae60ac7 @@ -0,0 +1,45 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Map ApiKeys = new HashMap(); + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b/e0fef37954ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/b/e0fef37954ac00111450c012ccd5345a new file mode 100644 index 0000000..942d932 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b/e0fef37954ac00111450c012ccd5345a @@ -0,0 +1,49 @@ +package org.sillyjirafe.uoapi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.uoapi.binds.GitHubApacheApi; +import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; +import org.sillyjirafe.uoapi.binds.GitHubMITApi; +import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; +import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; + +public class Out { + List Apis = new ArrayList<>(); + + public List PreOut() + { + Apis.add(new GitHubMITApi()); + Apis.add(new GitHubLGPLApi()); + Apis.add(new GitHubApacheApi()); + Apis.add(new OpenVerseImagesApi()); + Apis.add(new OpenVerseAudiosApi()); + + List bindnames = new ArrayList<>(); + + for (Api api : Apis) + { + bindnames.add(api.getName()); + } + + return bindnames; + } + + public List out(Map bindpages, Map ApiKeys) throws Exception + { + List Elements = new ArrayList<>(); + + for (int i = 0; i < Apis.size(); i++) + { + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName())) + for (int j = 0; j < currentapi.size(); j++) + { + Elements.add(currentapi.get(j)); + } + } + return Elements; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/10835d2771ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/10835d2771ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..3c1fecd --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/10835d2771ab0011163bc5228b28d1d0 @@ -0,0 +1,16 @@ +package org.sillyjirafe.json; + +import java.io.File; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() + { + File file = new File("ApiKeys.json"); + try (Scanner myReader = new Scanner(myObj)) { + + } + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bb/7026230411ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/bb/7026230411ac00111663a416dae60ac7 new file mode 100644 index 0000000..533bccc --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/bb/7026230411ac00111663a416dae60ac7 @@ -0,0 +1,33 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/7006918e56ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/7006918e56ac00111450c012ccd5345a new file mode 100644 index 0000000..89f438d --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/7006918e56ac00111450c012ccd5345a @@ -0,0 +1,47 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public static Map read() + { + + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + Map ApiKeys = new HashMap(); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + ApiKeys.put(bind, password); + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30a865ec12ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30a865ec12ac00111663a416dae60ac7 new file mode 100644 index 0000000..9e72cc4 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30a865ec12ac00111663a416dae60ac7 @@ -0,0 +1,40 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c9/002b02a759ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/c9/002b02a759ac00111450c012ccd5345a new file mode 100644 index 0000000..bfb217c --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/c9/002b02a759ac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class OpenVerseAudiosApi implements Api +{ + public String getName() + { + return "OpenVerseAudiosApi"; + } + + public String getURL(int page, String apikey) { + return "https://api.openverse.org/v1/audio/?format=json&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("results"); + + for (int i = 0; i < items.length(); i++) { + JSONObject image = items.getJSONObject(i); + + String titre = image.getString("title"); + String url = image.getString("url"); + String licence = image.getString("license"); + + resultats.add(new element(titre, url, licence, "openverse", "audio")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/c9/f04ce75b12ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/c9/f04ce75b12ac00111663a416dae60ac7 new file mode 100644 index 0000000..72d19d0 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/c9/f04ce75b12ac00111663a416dae60ac7 @@ -0,0 +1,37 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d/10baee1113ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/d/10baee1113ac00111663a416dae60ac7 new file mode 100644 index 0000000..4a0d6d4 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/d/10baee1113ac00111663a416dae60ac7 @@ -0,0 +1,45 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Map ApiKeys = new(); + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + + } + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/d1/30e436e571ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/d1/30e436e571ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..b59a60c --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/d1/30e436e571ab0011163bc5228b28d1d0 @@ -0,0 +1,25 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + File file = new File("ApiKeys.json"); + try (Scanner Reader = new Scanner(file)) { + Reader.all + } + JSONObject json = new JSONObject(); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/da/00124e545bac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/da/00124e545bac00111450c012ccd5345a new file mode 100644 index 0000000..07fc475 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/da/00124e545bac00111450c012ccd5345a @@ -0,0 +1,43 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class OpenVerseAudiosApi implements Api +{ + public String getName() + { + return "OpenVerseAudiosApi"; + } + + public String getURL(int page, String apikey) { + return "https://api.openverse.org/v1/audio/?format=json&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("results"); + + for (int i = 0; i < items.length(); i++) { + JSONObject image = items.getJSONObject(i); + + String titre = image.getString("title"); + String url = image.getString("url"); + String licence = image.getString("license"); + + resultats.add(new element(titre, url, licence, "openverse", "audio")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/db/1037e20073ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/db/1037e20073ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..4fb5f59 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/db/1037e20073ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(jsonraw); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/dc/908703fb72ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/dc/908703fb72ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..bd62eb5 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/dc/908703fb72ab0011163bc5228b28d1d0 @@ -0,0 +1,22 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/00dd72ba5aac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/dd/00dd72ba5aac00111450c012ccd5345a new file mode 100644 index 0000000..86ecc7c --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/dd/00dd72ba5aac00111450c012ccd5345a @@ -0,0 +1,45 @@ +package org.sillyjirafe.uoapi.binds; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; +import java.util.ArrayList; +import java.util.List; + +public class GitHubMITApi implements Api +{ + + public String getName() + { + return "GitHubMITApi"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:mit&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "github", "code")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/20be97f572ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/dd/20be97f572ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..4fb5f59 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/dd/20be97f572ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public void read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + JSONObject json = new JSONObject(jsonraw); + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0ee14e35aac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0ee14e35aac00111450c012ccd5345a new file mode 100644 index 0000000..d5e82a8 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0ee14e35aac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "GitHubApacheApi"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "github", "code")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e4/d058f25f5dac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/e4/d058f25f5dac00111450c012ccd5345a new file mode 100644 index 0000000..a0951b9 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/e4/d058f25f5dac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://pixabay.com/api/?page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray(""); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("pageURL"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/70dd26205dac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/70dd26205dac00111450c012ccd5345a new file mode 100644 index 0000000..8ac50af --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/70dd26205dac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("pageURL"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/30b29f5754ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/f6/30b29f5754ac00111450c012ccd5345a new file mode 100644 index 0000000..6a68053 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/f6/30b29f5754ac00111450c012ccd5345a @@ -0,0 +1,49 @@ +package org.sillyjirafe.uoapi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.uoapi.binds.GitHubApacheApi; +import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; +import org.sillyjirafe.uoapi.binds.GitHubMITApi; +import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; +import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; + +public class Out { + List Apis = new ArrayList<>(); + + public List PreOut() + { + Apis.add(new GitHubMITApi()); + Apis.add(new GitHubLGPLApi()); + Apis.add(new GitHubApacheApi()); + Apis.add(new OpenVerseImagesApi()); + Apis.add(new OpenVerseAudiosApi()); + + List bindnames = new ArrayList<>(); + + for (Api api : Apis) + { + bindnames.add(api.getName()); + } + + return bindnames; + } + + public List out(Map bindpages, Map ApiKeys) throws Exception + { + List Elements = new ArrayList<>(); + + for (int i = 0; i < Apis.size(); i++) + { + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName()),ApiKeys.get(Apis.get(i).getName()); + for (int j = 0; j < currentapi.size(); j++) + { + Elements.add(currentapi.get(j)); + } + } + return Elements; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f9/a0ca195554ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/f9/a0ca195554ac00111450c012ccd5345a new file mode 100644 index 0000000..6cc606f --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/f9/a0ca195554ac00111450c012ccd5345a @@ -0,0 +1,49 @@ +package org.sillyjirafe.uoapi; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.sillyjirafe.uoapi.binds.GitHubApacheApi; +import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; +import org.sillyjirafe.uoapi.binds.GitHubMITApi; +import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; +import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; + +public class Out { + List Apis = new ArrayList<>(); + + public List PreOut() + { + Apis.add(new GitHubMITApi()); + Apis.add(new GitHubLGPLApi()); + Apis.add(new GitHubApacheApi()); + Apis.add(new OpenVerseImagesApi()); + Apis.add(new OpenVerseAudiosApi()); + + List bindnames = new ArrayList<>(); + + for (Api api : Apis) + { + bindnames.add(api.getName()); + } + + return bindnames; + } + + public List out(Map bindpages, Map ApiKeys) throws Exception + { + List Elements = new ArrayList<>(); + + for (int i = 0; i < Apis.size(); i++) + { + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName()),ApiKeys.get(Apis.get(i).getName(); + for (int j = 0; j < currentapi.size(); j++) + { + Elements.add(currentapi.get(j)); + } + } + return Elements; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/f9/c020c5b375ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/f9/c020c5b375ab0011163bc5228b28d1d0 new file mode 100644 index 0000000..00c67a2 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/f9/c020c5b375ab0011163bc5228b28d1d0 @@ -0,0 +1,28 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; + +import org.json.JSONObject; + +public class ApiKeys { + public Map read() throws FileNotFoundException + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fa/005dc4e111ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/fa/005dc4e111ac00111663a416dae60ac7 new file mode 100644 index 0000000..533bccc --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/fa/005dc4e111ac00111663a416dae60ac7 @@ -0,0 +1,33 @@ +package org.sillyjirafe.json; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import org.json.JSONObject; + +public class ApiKeys { + public Map read() + { + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + + + + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fb/705067f15aac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/fb/705067f15aac00111450c012ccd5345a new file mode 100644 index 0000000..91a7abe --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/fb/705067f15aac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "github", "code")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/fc/40b1b1b05cac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/fc/40b1b1b05cac00111450c012ccd5345a new file mode 100644 index 0000000..320aa8b --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.resources/.history/fc/40b1b1b05cac00111450c012ccd5345a @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray("items"); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("html_url"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location index eedf3a7..7215ce8 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location and b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/d6/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/d6/history.index index 65a7e5f..cca827b 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/d6/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/d6/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/history.index index e5b303f..d06607a 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/e8/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/e8/history.index index 2684b9f..bb2b755 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/e8/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/e8/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.markers index d8b23f9..1842f63 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/org.eclipse.jdt.core/state.dat index aecad91..f3beb45 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.markers b/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.markers index 4cb8df5..e1430ee 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.markers and b/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.markers differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/org.eclipse.jdt.core/state.dat b/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/org.eclipse.jdt.core/state.dat index 64d1b77..2925fad 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/org.eclipse.jdt.core/state.dat and b/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/org.eclipse.jdt.core/state.dat differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree deleted file mode 100644 index d815235..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/21.tree and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/25.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/25.tree new file mode 100644 index 0000000..d231f33 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/25.tree differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index 93a32af..da68cec 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.css.swt.theme.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.css.swt.theme.prefs new file mode 100644 index 0000000..77840f2 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.css.swt.theme.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +themeid=org.eclipse.e4.ui.css.theme.e4_dark diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.workbench.renderers.swt.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.workbench.renderers.swt.prefs new file mode 100644 index 0000000..8cd1c68 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.workbench.renderers.swt.prefs @@ -0,0 +1,6 @@ +HIDE_ICONS_FOR_VIEW_TABS=false +SHOW_DIRTY_INDICATOR_ON_TABS=false +SHOW_FULL_TEXT_FOR_VIEW_TABS=false +eclipse.preferences.version=1 +enableMRU=true +themeEnabled=true diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefs new file mode 100644 index 0000000..e543814 --- /dev/null +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefs @@ -0,0 +1,2 @@ +browsers=\n +eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index 872e649..88d3353 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -1,6 +1,6 @@ IMPORT_FILES_AND_FOLDERS_RELATIVE=true IMPORT_FILES_AND_FOLDERS_TYPE=23,1 eclipse.preferences.version=1 -platformState=944991997831560 +platformState=945728594589462 quickStart=false tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index 61ddbae..cbf4068 100644 --- a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,8 +1,8 @@ - - + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration - + @@ -11,9 +11,9 @@ topLevel shellMaximized - - - + + + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -80,97 +80,97 @@ persp.editorOnboardingCommand:Show Key Assist$$$Shift+Ctrl+L persp.editorOnboardingCommand:New$$$Ctrl+N persp.editorOnboardingCommand:Open Type$$$Shift+Ctrl+T - - - + + + org.eclipse.e4.primaryNavigationStack - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:Java - - + + View categoryTag:Git - - - - + + + + org.eclipse.e4.secondaryNavigationStack - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Mylyn - + View categoryTag:Java - + View categoryTag:Ant - + org.eclipse.e4.secondaryDataStack Minimized - + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Terminal @@ -179,154 +179,131 @@ - - + + View categoryTag:Help - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Help - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Help - - + + EditorStack org.eclipse.e4.primaryDataStack active - - + noFocus + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor @@ -335,1174 +312,1174 @@ - + View categoryTag:Java - + ViewMenu menuContribution:menu - + - + View categoryTag:Java - + View categoryTag:General - + - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Mylyn - + ViewMenu menuContribution:menu - + - + View categoryTag:Terminal - + View categoryTag:Java - + View categoryTag:Git - + View categoryTag:Java - + View categoryTag:Ant - - + + toolbarSeparator - + - + Draggable - + - + toolbarSeparator - + - + Draggable - - + + - + toolbarSeparator - + - + Draggable - + Draggable - + Draggable - + Draggable - + toolbarSeparator - + - + Draggable - + - + toolbarSeparator - + - + toolbarSeparator - + - + Draggable - + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + TrimStack Draggable - + TrimStack Draggable - - + + TrimStack Draggable - + TrimStack Draggable - - - - - - - - - - - - - + + + + + + + + + + + + + platform:gtk - - - - + + + + platform:gtk - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - + + + - - - - - + + + + + - - + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + platform:gtk - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - + + + + - - + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor removeOnHide - + View categoryTag:Ant - + View categoryTag:Gradle - + View categoryTag:Gradle - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git NoRestore - + View categoryTag:Git - + View categoryTag:Help - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Language Servers - + View categoryTag:Language Servers - + View categoryTag:Language Servers - + View categoryTag:Maven - + View categoryTag:Maven - + View categoryTag:Maven - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Oomph - + View categoryTag:Oomph NoRestore - + View categoryTag:Plug-in Development - + View categoryTag:General - + View categoryTag:Version Control (Team) - + View categoryTag:Version Control (Team) - + View categoryTag:Terminal - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View @@ -1525,1070 +1502,1070 @@ SHOW_RESTORE_MENU - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index b/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index index a96eaac..2d7eaec 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index and b/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/206920101.index b/.metadata/.plugins/org.eclipse.jdt.core/206920101.index index 7350913..ec8ceb0 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/206920101.index and b/.metadata/.plugins/org.eclipse.jdt.core/206920101.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/263131634.index b/.metadata/.plugins/org.eclipse.jdt.core/263131634.index index 9eec7a3..ca4b35f 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/263131634.index and b/.metadata/.plugins/org.eclipse.jdt.core/263131634.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/4139034169.index b/.metadata/.plugins/org.eclipse.jdt.core/32071656.index similarity index 100% rename from .metadata/.plugins/org.eclipse.jdt.core/4139034169.index rename to .metadata/.plugins/org.eclipse.jdt.core/32071656.index diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1241313270.index b/.metadata/.plugins/org.eclipse.jdt.core/4203645977.index similarity index 100% rename from .metadata/.plugins/org.eclipse.jdt.core/1241313270.index rename to .metadata/.plugins/org.eclipse.jdt.core/4203645977.index diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache index 5f86ebe..4775374 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache and b/.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps index 657f85f..89f1d21 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps and b/.metadata/.plugins/org.eclipse.jdt.core/externalLibsTimeStamps differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache index be8039f..46e0626 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache and b/.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt index 8050890..c2b48b0 100644 --- a/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt +++ b/.metadata/.plugins/org.eclipse.jdt.core/savedIndexNames.txt @@ -1,7 +1,7 @@ -INDEX VERSION 1.134+/home/Kotama_Chio/Musique/SillyBlahaj.org/Java/.metadata/.plugins/org.eclipse.jdt.core -263131634.index +INDEX VERSION 1.134+/home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.jdt.core 1568060524.index -1241313270.index -206920101.index -4139034169.index +4203645977.index 1865797976.index +206920101.index +263131634.index +32071656.index diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml index fe26c9b..45cb2a5 100644 --- a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -2,7 +2,7 @@
- +
@@ -36,9 +36,9 @@
- - - + + +
diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.history b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.history index 72ca3d9..a82f82d 100644 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.history +++ b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.history @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.index b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.index index 38cd433..6dbd803 100644 --- a/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.index +++ b/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/SillyJirafe.org/2026/9/37/refactorings.index @@ -1,3 +1,4 @@ 1788693077363 Delete elements 1788696318574 Delete element 1788701297006 Delete element +1788964156133 Copy compilation unit diff --git a/.metadata/.plugins/org.eclipse.m2e.logback/0.log b/.metadata/.plugins/org.eclipse.m2e.logback/0.log index e309dc5..4b76ecc 100644 --- a/.metadata/.plugins/org.eclipse.m2e.logback/0.log +++ b/.metadata/.plugins/org.eclipse.m2e.logback/0.log @@ -19,3 +19,10 @@ 2026-09-06 13:03:34,770 [Worker-2: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. 2026-09-06 13:25:34,865 [Worker-7: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. 2026-09-06 15:25:31,408 [Worker-7: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. +2026-09-06 21:58:36,074 [Worker-5: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. +2026-09-07 15:26:50,258 [Worker-2: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. +2026-09-07 23:50:17,838 [Worker-1: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. +2026-09-08 12:20:37,192 [Worker-6: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read. +2026-09-09 07:38:22,295 [Worker-6: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. +2026-09-09 07:38:22,392 [Worker-6: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Updating Gradle version information cache failed. Using outdated cache. +2026-09-09 15:38:26,321 [Worker-6: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is out-of-date. Trying to update. diff --git a/.metadata/version.ini b/.metadata/version.ini index 542d7fa..f71dd35 100644 --- a/.metadata/version.ini +++ b/.metadata/version.ini @@ -1,3 +1,3 @@ -#Sun Sep 06 15:25:26 CEST 2026 +#Wed Sep 09 15:38:19 CEST 2026 org.eclipse.core.runtime=2 org.eclipse.platform=4.40.0.v20260601-0713 diff --git a/SillyJirafe.org/.classpath b/SillyJirafe.org/.classpath index 62ce2ad..55088ad 100644 --- a/SillyJirafe.org/.classpath +++ b/SillyJirafe.org/.classpath @@ -6,12 +6,12 @@ - + - + diff --git a/SillyJirafe.org/bin/org/sillyjirafe/json/ApiKeys.class b/SillyJirafe.org/bin/org/sillyjirafe/json/ApiKeys.class index 3f39af5..7ea317a 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/json/ApiKeys.class and b/SillyJirafe.org/bin/org/sillyjirafe/json/ApiKeys.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/linker/Main.class b/SillyJirafe.org/bin/org/sillyjirafe/linker/Main.class index 8399962..c83227c 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/linker/Main.class and b/SillyJirafe.org/bin/org/sillyjirafe/linker/Main.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Api.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Api.class index b3db3a4..e6afb47 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Api.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Api.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Caller.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Caller.class index 21c3336..6eeeb8d 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Caller.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Caller.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Out.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Out.class index e67a5e9..0216713 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Out.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Out.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubApacheApi.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubApacheApi.class index c720ee1..4aab471 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubApacheApi.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubApacheApi.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.class index a7343f9..904d6c1 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubMITApi.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubMITApi.class index 1db62e5..a342481 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubMITApi.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/GitHubMITApi.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.class index b5c2cf6..e208623 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.class index a62cf6b..70bc5d2 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.class differ diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/PixabayImagesApi.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/PixabayImagesApi.class new file mode 100644 index 0000000..319cb3d Binary files /dev/null and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/PixabayImagesApi.class differ diff --git a/SillyJirafe.org/src/org/sillyjirafe/json/ApiKeys.java b/SillyJirafe.org/src/org/sillyjirafe/json/ApiKeys.java index 3243d46..b69eb4c 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/json/ApiKeys.java +++ b/SillyJirafe.org/src/org/sillyjirafe/json/ApiKeys.java @@ -1,5 +1,44 @@ package org.sillyjirafe.json; -public class ApiKeys { +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.json.JSONArray; +import org.json.JSONObject; + +public class ApiKeys { + public static Map read() + { + + Path filePath = Paths.get("ApiKeys.json"); + try { + String jsonraw = Files.readString(filePath); + JSONObject json = new JSONObject(jsonraw); + Map ApiKeys = new HashMap(); + + JSONArray items = json.getJSONArray("keys"); + + for (int i = 0; i < items.length(); i++) { + JSONObject key = items.getJSONObject(i); + String bind = key.getString("bind"); + String password = key.getString("key"); + + ApiKeys.put(bind, password); + } + } catch (IOException e) { + System.err.println("I/O error: " + e.getMessage()); + } catch (SecurityException e) { + System.err.println("Access denied: " + e.getMessage()); + } + return null; + } } diff --git a/SillyJirafe.org/src/org/sillyjirafe/linker/Main.java b/SillyJirafe.org/src/org/sillyjirafe/linker/Main.java index 3d9f28a..c81c71c 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/linker/Main.java +++ b/SillyJirafe.org/src/org/sillyjirafe/linker/Main.java @@ -6,6 +6,7 @@ import java.util.Map; import org.sillyjirafe.db.Crawl_StateDB; import org.sillyjirafe.db.ElementsDB; +import org.sillyjirafe.json.ApiKeys; import org.sillyjirafe.uoapi.*; public class Main { @@ -24,7 +25,8 @@ public class Main { pages.put(nom, crawlstateDB.getPage(nom)); } - List elements = Out.out(pages); + + List elements = Out.out(pages, ApiKeys.read()); for (int i = 0; i < elements.size(); i++) { diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Api.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Api.java index 6254040..670c585 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Api.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Api.java @@ -3,7 +3,7 @@ package org.sillyjirafe.uoapi; import java.util.List; public interface Api { - String getURL(int page); + String getURL(int page, String apiKey); public List Parse(String JsonRaw); String getName(); } diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Caller.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Caller.java index 7418d30..726049b 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Caller.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Caller.java @@ -7,12 +7,12 @@ import java.net.http.HttpResponse; import java.util.List; public class Caller { - public static List CallApi(Api api, int page) throws Exception + public static List CallApi(Api api, int page, String apiKey) throws Exception { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create(api.getURL(page))) + .uri(URI.create(api.getURL(page, apiKey))) .GET() .build(); diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Out.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Out.java index fc8aa8f..0684e44 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Out.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Out.java @@ -32,13 +32,13 @@ public class Out { return bindnames; } - public List out(Map bindpages) throws Exception + public List out(Map bindpages, Map ApiKeys) throws Exception { List Elements = new ArrayList<>(); for (int i = 0; i < Apis.size(); i++) { - List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName())); + List currentapi = Caller.CallApi(Apis.get(i), bindpages.get(Apis.get(i).getName()), ApiKeys.get(Apis.get(i).getName())); for (int j = 0; j < currentapi.size(); j++) { Elements.add(currentapi.get(j)); diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubApacheApi.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubApacheApi.java index e58b68d..a90a8d9 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubApacheApi.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubApacheApi.java @@ -15,7 +15,7 @@ public class GitHubApacheApi implements Api return "GitHubApacheApi"; } - public String getURL(int page) { + public String getURL(int page, String apikey) { return "https://api.github.com/search/repositories?q=license:apache-2.0&page=" + page; } diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.java index ef8cacc..e207f31 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubLGPLApi.java @@ -16,7 +16,7 @@ public class GitHubLGPLApi implements Api return "GitHubLGPLApi"; } - public String getURL(int page) { + public String getURL(int page, String apikey) { return "https://api.github.com/search/repositories?q=license:lgpl-3.0&page=" + page; } diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubMITApi.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubMITApi.java index a0a0e15..86ecc7c 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubMITApi.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/GitHubMITApi.java @@ -15,7 +15,7 @@ public class GitHubMITApi implements Api return "GitHubMITApi"; } - public String getURL(int page) { + public String getURL(int page, String apikey) { return "https://api.github.com/search/repositories?q=license:mit&page=" + page; } diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.java index c6b8811..09f66e8 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseAudiosApi.java @@ -15,24 +15,23 @@ public class OpenVerseAudiosApi implements Api return "OpenVerseAudiosApi"; } - public String getURL(int page) { + public String getURL(int page, String apikey) { return "https://api.openverse.org/v1/audio/?format=json&page=" + page; } public List Parse(String jsonRaw) { List resultats = new ArrayList<>(); - try { JSONObject json = new JSONObject(jsonRaw); JSONArray items = json.getJSONArray("results"); for (int i = 0; i < items.length(); i++) { - JSONObject image = items.getJSONObject(i); + JSONObject audio = items.getJSONObject(i); - String titre = image.getString("title"); - String url = image.getString("url"); - String licence = image.getString("license"); + String titre = audio.getString("title"); + String url = audio.getString("url"); + String licence = audio.getString("license"); resultats.add(new element(titre, url, licence, "openverse", "audio")); } diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.java index 3fa3fbb..374f6b8 100644 --- a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.java +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/OpenVerseImagesApi.java @@ -15,7 +15,7 @@ public class OpenVerseImagesApi implements Api return "OpenVerseImagesApi"; } - public String getURL(int page) { + public String getURL(int page, String apikey) { return "https://api.openverse.org/v1/images/?format=json&page=" + page; } diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/PixabayImagesApi.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/PixabayImagesApi.java new file mode 100644 index 0000000..fe6b091 --- /dev/null +++ b/SillyJirafe.org/src/org/sillyjirafe/uoapi/binds/PixabayImagesApi.java @@ -0,0 +1,44 @@ +package org.sillyjirafe.uoapi.binds; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; +import org.sillyjirafe.uoapi.Api; +import org.sillyjirafe.uoapi.element; + +public class PixabayImagesApi implements Api +{ + public String getName() + { + return "PixabayImagesAPI"; + } + + public String getURL(int page, String apikey) { + return "https://pixabay.com/api/?page=" + page + "key=" + apikey; + } + + public List Parse(String jsonRaw) { + List resultats = new ArrayList<>(); + + try { + JSONObject json = new JSONObject(jsonRaw); + JSONArray items = json.getJSONArray(""); + + for (int i = 0; i < items.length(); i++) { + JSONObject repo = items.getJSONObject(i); + + String titre = repo.getString("full_name"); + String url = repo.getString("pageURL"); + String licence = repo.getJSONObject("license").getString("spdx_id"); + + resultats.add(new element(titre, url, licence, "pixabay", "image")); + } + } catch (org.json.JSONException e) { + System.out.println("error but continue : " + e.getMessage()); + } + + return resultats; + } +} diff --git a/sillyjirafe.org.api/.classpath b/sillyjirafe.org.api/.classpath index 62ce2ad..55088ad 100644 --- a/sillyjirafe.org.api/.classpath +++ b/sillyjirafe.org.api/.classpath @@ -6,12 +6,12 @@ - + - +