Uses 616K of libraries. Click here for Pure Java version (5211L/36K/118K).
1 | !752 |
2 | |
3 | p { |
4 | makeBot("Google Image Search."); |
5 | centerBigConsole(); |
6 | clearConsole(); |
7 | renameConsole(programName()); |
8 | print("Type what you want to see!"); |
9 | } |
10 | |
11 | static ImageSurface imageSurface; |
12 | |
13 | static S answer(final S s) { |
14 | print("Searching " + quote(s) + "..."); |
15 | final S url = googleImageSearch(s); |
16 | print("Done."); |
17 | if (nempty(url)) awt { |
18 | disposeFrame(imageSurface); |
19 | final BufferedImage img = loadImage2(url); |
20 | imageSurface = showImage(quote(s), img); |
21 | addToWindowAndPack(imageSurface, jbutton("Upload to Database", r { |
22 | JTextField tf = new JTextField(s); |
23 | /*showTitledForm("Upload to Database", |
24 | "Name", tf, |
25 | r {*/ |
26 | S imageURL = uploadToImageServer(img, s + " [Google]"); |
27 | print("Image Uploaded! => " + imageURL); |
28 | //}); |
29 | })); |
30 | magiclyFocusConsole(); |
31 | } |
32 | ret url; |
33 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005000 |
Snippet name: | Test Google Image Search |
Eternal ID of this version: | #1005000/1 |
Text MD5: | 9b5f9cd202c6cf36b8f8eeb00d925920 |
Transpilation MD5: | 98d7b25a36f65370ace234a7c0e3ecca |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-22 23:14:01 |
Source code size: | 876 bytes / 33 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 679 / 719 |
Referenced in: | [show references] |