If you are frustrated waiting for the API then this little snippet may help in a very small way
I am quite certain there will be more elegant ways to bash the required bytes but this seems to work OK. Thanks to @chriso for inspiration
I did man awk once and my head still hurts. @davidpbrown once kindly tried to explain sed and awk to me. Sadly it was a waste of his time.
I must sit down with a fresh brain some time and try again. This present brain recoils in horror and shutsdown when it sees more than 3 backslashes and brackets in the one line
Well, awk is a very powerful little language in its own right, but quite frankly, I donāt understand 99% of it, and I think thatās the case for most people. However, the basic use case is just for parsing out text you need from a particular line. A common example is if thereās output with some columns, and youāre only interested in one of the columns. awk will split by default on whitespace, then make each of the columns available.
In your case, you would do awk -F ':' '{ print $2 }'. Youāre telling it to split on the : character. So $1 will be āNew SafeKey createdā and $2 will be the URL.
Actually, it would include the quotes in the URL string, so youād need to strip off the quotes with a sed, but thatās easy: sed 's/"//'. The single quotes for the expression there is important. If you used double quotes, youād have to escape the double quote character. The expression just says āsubstitute (thatās the s) the double quotes character with nothingā. If youād wanted to substitute another character or string, youād put that between the last 2 slashes.
How can you tell when one bit of perl stops and the other one starts? Its like someone took all the ugly chars on the keyboard and flung them at the screen.
Guy I used to know was always entering āObfuscated Perlā competitions - which I thought was a tautology as Perl by definition is obfuscated anyway. One winner wrote a program to calculateprimes up to some huge number and won because when printed out, the listing was in the shape of a camel.
I canāt tell diddly. I just used to copy stuff and pipe it together on the command line. I really suck at any kind of programming. I think I should learn some Python. Do you know of any good guides for complete n00bs, which is what I really am?
You may want to actually try learning Typescript rather than Python. It looks like this may possibly surpass Python in the long term. Iām definitely going to learn it at some point. I still love Python though.
Thanks! I can see it was developed by Microsoft, though, and I donāt touch Windows. Is Typescript equally good for Linux? No weird patents or other restrictions? I would want to just go apt-get install and have it working.
Iāve actually never written a line of code in it myself yet, Iāve just heard so much about how loved it is. A lot of people see it as Python or JS but with static/strong typing, and love it for that reason. I personally just donāt get too caught up on the typing aspect and just see the static/dynamic typing thing as different approaches with benefits and drawbacks.
I wouldnāt worry too much about the Microsoft aspect of it. Over the last 5 years or so Microsoft have actually been very good when it comes to cross platform support. I can see from just a brief Google that itās on all platforms, as I would expect.