Giter Site home page Giter Site logo

Alternate for Perl? about hipchat-cli HOT 6 OPEN

hipchat avatar hipchat commented on July 25, 2024
Alternate for Perl?

from hipchat-cli.

Comments (6)

jimsmith avatar jimsmith commented on July 25, 2024

Is there any movement on this one ? , it's normally taken for granted Perl will be on the system, but that is not always the case in controlled environments.

from hipchat-cli.

tspicer avatar tspicer commented on July 25, 2024

Do you have a preference on approach?

from hipchat-cli.

jimsmith avatar jimsmith commented on July 25, 2024

I prefer sed.
http://stackoverflow.com/a/2489777

I threw this together briefly, obviously this is just showing for http url:

TEST=http://www.test.com/
echo $TEST
echo -n "${TEST}" | sed  -e "s|http[:]//[^ ]*|<a href=\"\0\">\0</a>|g"

Output:
<a href="http://www.test.com/">http://www.test.com/</a>

As for line https://github.com/hipchat/hipchat-cli/blob/master/hipchat_room_message#L110
again sed should do the trick!

http://sfyang-en.blogspot.co.uk/2012/04/url-encodingdecoding-with-shell-script.html
and some discussions around urlencode here - https://gist.github.com/cdown/1163649

from hipchat-cli.

jimsmith avatar jimsmith commented on July 25, 2024

It has been over a month any movement on this one ?

from hipchat-cli.

rberrelleza avatar rberrelleza commented on July 25, 2024

If we don't use perl, is it ok to take for granted that AWK or SED might be in the system? I believe it's equally possible to have either of those in the system, but happy to review and accept a PR with the reasoning behind though.

from hipchat-cli.

jimsmith avatar jimsmith commented on July 25, 2024

sounds reasonable also you could do a pre-req and check that the command(s) are there before the tool can be used.

from hipchat-cli.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.