Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arnoudbuzing committed Sep 17, 2019
1 parent 1d0074b commit 026f26f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Prototypes/PacletInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Description -> "A paclet for prototype functions",
Creator -> "Arnoud Buzing",
Publisher -> "Wolfram Research",
Version -> "0.5.4",
MathematicaVersion -> "11.2+",
Version -> "0.5.5",
MathematicaVersion -> "11.3+",
Loading -> Automatic,
Thumbnail -> "icons/icon.png",
Extensions -> {
Expand Down Expand Up @@ -60,7 +60,8 @@
"Prototypes`CacheClear", "Prototypes`SatelliteImage","Prototypes`PlaceholderImage","Prototypes`ResourceFunctionSearch",
"Prototypes`Redder","Prototypes`Bluer", "Prototypes`Greener", "Prototypes`Yellower", "Prototypes`Oranger",
"Prototypes`Pinker", "Prototypes`Purpler", "Prototypes`Blacker", "Prototypes`Grayer", "Prototypes`Whiter",
"Prototypes`AddCodeCompletion", "Prototypes`RasterizeLargeCells", "Prototypes`RandomDate", "Prototypes`MessageBlock"}
"Prototypes`AddCodeCompletion", "Prototypes`RasterizeLargeCells", "Prototypes`RandomDate", "Prototypes`MessageBlock",
"Prototypes`IPStack"}
}
}
]
4 changes: 2 additions & 2 deletions Prototypes/Prototypes.wl
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Module[ {files},
"Image.wl", "Language.wl", "Paclet.wl", "Formats.wl",
"Resources.wl", "Search.wl", "String.wl", "System.wl", "Color.wl", "Styles.wl",
"Entities.wl", "WolframAlpha.wl", "Translation.wl","GeoGraphics.wl", "Words.wl", "Packages.wl", "Random.wl",
"Cryptography.wl", "External.wl", "Service/What3Words.wl", "Service/OpenSky.wl", "Service/Satellite.wl", "Primes/Primes.wl",
"Java/Runtime.wl", "Compiler/Build.wl"};
"Cryptography.wl", "External.wl", "Service/What3Words.wl", "Service/OpenSky.wl", "Service/Satellite.wl", "Service/IPStack.wl",
"Primes/Primes.wl", "Java/Runtime.wl", "Compiler/Build.wl"};
Map[
Function[ {file},
AppendTo[ timings, file<>"-Before" -> N@SessionTime[] ];
Expand Down
9 changes: 9 additions & 0 deletions Prototypes/Source/Service/IPStack.wl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
IPStack[ip_String, key_String] := Module[{response},
response = URLRead["http://api.ipstack.com/" <> ip <> "?access_key=" <> key];
ImportByteArray[response["BodyByteArray"], "RawJSON"]
];

IPStack[ip_IPAddress, key_String] := IPStack[First[ip], key]

IPStack[ips_List, key_String] := Dataset[ Map[ IPStack[#,key]&, ips] ];

2 changes: 2 additions & 0 deletions Prototypes/Usage.wl
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,5 @@ RasterizeLargeCells::usage = "RasterizeLargeCells[nb,style] uses the 'BitmapCond
RandomDate::usage = "RandomDate[] generates a random date between 1/1/1900 and today. RandomDate[date1,date2] generates a random date between 'date1' and date2'.";

MessageBlock::usage = "MessageBlock[expr,failure] suppresses all message output during the evaluation of 'expr'. If 'expr' generates messages, then 'failure' is evaluated without suppressing message output.";

IPStack::usage = "IPStack[ip,key] gives geographical information for IP address 'ip' using API access 'key' from https://ipstack.com (not included)";
2 changes: 1 addition & 1 deletion build-with-documentation.wls
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Print["\n=======================================================================
Print["Building Documentation"];
Print["================================================================================\n"];

PrependTo[$Path,"D:\\git\\pubs"];
PrependTo[$Path,"D:\\git"];

Quiet[ Get["DocumentationBuild`"], {RunProcess::pnfd, StringReplace::strse}];

Expand Down

0 comments on commit 026f26f

Please sign in to comment.