diff --git a/.metadata/.lock_info b/.metadata/.lock_info index 19aec37..7cf1fc3 100644 --- a/.metadata/.lock_info +++ b/.metadata/.lock_info @@ -1,4 +1,4 @@ -#Thu Sep 10 12:58:40 CEST 2026 +#Tue Sep 29 23:22:28 CEST 2026 display=\:0 process-id=7 user=kotama diff --git a/.metadata/.log b/.metadata/.log index 8e854dc..02e4171 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -1567,3 +1567,555 @@ Caused by: java.net.UnknownHostException: CelesteKC-PC: Name or service not know !ENTRY ch.qos.logback.classic 1 0 2026-09-10 12:58:41.272 !MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-10 21:57:38.860 ----------------------------------------------- +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-10 21:57:42.766 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-10 21:57:45.609 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-10 21:57:45.610 +!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-10 21:57:46.239 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-11 11:39:55.169 ----------------------------------------------- +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-11 11:40:00.350 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-11 11:40:37.371 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-11 11:40:37.371 +!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-11 11:40:38.326 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-14 14:55:55.714 ----------------------------------------------- +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-14 14:56:00.844 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-14 14:56:04.427 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-14 14:56:04.428 +!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-14 14:56:05.322 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-14 21:37:05.431 ----------------------------------------------- +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-14 21:37:10.798 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-14 21:37:14.777 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-14 21:37:14.777 +!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-14 21:37:15.772 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-17 09:20:49.551 ----------------------------------------------- +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-17 09:20:54.024 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-17 09:20:59.575 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-17 09:20:59.576 +!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-17 09:21:00.421 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-17 09:26:55.154 ----------------------------------------------- +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-17 09:26:59.718 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-17 09:27:02.788 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-17 09:27:02.788 +!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-17 09:27:03.593 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-21 09:08:00.914 ----------------------------------------------- +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-21 09:08:05.459 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-21 09:08:18.507 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-21 09:08:18.507 +!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-21 09:08:19.552 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-21 12:25:51.646 ----------------------------------------------- +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-21 12:25:55.509 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-21 12:26:06.489 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-21 12:26:06.490 +!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-21 12:26:07.112 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-22 08:09:23.825 ----------------------------------------------- +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-22 08:09:28.354 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-22 08:09:33.010 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-22 08:09:33.010 +!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-22 08:09:33.837 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-22 16:37:04.308 ----------------------------------------------- +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-22 16:37:08.882 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-22 16:37:12.115 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-22 16:37:12.115 +!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-22 16:37:12.964 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-25 09:23:19.150 ----------------------------------------------- +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-25 09:23:23.039 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-25 09:23:35.898 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-25 09:23:35.898 +!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-25 09:23:36.546 +!MESSAGE Logback config file: /home/kotama/Silly-Jirafe/.metadata/.plugins/org.eclipse.m2e.logback/logback.2.7.101.20251017-1242.xml +!SESSION 2026-09-29 23:22:14.979 ----------------------------------------------- +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-29 23:22:18.801 +!MESSAGE Activated before the state location was initialized. Retry after the state location is initialized. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-29 23:22:28.187 +!MESSAGE Failed to read host name. + +!ENTRY org.eclipse.ui.ide 4 0 2026-09-29 23:22:28.187 +!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-29 23:22:28.792 +!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 deleted file mode 100644 index 658901d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/15/405bb4215dac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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/18/20fa1dd3e8a900111a85cda54c550706 b/.metadata/.plugins/org.eclipse.core.resources/.history/18/20fa1dd3e8a900111a85cda54c550706 deleted file mode 100644 index 28ce7f0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/18/20fa1dd3e8a900111a85cda54c550706 +++ /dev/null @@ -1,45 +0,0 @@ -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 CodeBergApi implements Api -{ - - public String getName() - { - return "CadeBergApi"; - } - - public String getURL(int page) { - return "https://codeberg.org/api/v1/repos/search?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, "codeberg", "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/19/c043650f18a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/19/c043650f18a90011182fc3eab58d65be deleted file mode 100644 index 68cc1c7..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/19/c043650f18a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return 1; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/21/a059b80507ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/21/a059b80507ad00111c90b3cc3652d2d3 deleted file mode 100644 index b69eb4c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/21/a059b80507ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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/22/5024eaf65aac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/22/5024eaf65aac00111450c012ccd5345a deleted file mode 100644 index ddf74cf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/22/5024eaf65aac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 55d826b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/27/90bcb4b454ac00111450c012ccd5345a +++ /dev/null @@ -1,49 +0,0 @@ -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/60a61b900cad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/2b/60a61b900cad00111c90b3cc3652d2d3 deleted file mode 100644 index fb72b3f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2b/60a61b900cad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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/?per_page=200&page=" + page + "&key=" + apikey; - } - - public List Parse(String jsonRaw) { - List resultats = new ArrayList<>(); - - try { - JSONObject json = new JSONObject(jsonRaw); - JSONArray items = json.getJSONArray("hits"); - - for (int i = 0; i < items.length(); i++) { - JSONObject repo = items.getJSONObject(i); - - String titre = repo.getString("name"); - String url = repo.getString("pageURL"); - String licence = "CC0"; - - 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/2b/e04613f012ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/2b/e04613f012ac00111663a416dae60ac7 deleted file mode 100644 index 9cf7fc9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/2b/e04613f012ac00111663a416dae60ac7 +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index ec85bec..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/32/401a75e311ac00111663a416dae60ac7 +++ /dev/null @@ -1,35 +0,0 @@ -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 deleted file mode 100644 index 1dc7e02..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/39/f0eb149912ac00111663a416dae60ac7 +++ /dev/null @@ -1,40 +0,0 @@ -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 deleted file mode 100644 index 3243d46..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3c/7051b11f6fab0011163bc5228b28d1d0 +++ /dev/null @@ -1,5 +0,0 @@ -package org.sillyjirafe.json; - -public class ApiKeys { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/30b8798d23a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/3f/30b8798d23a90011182fc3eab58d65be deleted file mode 100644 index ef75b26..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/3f/30b8798d23a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1, - rnd TEXT NOT NULL DEFAULT 'a' - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/40/101e9d0e13ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/40/101e9d0e13ac00111663a416dae60ac7 deleted file mode 100644 index e89e569..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/40/101e9d0e13ac00111663a416dae60ac7 +++ /dev/null @@ -1,42 +0,0 @@ -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 deleted file mode 100644 index 019d5ac..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/41/f0993a7954ac00111450c012ccd5345a +++ /dev/null @@ -1,49 +0,0 @@ -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/c00794f417a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/42/c00794f417a90011182fc3eab58d65be deleted file mode 100644 index e904e80..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/42/c00794f417a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public int getRND(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/42/e0a6e71f73ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/42/e0a6e71f73ab0011163bc5228b28d1d0 deleted file mode 100644 index 0f61593..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/42/e0a6e71f73ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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/44/d0420dfd18a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/44/d0420dfd18a90011182fc3eab58d65be deleted file mode 100644 index 684879c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/44/d0420dfd18a90011182fc3eab58d65be +++ /dev/null @@ -1,105 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1, - rnd TEXT NOT NULL DEFAULT 'a' - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - public static String NextLetter(String actual) { - char lettre = actual.charAt(0); - - if (lettre >= 'z') { - return "a"; - } - - char suivante = (char) (lettre + 1); - return String.valueOf(suivante); - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/47/e0cd01b470ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/47/e0cd01b470ab0011163bc5228b28d1d0 deleted file mode 100644 index 6384ad9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/47/e0cd01b470ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 9f09de6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4b/8043819c70ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,11 +0,0 @@ -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/4e/f038116618a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/4e/f038116618a90011182fc3eab58d65be deleted file mode 100644 index 1ebcdd5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/4e/f038116618a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/52/c029f0c872ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/52/c029f0c872ab0011163bc5228b28d1d0 deleted file mode 100644 index 837dfe5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/52/c029f0c872ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index d9c289f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/53/6023f29013ac00111663a416dae60ac7 +++ /dev/null @@ -1,47 +0,0 @@ -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/60540e2c15a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/53/60540e2c15a90011182fc3eab58d65be deleted file mode 100644 index 3391050..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/53/60540e2c15a90011182fc3eab58d65be +++ /dev/null @@ -1,50 +0,0 @@ -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()); - Apis.add(new CodeBergApi())); - - List bindnames = new ArrayList<>(); - - for (Api api : Apis) - { - bindnames.add(api.getName()); - } - - return bindnames; - } - - public List out(Map bindpages) 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/53/90f11e4c55ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/53/90f11e4c55ac00111450c012ccd5345a deleted file mode 100644 index ef8cacc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/53/90f11e4c55ac00111450c012ccd5345a +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index c3b3e66..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/59/10931aa214ac00111663a416dae60ac7 +++ /dev/null @@ -1,47 +0,0 @@ -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/5a/c0871b5717a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/5a/c0871b5717a90011182fc3eab58d65be deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f4240673ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f4240673ab0011163bc5228b28d1d0 deleted file mode 100644 index a49f1fe..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/5b/b0f4240673ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index 53b2e8b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6/603b27b66fab0011163bc5228b28d1d0 +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 4c460bd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6/606131b275ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,45 +0,0 @@ -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/66/50502fe707ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/66/50502fe707ad00111c90b3cc3652d2d3 deleted file mode 100644 index 76ff9f8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/66/50502fe707ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,45 +0,0 @@ -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.*; - -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()); - Apis.add(new PixabayImagesApi()); - 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/66/e0da330f15a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/66/e0da330f15a90011182fc3eab58d65be deleted file mode 100644 index 598cd71..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/66/e0da330f15a90011182fc3eab58d65be +++ /dev/null @@ -1,45 +0,0 @@ -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 CodeBergApi implements Api -{ - - public String getName() - { - return "CadeBergApi"; - } - - public String getURL(int page) { - return "https://codeberg.org/api/v1/repos/search?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/6c/a07e4c9a6fab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/6c/a07e4c9a6fab0011163bc5228b28d1d0 deleted file mode 100644 index 0d0580a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/6c/a07e4c9a6fab0011163bc5228b28d1d0 +++ /dev/null @@ -1,5 +0,0 @@ -package org.sillyjirafe.json; - -public class ApiKeys { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/70/f01b798d23a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/70/f01b798d23a90011182fc3eab58d65be deleted file mode 100644 index 0a371e6..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/70/f01b798d23a90011182fc3eab58d65be +++ /dev/null @@ -1,5 +0,0 @@ -package org.sillyjirafe.uoapi; - -public class ApiKeys { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/73/f0ba830318a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/73/f0ba830318a90011182fc3eab58d65be deleted file mode 100644 index 6f31353..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/73/f0ba830318a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public int getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("rnd"); - } else { - return 1; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/76/90e6fa3870ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/76/90e6fa3870ab0011163bc5228b28d1d0 deleted file mode 100644 index 7147712..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/76/90e6fa3870ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,9 +0,0 @@ -package org.sillyjirafe.json; - - -public class ApiKeys { - public void read() - { - - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/76/b09ff04519a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/76/b09ff04519a90011182fc3eab58d65be deleted file mode 100644 index 6f35584..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/76/b09ff04519a90011182fc3eab58d65be +++ /dev/null @@ -1,127 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1, - rnd TEXT NOT NULL DEFAULT 'a' - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName, int maxPage) throws SQLException { - int pageActuelle = getPage(bindName); - String rndActuel = getRND(bindName); - - int nouvellePage; - String nouveauRnd; - - if (pageActuelle >= maxPage) { - nouvellePage = 1; - nouveauRnd = NextLetter(rndActuel); - } else { - nouvellePage = pageActuelle + 1; - nouveauRnd = rndActuel; - } - - String sql = """ - INSERT INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?) - ON CONFLICT(bind_name) DO UPDATE SET last_page = ?, rnd = ? - """; - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.setInt(2, nouvellePage); - ps.setString(3, nouveauRnd); - ps.setInt(4, nouvellePage); - ps.setString(5, nouveauRnd); - ps.executeUpdate(); - } - } - public static String NextLetter(String actual) { - char[] lettres = actual.toCharArray(); - int i = lettres.length - 1; - - while (i >= 0) { - if (lettres[i] < 'z') { - lettres[i]++; - return new String(lettres); - } - lettres[i] = 'a'; - i--; - } - - return "a" + new String(lettres); - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/78/40fe34f872ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/78/40fe34f872ab0011163bc5228b28d1d0 deleted file mode 100644 index 8ef2dc1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/78/40fe34f872ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,23 +0,0 @@ -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/7b/306207b014a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/7b/306207b014a90011182fc3eab58d65be deleted file mode 100644 index 6d96581..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7b/306207b014a90011182fc3eab58d65be +++ /dev/null @@ -1,45 +0,0 @@ -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 CodeBergApi implements Api -{ - - public String getName() - { - return "GitHubMITApi"; - } - - public String getURL(int page) { - 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/7d/8008bb4672ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/8008bb4672ab0011163bc5228b28d1d0 deleted file mode 100644 index 81d6c09..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/8008bb4672ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,31 +0,0 @@ -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/7d/c075c3f717a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/7d/c075c3f717a90011182fc3eab58d65be deleted file mode 100644 index 5646a11..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/7d/c075c3f717a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public int getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/8/0035006a0bad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/8/0035006a0bad00111c90b3cc3652d2d3 deleted file mode 100644 index ded96de..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8/0035006a0bad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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/?per_page=200&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("name"); - String url = repo.getString("pageURL"); - String licence = "CC0"; - - 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/8/e02874c310ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/8/e02874c310ac00111663a416dae60ac7 deleted file mode 100644 index 1a85791..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8/e02874c310ac00111663a416dae60ac7 +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index 3b360eb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8/e0f0bf535dac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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/80/a0fcacd1f6a90011142ed1e6ed3e792d b/.metadata/.plugins/org.eclipse.core.resources/.history/80/a0fcacd1f6a90011142ed1e6ed3e792d deleted file mode 100644 index 6912190..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/80/a0fcacd1f6a90011142ed1e6ed3e792d +++ /dev/null @@ -1,5 +0,0 @@ -package org.sillyjirafe.uoapi; - -public class ApiKeys { - -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/81/0030164854ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/81/0030164854ac00111450c012ccd5345a deleted file mode 100644 index 55d826b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/81/0030164854ac00111450c012ccd5345a +++ /dev/null @@ -1,49 +0,0 @@ -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/86/60397b9018a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/86/60397b9018a90011182fc3eab58d65be deleted file mode 100644 index ef75b26..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/86/60397b9018a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1, - rnd TEXT NOT NULL DEFAULT 'a' - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/86/80864e9b18a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/86/80864e9b18a90011182fc3eab58d65be deleted file mode 100644 index 0da0eb3..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/86/80864e9b18a90011182fc3eab58d65be +++ /dev/null @@ -1,105 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1, - rnd TEXT NOT NULL DEFAULT 'a' - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - public static String lettreSuivante(String actuelle) { - char lettre = actuelle.charAt(0); - - if (lettre >= 'z') { - return "a"; - } - - char suivante = (char) (lettre + 1); - return String.valueOf(suivante); - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/88/a07194e872ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/88/a07194e872ab0011163bc5228b28d1d0 deleted file mode 100644 index d49ae00..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/88/a07194e872ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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/8a/6075ed6f09ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/8a/6075ed6f09ad00111c90b3cc3652d2d3 deleted file mode 100644 index fe6b091..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8a/6075ed6f09ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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/.metadata/.plugins/org.eclipse.core.resources/.history/8c/80aece3deba900111a85cda54c550706 b/.metadata/.plugins/org.eclipse.core.resources/.history/8c/80aece3deba900111a85cda54c550706 deleted file mode 100644 index ac3af9c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/8c/80aece3deba900111a85cda54c550706 +++ /dev/null @@ -1,51 +0,0 @@ -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.CodeBergApi; -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()); - Apis.add(new CodeBergApi()); - - List bindnames = new ArrayList<>(); - - for (Api api : Apis) - { - bindnames.add(api.getName()); - } - - return bindnames; - } - - public List out(Map bindpages) 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/90/e017133a71ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/90/e017133a71ab0011163bc5228b28d1d0 deleted file mode 100644 index 30c4400..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/90/e017133a71ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,24 +0,0 @@ -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 deleted file mode 100644 index dab8d6a..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/92/c0e148b45cac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index b128ea1..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/2060069f12ac00111663a416dae60ac7 +++ /dev/null @@ -1,40 +0,0 @@ -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/98/400969dc0cad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/98/400969dc0cad00111c90b3cc3652d2d3 deleted file mode 100644 index cade396..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/98/400969dc0cad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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/?per_page=200&page=" + page + "&key=" + apikey; - } - - public List Parse(String jsonRaw) { - List resultats = new ArrayList<>(); - - try { - JSONObject json = new JSONObject(jsonRaw); - JSONArray items = json.getJSONArray("hits"); - - for (int i = 0; i < items.length(); i++) { - JSONObject repo = items.getJSONObject(i); - - String titre = repo.getString("name"); - String url = repo.getString("pageURL"); - String licence = "CC0"; - - 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/99/b0c3c14a72ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/99/b0c3c14a72ab0011163bc5228b28d1d0 deleted file mode 100644 index a294b50..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/99/b0c3c14a72ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index c3b3e66..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/a/a09eef8713ac00111663a416dae60ac7 +++ /dev/null @@ -1,47 +0,0 @@ -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/ae/c06b1d0c18a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/ae/c06b1d0c18a90011182fc3eab58d65be deleted file mode 100644 index 61d42ee..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ae/c06b1d0c18a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public int getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return 1; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/af/c0c2dbba6fab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/af/c0c2dbba6fab0011163bc5228b28d1d0 deleted file mode 100644 index 6ca33f9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/af/c0c2dbba6fab0011163bc5228b28d1d0 +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index d235dbf..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/0072fb2f13ac00111663a416dae60ac7 +++ /dev/null @@ -1,45 +0,0 @@ -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/c09a280c07ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/b/c09a280c07ad00111c90b3cc3652d2d3 deleted file mode 100644 index ae8f6bb..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/c09a280c07ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,45 +0,0 @@ -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"); - Map ApiKeys = new HashMap(); - 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"); - - 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/b/e0fef37954ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/b/e0fef37954ac00111450c012ccd5345a deleted file mode 100644 index 942d932..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b/e0fef37954ac00111450c012ccd5345a +++ /dev/null @@ -1,49 +0,0 @@ -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/b2/5006d8ef17a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/b2/5006d8ef17a90011182fc3eab58d65be deleted file mode 100644 index 92412af..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b2/5006d8ef17a90011182fc3eab58d65be +++ /dev/null @@ -1,80 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1 - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/10835d2771ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/b4/10835d2771ab0011163bc5228b28d1d0 deleted file mode 100644 index 3c1fecd..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b4/10835d2771ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,16 +0,0 @@ -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/b5/007c70d907ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/b5/007c70d907ad00111c90b3cc3652d2d3 deleted file mode 100644 index a0cab5c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b5/007c70d907ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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.*; -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()); - Apis.add(new PixabayImagesApi()); - 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/b9/e0fc094b0aad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/b9/e0fc094b0aad00111c90b3cc3652d2d3 deleted file mode 100644 index f9868db..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/b9/e0fc094b0aad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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("name"); - String url = repo.getString("pageURL"); - String licence = "CC0"; - - 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/bb/7026230411ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/bb/7026230411ac00111663a416dae60ac7 deleted file mode 100644 index 533bccc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bb/7026230411ac00111663a416dae60ac7 +++ /dev/null @@ -1,33 +0,0 @@ -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/10878f41eba900111a85cda54c550706 b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/10878f41eba900111a85cda54c550706 deleted file mode 100644 index 8e4a727..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/10878f41eba900111a85cda54c550706 +++ /dev/null @@ -1,50 +0,0 @@ -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.CodeBergApi; -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) 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/bd/7006918e56ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/bd/7006918e56ac00111450c012ccd5345a deleted file mode 100644 index 89f438d..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/bd/7006918e56ac00111450c012ccd5345a +++ /dev/null @@ -1,47 +0,0 @@ -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 deleted file mode 100644 index 9e72cc4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c8/30a865ec12ac00111663a416dae60ac7 +++ /dev/null @@ -1,40 +0,0 @@ -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/c8/a0e8abd707ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/c8/a0e8abd707ad00111c90b3cc3652d2d3 deleted file mode 100644 index 24aedcc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c8/a0e8abd707ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,50 +0,0 @@ -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.*; -import org.sillyjirafe.uoapi.binds.GitHubLGPLApi; -import org.sillyjirafe.uoapi.binds.GitHubMITApi; -import org.sillyjirafe.uoapi.binds.OpenVerseAudiosApi; -import org.sillyjirafe.uoapi.binds.OpenVerseImagesApi; -import org.sillyjirafe.uoapi.binds.PixabayImagesApi; - -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()); - Apis.add(new PixabayImagesApi()); - 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/c9/002b02a759ac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/c9/002b02a759ac00111450c012ccd5345a deleted file mode 100644 index bfb217c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c9/002b02a759ac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 72d19d0..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/c9/f04ce75b12ac00111663a416dae60ac7 +++ /dev/null @@ -1,37 +0,0 @@ -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/ca/60a86a7909ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/ca/60a86a7909ad00111c90b3cc3652d2d3 deleted file mode 100644 index 449f10e..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/ca/60a86a7909ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,44 +0,0 @@ -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("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/d/10baee1113ac00111663a416dae60ac7 b/.metadata/.plugins/org.eclipse.core.resources/.history/d/10baee1113ac00111663a416dae60ac7 deleted file mode 100644 index 4a0d6d4..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d/10baee1113ac00111663a416dae60ac7 +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index b59a60c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d1/30e436e571ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,25 +0,0 @@ -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/d5/b0b34c3aeba900111a85cda54c550706 b/.metadata/.plugins/org.eclipse.core.resources/.history/d5/b0b34c3aeba900111a85cda54c550706 deleted file mode 100644 index 881091c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/d5/b0b34c3aeba900111a85cda54c550706 +++ /dev/null @@ -1,45 +0,0 @@ -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 CodeBergApi implements Api -{ - - public String getName() - { - return "CadeBergApi"; - } - - public String getURL(int page) { - return "https://codeberg.org/api/v1/repos/search?page=" + page; - } - - public List Parse(String jsonRaw) { - List resultats = new ArrayList<>(); - - - try { - JSONObject json = new JSONObject(jsonRaw); - JSONArray items = json.getJSONArray("data"); - - 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, "codeberg", "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/da/00124e545bac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/da/00124e545bac00111450c012ccd5345a deleted file mode 100644 index 07fc475..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/da/00124e545bac00111450c012ccd5345a +++ /dev/null @@ -1,43 +0,0 @@ -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/da/401c957218a90011182fc3eab58d65be b/.metadata/.plugins/org.eclipse.core.resources/.history/da/401c957218a90011182fc3eab58d65be deleted file mode 100644 index cf7c022..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/da/401c957218a90011182fc3eab58d65be +++ /dev/null @@ -1,94 +0,0 @@ -package org.sillyjirafe.db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; - -public class Crawl_StateDB -{ - String URL = new String(); - String insertSql = "INSERT OR IGNORE INTO crawlstates (bind_name, last_page, rnd) VALUES (?, ?, ?)"; - Connection connection; - - public Crawl_StateDB(String BDstr) throws SQLException - { - URL = BDstr; - connection = DriverManager.getConnection(URL); - } - - public void LinkToDB() throws SQLException - { - try (Statement stmt = connection.createStatement()) - { - stmt.execute(""" - CREATE TABLE IF NOT EXISTS crawlstates ( - bind_name TEXT PRIMARY KEY, - last_page INTEGER NOT NULL DEFAULT 1, - rnd TEXT NOT NULL DEFAULT a - ) - """); - } - } - - public void AddEllement(String bind, int lastpage) throws SQLException - { - try (PreparedStatement ps = connection.prepareStatement(insertSql)) - { - ps.setString(1, bind); - ps.setInt(2, lastpage); - ps.executeUpdate(); - System.out.printf("%s is now page %d \n", bind, lastpage); - } - } - - public int getPage(String bindName) throws SQLException { - String sql = "SELECT last_page FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getInt("last_page"); - } else { - return 1; - } - } - } - public String getRND(String bindName) throws SQLException { - String sql = "SELECT rnd FROM crawlstates WHERE bind_name = ?"; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ResultSet rs = ps.executeQuery(); - - if (rs.next()) { - return rs.getString("rnd"); - } else { - return "a"; - } - } - } - public void updatePage(String bindName) throws SQLException { - String sql = """ - INSERT INTO crawlstates (bind_name, last_page) VALUES (?, 2) - ON CONFLICT(bind_name) DO UPDATE SET last_page = last_page + 1 - """; - - try (PreparedStatement ps = connection.prepareStatement(sql)) { - ps.setString(1, bindName); - ps.executeUpdate(); - } - } - - public void Close() throws SQLException - { - if (connection != null) - { - connection.close(); - } - } -} diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/db/1037e20073ab0011163bc5228b28d1d0 b/.metadata/.plugins/org.eclipse.core.resources/.history/db/1037e20073ab0011163bc5228b28d1d0 deleted file mode 100644 index 4fb5f59..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/db/1037e20073ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index bd62eb5..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/dc/908703fb72ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 86ecc7c..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/00dd72ba5aac00111450c012ccd5345a +++ /dev/null @@ -1,45 +0,0 @@ -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 deleted file mode 100644 index 4fb5f59..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/dd/20be97f572ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index d5e82a8..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e0/b0ee14e35aac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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/e1/108e942df8a90011142ed1e6ed3e792d b/.metadata/.plugins/org.eclipse.core.resources/.history/e1/108e942df8a90011142ed1e6ed3e792d deleted file mode 100644 index e69de29..0000000 diff --git a/.metadata/.plugins/org.eclipse.core.resources/.history/e4/d058f25f5dac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/e4/d058f25f5dac00111450c012ccd5345a deleted file mode 100644 index a0951b9..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e4/d058f25f5dac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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/e6/10f2bac707ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/e6/10f2bac707ad00111c90b3cc3652d2d3 deleted file mode 100644 index 0684e44..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e6/10f2bac707ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,49 +0,0 @@ -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/e9/70dd26205dac00111450c012ccd5345a b/.metadata/.plugins/org.eclipse.core.resources/.history/e9/70dd26205dac00111450c012ccd5345a deleted file mode 100644 index 8ac50af..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/e9/70dd26205dac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 6a68053..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f6/30b29f5754ac00111450c012ccd5345a +++ /dev/null @@ -1,49 +0,0 @@ -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 deleted file mode 100644 index 6cc606f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f9/a0ca195554ac00111450c012ccd5345a +++ /dev/null @@ -1,49 +0,0 @@ -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 deleted file mode 100644 index 00c67a2..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/f9/c020c5b375ab0011163bc5228b28d1d0 +++ /dev/null @@ -1,28 +0,0 @@ -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 deleted file mode 100644 index 533bccc..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fa/005dc4e111ac00111663a416dae60ac7 +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index 91a7abe..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fb/705067f15aac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index 320aa8b..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fc/40b1b1b05cac00111450c012ccd5345a +++ /dev/null @@ -1,44 +0,0 @@ -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/.history/fd/c06d9ad507ad00111c90b3cc3652d2d3 b/.metadata/.plugins/org.eclipse.core.resources/.history/fd/c06d9ad507ad00111c90b3cc3652d2d3 deleted file mode 100644 index c70384f..0000000 --- a/.metadata/.plugins/org.eclipse.core.resources/.history/fd/c06d9ad507ad00111c90b3cc3652d2d3 +++ /dev/null @@ -1,49 +0,0 @@ -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()); - Apis.add(new PixabayImagesApi()); - 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/.projects/.org.eclipse.egit.core.cmp/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap deleted file mode 100644 index fd766bf..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap deleted file mode 100644 index fd766bf..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap and /dev/null 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 deleted file mode 100644 index cca827b..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/d6/history.index and /dev/null 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 deleted file mode 100644 index 40c64f7..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/40/history.index and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/7e/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/7e/history.index deleted file mode 100644 index 6dd7d6e..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/7e/history.index and /dev/null 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 deleted file mode 100644 index 9b3f375..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.indexes/e4/e4/90/e8/history.index and /dev/null 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 1842f63..e00f626 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/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.markers.snap deleted file mode 100644 index 9256d7a..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.markers.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.syncinfo.snap deleted file mode 100644 index fd766bf..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/SillyJirafe.org/.syncinfo.snap and /dev/null 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 new file mode 100644 index 0000000..5c59b6d Binary files /dev/null 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.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.markers.snap deleted file mode 100644 index fd766bf..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.markers.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.syncinfo.snap deleted file mode 100644 index fd766bf..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/sillyjirafe.org.api/.syncinfo.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap deleted file mode 100644 index bf279e7..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap 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 deleted file mode 100644 index d231f33..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/25.tree and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/37.tree b/.metadata/.plugins/org.eclipse.core.resources/.root/37.tree new file mode 100644 index 0000000..592f297 Binary files /dev/null and b/.metadata/.plugins/org.eclipse.core.resources/.root/37.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 1c37cda..1472d19 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.resources/25.snap b/.metadata/.plugins/org.eclipse.core.resources/25.snap deleted file mode 100644 index 1924734..0000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/25.snap and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs index 4b54bf5..a2e2ec3 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs @@ -1,20 +1,3 @@ eclipse.preferences.version=1 -org.eclipse.debug.ui.MemoryHistoryKnownColor=235,235,235 -org.eclipse.debug.ui.MemoryHistoryKnownColor,defaultValueBeforeOverriddenFromCSS=0,0,0 -org.eclipse.debug.ui.MemoryHistoryUnknownColor=170,175,185 -org.eclipse.debug.ui.MemoryHistoryUnknownColor,defaultValueBeforeOverriddenFromCSS=114,119,129 -org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND=150,80,115 -org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND,defaultValueBeforeOverriddenFromCSS=255,255,0 org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\n\n -org.eclipse.debug.ui.changedDebugElement=255,128,128 -org.eclipse.debug.ui.changedDebugElement,defaultValueBeforeOverriddenFromCSS=255,0,0 -org.eclipse.debug.ui.consoleBackground=53,53,53 -org.eclipse.debug.ui.consoleBackground,defaultValueBeforeOverriddenFromCSS=255,255,255 -org.eclipse.debug.ui.errorColor=225,30,70 -org.eclipse.debug.ui.errorColor,defaultValueBeforeOverriddenFromCSS=255,0,0 -org.eclipse.debug.ui.inColor=140,175,210 -org.eclipse.debug.ui.inColor,defaultValueBeforeOverriddenFromCSS=0,200,125 -org.eclipse.debug.ui.outColor=235,235,235 -org.eclipse.debug.ui.outColor,defaultValueBeforeOverriddenFromCSS=0,0,0 -overriddenByCSS=,org.eclipse.debug.ui.MemoryHistoryKnownColor,org.eclipse.debug.ui.MemoryHistoryUnknownColor,org.eclipse.debug.ui.PREF_CHANGED_VALUE_BACKGROUND,org.eclipse.debug.ui.changedDebugElement,org.eclipse.debug.ui.consoleBackground,org.eclipse.debug.ui.errorColor,org.eclipse.debug.ui.inColor,org.eclipse.debug.ui.outColor, preferredTargets=default\:default| diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs index f01384c..ccc96c7 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs @@ -1,158 +1,10 @@ -content_assist_completion_replacement_background=200,200,0 -content_assist_completion_replacement_background,defaultValueBeforeOverriddenFromCSS=255,255,0 -content_assist_completion_replacement_foreground=200,0,0 -content_assist_completion_replacement_foreground,defaultValueBeforeOverriddenFromCSS=255,0,0 content_assist_disabled_computers=org.eclipse.jdt.ui.textProposalCategory\u0000org.eclipse.jdt.ui.javaPostfixProposalCategory\u0000org.eclipse.jdt.ui.javaAllProposalCategory\u0000org.eclipse.jdt.ui.javaTypeProposalCategory\u0000org.eclipse.jdt.ui.javaNoTypeProposalCategory\u0000org.eclipse.jdt.ui.javaChainProposalCategory\u0000 content_assist_lru_history= content_assist_number_of_computers=15 -content_assist_parameters_background=52,57,61 -content_assist_parameters_background,defaultValueBeforeOverriddenFromCSS=255,255,255 -content_assist_parameters_foreground=238,238,238 -content_assist_parameters_foreground,defaultValueBeforeOverriddenFromCSS=0,0,0 content_assist_proposals_background=20,22,24 content_assist_proposals_foreground=252,252,252 eclipse.preferences.version=1 -java_bracket=249,250,244 -java_bracket,defaultValueBeforeOverriddenFromCSS=0,0,0 -java_comment_task_tag=154,140,124 -java_comment_task_tag,defaultValueBeforeOverriddenFromCSS=127,159,191 -java_default=217,232,247 -java_default,defaultValueBeforeOverriddenFromCSS=0,0,0 -java_doc_default=128,128,128 -java_doc_default,defaultValueBeforeOverriddenFromCSS=63,95,191 -java_doc_keyword=154,140,124 -java_doc_keyword,defaultValueBeforeOverriddenFromCSS=127,159,191 -java_doc_link=169,156,140 -java_doc_link,defaultValueBeforeOverriddenFromCSS=63,63,191 -java_doc_tag=30,120,155 -java_doc_tag,defaultValueBeforeOverriddenFromCSS=127,127,159 -java_keyword=204,108,29 -java_keyword,defaultValueBeforeOverriddenFromCSS=127,0,85 -java_keyword_bold=false -java_keyword_bold,defaultValueBeforeOverriddenFromCSS=true -java_keyword_return=204,108,29 -java_keyword_return,defaultValueBeforeOverriddenFromCSS=127,0,85 -java_keyword_return_bold=false -java_keyword_return_bold,defaultValueBeforeOverriddenFromCSS=true -java_multi_line_comment=128,128,128 -java_multi_line_comment,defaultValueBeforeOverriddenFromCSS=63,127,95 -java_operator=230,230,250 -java_operator,defaultValueBeforeOverriddenFromCSS=0,0,0 -java_single_line_comment=128,128,128 -java_single_line_comment,defaultValueBeforeOverriddenFromCSS=63,127,95 -java_string=23,198,163 -java_string,defaultValueBeforeOverriddenFromCSS=42,0,255 -javadocElementsStyling.darkModeDefaultColors=true -matchingBracketsColor=249,250,244 -matchingBracketsColor,defaultValueBeforeOverriddenFromCSS=127,0,85 org.eclipse.jdt.ui.formatterprofiles.version=23 -overriddenByCSS=,content_assist_completion_replacement_background,content_assist_completion_replacement_foreground,content_assist_parameters_background,content_assist_parameters_foreground,java_bracket,java_comment_task_tag,java_default,java_doc_default,java_doc_keyword,java_doc_link,java_doc_tag,java_keyword,java_keyword_bold,java_keyword_return,java_keyword_return_bold,java_multi_line_comment,java_operator,java_single_line_comment,java_string,matchingBracketsColor,pf_coloring_argument,pf_coloring_assignment,pf_coloring_comment,pf_coloring_key,pf_coloring_value,semanticHighlighting.abstractClass.color,semanticHighlighting.abstractClass.enabled,semanticHighlighting.abstractMethodInvocation.color,semanticHighlighting.abstractMethodInvocation.enabled,semanticHighlighting.annotation.color,semanticHighlighting.annotation.enabled,semanticHighlighting.annotation.italic,semanticHighlighting.annotationElementReference.color,semanticHighlighting.annotationElementReference.enabled,semanticHighlighting.class.color,semanticHighlighting.class.enabled,semanticHighlighting.deprecatedMember.color,semanticHighlighting.deprecatedMember.enabled,semanticHighlighting.deprecatedMember.underline,semanticHighlighting.deprecatedMember.strikethrough,semanticHighlighting.enum.color,semanticHighlighting.enum.enabled,semanticHighlighting.enum.italic,semanticHighlighting.field.color,semanticHighlighting.field.enabled,semanticHighlighting.inheritedField.color,semanticHighlighting.inheritedMethodInvocation.color,semanticHighlighting.inheritedMethodInvocation.enabled,semanticHighlighting.interface.color,semanticHighlighting.interface.enabled,semanticHighlighting.localVariable.color,semanticHighlighting.localVariable.enabled,semanticHighlighting.localVariableDeclaration.color,semanticHighlighting.localVariableDeclaration.enabled,semanticHighlighting.localVariableDeclaration.bold,semanticHighlighting.method.color,semanticHighlighting.method.enabled,semanticHighlighting.methodDeclarationName.color,semanticHighlighting.methodDeclarationName.enabled,semanticHighlighting.methodDeclarationName.bold,semanticHighlighting.number.color,semanticHighlighting.number.enabled,semanticHighlighting.parameterVariable.color,semanticHighlighting.parameterVariable.enabled,semanticHighlighting.staticField.color,semanticHighlighting.staticField.enabled,semanticHighlighting.staticFinalField.color,semanticHighlighting.staticFinalField.enabled,semanticHighlighting.staticMethodInvocation.color,semanticHighlighting.staticMethodInvocation.enabled,semanticHighlighting.typeArgument.color,semanticHighlighting.typeArgument.enabled,semanticHighlighting.typeParameter.color,semanticHighlighting.typeParameter.enabled,semanticHighlighting.typeParameter.bold,semanticHighlighting.restrictedKeywords.color,semanticHighlighting.restrictedKeywords.bold,sourceHoverBackgroundColor,javadocElementsStyling.darkModeDefaultColors, -pf_coloring_argument=221,40,103 -pf_coloring_argument,defaultValueBeforeOverriddenFromCSS=127,0,85 -pf_coloring_assignment=217,232,247 -pf_coloring_assignment,defaultValueBeforeOverriddenFromCSS=0,0,0 -pf_coloring_comment=128,128,128 -pf_coloring_comment,defaultValueBeforeOverriddenFromCSS=63,127,95 -pf_coloring_key=217,232,247 -pf_coloring_key,defaultValueBeforeOverriddenFromCSS=0,0,0 -pf_coloring_value=23,198,163 -pf_coloring_value,defaultValueBeforeOverriddenFromCSS=42,0,255 -semanticHighlighting.abstractClass.color=62,171,230 -semanticHighlighting.abstractClass.color,defaultValueBeforeOverriddenFromCSS=139,136,22 -semanticHighlighting.abstractClass.enabled=true -semanticHighlighting.abstractClass.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.abstractMethodInvocation.color=128,246,167 -semanticHighlighting.abstractMethodInvocation.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.abstractMethodInvocation.enabled=true -semanticHighlighting.abstractMethodInvocation.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.annotation.color=160,160,160 -semanticHighlighting.annotation.color,defaultValueBeforeOverriddenFromCSS=100,100,100 -semanticHighlighting.annotation.enabled=true -semanticHighlighting.annotation.italic=true -semanticHighlighting.annotation.italic,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.annotationElementReference.color=235,75,100 -semanticHighlighting.annotationElementReference.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.annotationElementReference.enabled=true -semanticHighlighting.annotationElementReference.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.class.color=18,144,195 -semanticHighlighting.class.color,defaultValueBeforeOverriddenFromCSS=0,80,50 -semanticHighlighting.class.enabled=true -semanticHighlighting.class.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.deprecatedMember.color=128,128,128 -semanticHighlighting.deprecatedMember.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.deprecatedMember.enabled=true -semanticHighlighting.deprecatedMember.strikethrough=true -semanticHighlighting.deprecatedMember.underline=false -semanticHighlighting.enum.color=204,129,186 -semanticHighlighting.enum.color,defaultValueBeforeOverriddenFromCSS=100,70,50 -semanticHighlighting.enum.enabled=true -semanticHighlighting.enum.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.enum.italic=true -semanticHighlighting.enum.italic,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.field.color=102,225,248 -semanticHighlighting.field.color,defaultValueBeforeOverriddenFromCSS=0,0,192 -semanticHighlighting.field.enabled=true -semanticHighlighting.inheritedField.color=143,143,191 -semanticHighlighting.inheritedField.color,defaultValueBeforeOverriddenFromCSS=0,0,192 -semanticHighlighting.inheritedMethodInvocation.color=205,246,104 -semanticHighlighting.inheritedMethodInvocation.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.inheritedMethodInvocation.enabled=true -semanticHighlighting.inheritedMethodInvocation.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.interface.color=128,242,246 -semanticHighlighting.interface.color,defaultValueBeforeOverriddenFromCSS=50,63,112 -semanticHighlighting.interface.enabled=true -semanticHighlighting.interface.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.localVariable.color=243,236,121 -semanticHighlighting.localVariable.color,defaultValueBeforeOverriddenFromCSS=106,62,62 -semanticHighlighting.localVariable.enabled=true -semanticHighlighting.localVariableDeclaration.bold=false -semanticHighlighting.localVariableDeclaration.bold,defaultValueBeforeOverriddenFromCSS=true -semanticHighlighting.localVariableDeclaration.color=242,242,0 -semanticHighlighting.localVariableDeclaration.color,defaultValueBeforeOverriddenFromCSS=106,62,62 -semanticHighlighting.localVariableDeclaration.enabled=true -semanticHighlighting.localVariableDeclaration.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.method.color=167,236,33 -semanticHighlighting.method.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.method.enabled=true -semanticHighlighting.method.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.methodDeclarationName.bold=false -semanticHighlighting.methodDeclarationName.bold,defaultValueBeforeOverriddenFromCSS=true -semanticHighlighting.methodDeclarationName.color=30,181,64 -semanticHighlighting.methodDeclarationName.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.methodDeclarationName.enabled=true -semanticHighlighting.methodDeclarationName.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.number.color=104,151,187 -semanticHighlighting.number.color,defaultValueBeforeOverriddenFromCSS=42,0,255 -semanticHighlighting.number.enabled=true -semanticHighlighting.number.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.parameterVariable.color=121,171,255 -semanticHighlighting.parameterVariable.color,defaultValueBeforeOverriddenFromCSS=106,62,62 -semanticHighlighting.parameterVariable.enabled=true -semanticHighlighting.parameterVariable.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.restrictedKeywords.bold=false -semanticHighlighting.restrictedKeywords.bold,defaultValueBeforeOverriddenFromCSS=true -semanticHighlighting.restrictedKeywords.color=204,108,29 -semanticHighlighting.restrictedKeywords.color,defaultValueBeforeOverriddenFromCSS=127,0,85 -semanticHighlighting.staticField.color=141,218,248 -semanticHighlighting.staticField.color,defaultValueBeforeOverriddenFromCSS=0,0,192 -semanticHighlighting.staticField.enabled=true -semanticHighlighting.staticFinalField.color=141,218,248 -semanticHighlighting.staticFinalField.color,defaultValueBeforeOverriddenFromCSS=0,0,192 -semanticHighlighting.staticFinalField.enabled=true -semanticHighlighting.staticMethodInvocation.color=150,236,63 -semanticHighlighting.staticMethodInvocation.color,defaultValueBeforeOverriddenFromCSS=0,0,0 -semanticHighlighting.staticMethodInvocation.enabled=true -semanticHighlighting.typeArgument.color=177,102,218 -semanticHighlighting.typeArgument.color,defaultValueBeforeOverriddenFromCSS=13,100,0 -semanticHighlighting.typeArgument.enabled=true -semanticHighlighting.typeArgument.enabled,defaultValueBeforeOverriddenFromCSS=false -semanticHighlighting.typeParameter.bold=false -semanticHighlighting.typeParameter.bold,defaultValueBeforeOverriddenFromCSS=true -semanticHighlighting.typeParameter.color=191,164,164 -semanticHighlighting.typeParameter.color,defaultValueBeforeOverriddenFromCSS=100,70,50 -semanticHighlighting.typeParameter.enabled=true -semanticHighlighting.typeParameter.enabled,defaultValueBeforeOverriddenFromCSS=false -sourceHoverBackgroundColor=68,68,68 spelling_locale_initialized=true typefilter_migrated_2=true useAnnotationsPrefPage=true 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 88d3353..0c4d288 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=945728594589462 +platformState=945730117414574 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 470a692..5118f45 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,2395 +179,2393 @@ - - + + 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 + active + activeOnClose - + 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 - active - + 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 - + - - 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 categoryTag:General - - + + glue move_after:PerspectiveSpacer SHOW_RESTORE_MENU - + move_after:Spacer Glue HIDEABLE SHOW_RESTORE_MENU - + glue move_after:SearchField SHOW_RESTORE_MENU - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index b/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index index 028da6f..31fc136 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 82120c6..faefc75 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.ui/dialog_settings.xml b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml index 45cb2a5..8e95157 100644 --- a/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml +++ b/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml @@ -72,24 +72,26 @@
- + - + + +
- + - +
diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png deleted file mode 100644 index aba8b33..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/0.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png b/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png deleted file mode 100644 index f8696d9..0000000 Binary files a/.metadata/.plugins/org.eclipse.jdt.ui/jdt-images/1.png and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.m2e.logback/0.log b/.metadata/.plugins/org.eclipse.m2e.logback/0.log index 1b95749..e4625b9 100644 --- a/.metadata/.plugins/org.eclipse.m2e.logback/0.log +++ b/.metadata/.plugins/org.eclipse.m2e.logback/0.log @@ -27,3 +27,15 @@ 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. 2026-09-10 12:58:48,106 [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-10 21:57:52,127 [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-11 11:40:46,703 [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-14 14:56:12,084 [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-14 21:37:22,848 [Worker-1: 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-17 09:21:07,019 [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-17 09:27:10,366 [Worker-5: 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-21 09:08:26,277 [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-21 12:26:12,813 [Worker-5: 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-22 08:09:40,540 [Worker-5: 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-22 16:37:19,751 [Worker-7: 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-25 09:23:41,947 [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-29 23:22:34,391 [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. diff --git a/.metadata/version.ini b/.metadata/version.ini index 1da26da..8ddf89c 100644 --- a/.metadata/version.ini +++ b/.metadata/version.ini @@ -1,3 +1,3 @@ -#Thu Sep 10 12:58:40 CEST 2026 +#Tue Sep 29 23:22:28 CEST 2026 org.eclipse.core.runtime=2 org.eclipse.platform=4.40.0.v20260601-0713 diff --git a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Api.class b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/Api.class index e6afb47..4041b85 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 6eeeb8d..44729bb 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 2a59404..7483d82 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 4aab471..0d3de36 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 904d6c1..d7b563b 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 a342481..3b9d7b4 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 e208623..7decca4 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 70bc5d2..f58a01a 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 index b4e0082..4be86b4 100644 Binary files a/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/PixabayImagesApi.class and b/SillyJirafe.org/bin/org/sillyjirafe/uoapi/binds/PixabayImagesApi.class differ diff --git a/SillyJirafe.org/src/org/sillyjirafe/uoapi/Api.java b/SillyJirafe.org/src/org/sillyjirafe/uoapi/Api.java index 670c585..dd8f849 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 apiKey); + String getURL(int page, String apiKey, String rnd); 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 726049b..e7f3305 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, String apiKey) throws Exception + public static List CallApi(Api api, int page, String apiKey, String rnd) throws Exception { HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() - .uri(URI.create(api.getURL(page, apiKey))) + .uri(URI.create(api.getURL(page, apiKey, rnd))) .GET() .build();