2009-04-13

CampfireJ: a Java API for posting to 37signals' Campfire

My team at work has been considering trialing the Campfire app for intra-team communication. I've played with it a bit and so far I like it (a lot), but as with anything, adoption by the team is going to be the make-or-break factor.

I found myself wishing, though, that I had a way to post messages and notifications to Campfire chatrooms from the command-line or from Ant build scripts, used by our continuous integration system. There's a Ruby Campfire API already, but that doesn't really help me. So I wrote a simple Java API this weekend that posts messages over HTTP, with the self-imposed requirement it should have ZERO external dependencies outside the JRE. It's up here on Github and called CampfireJ; license is WTFPL.

Programmatic usage should be pretty easy to figure out, and the javadocs will be generated by the build, but what I want to call attention to here are the command-line interface and the Ant task.

Command-Line

Once you have campfirej.jar, you can use it directly as a command-line app like this:

$ java -jar campfirej.jar -u user -s subdomain -p password -r "Room 1" -m "Hello world" [--paste]

This will send the message "Hello world" to the room "Room 1" on your Campfire subdomain. I'm using this from a script for Out-of-Office notifications, you can easily find other uses. I think a useful addition to the program would be to allow omitting the -m argument and reading stdin for messages, that shouldn't be too hard to add.

Ant script

The real reason for hacking this together was so I could send Campfire notifications from a CruiseControl build/CI system, so I had to support sending from Ant.

Here's a sample invocation from a build script:



<project name="campfirej-ant-test">
<taskdef
name="campfirej"
classname="ca.softwareengineering.campfirej.ant.CampfireJEcho"
classpath="_dist/campfirej.jar"/>
<target name="test">
<campfirej
user="ant@example.com"
password="mypassword"
subdomain="campfirej"
room="Room 1"
failonerror="false"
paste="false"
message="Hello from ant" />
</target>
</project>

Cheers, and contact me with desired improvements, the library is just a few hours old so obviously it's not fully-featured yet.

11 comments:

Neil Tubb said...

This Campfire things seems keen. At my work we are forced to use MS Communicator for biz chats, which doesn't even let us "share" URLs let alone files. After our online meetings, one of us will save the chat as a text file, and email it to everyone for their records. Not exactly bleeding edge. I plan to investigate Campfire further and see if we can use it too.

That said, again, I had to laugh at your "needs" for the s/w JP. "I was looking at this nice blender in Zellers, but couldn't help wondering: what if it could power a rocket to Mars?" LOL! Sometimes a chat/collaboration engine is just that.

Anonymous said...

Hi
http://www.pblcbatonrouge.org/ - clonazepam drug
These drugs should be stored in a normal room temperature.
[url=http://www.pblcbatonrouge.org/]klonopin clonazepam[/url]
Save hundreds! No prescription!
Clonazepam is its generic name and the brand name is Klonopin.
klonopin pharmacy
This drug should be taken orally in addition to some water.

Anonymous said...

Hello all
cheap meridia
For your kind information, BMI stands for Body Mass Index.
[url=http://www.accfever.com/]meridia sibutramine[/url]
Lose weight fast
You can order Meridia medication at reliable online pharmacy.
http://www.accfever.com/ - meridia diet pills
It?s necessary for you to take this drug in an oral manner, but just say ?NO? to it if you?ve not been prescribed to take this by a doctor.

Anonymous said...

Налоговики - миллионеры... БУСАРЕВ ВЯЧЕСЛАВ ВАЛЕНТИНОВИЧ Украина, АР Крым, г.Симферополь.

Не для кого не секрет, что экономика Украины в настоящее время находится в кризисе. Не смотря на это, есть специалисты, которые под ширмой государственных служащих работают против государства, которое доверило им занимать высокие должности, оплачивает достойную заработную плату, но …?!
Одним из таких деятелей, является БУСАРЕВ ВЯЧЕСЛАВ ВАЛЕНТИНОВИЧ - председатель налоговой службы АР Крым. Личность, которую можно поставить в пример многим политикам, ведь Вячеслав Бусарев получил старт в карьере государственного служащего когда у власти была Партия Регионов, однако, остался при должности и до настоящего времени, когда Партия Регионов находится в оппозиции, а все почему?! Все очень просто, В.Бусарев работает на свой карман, а не для бюджета Украины, «кормит» вышестоящее руководство ГНА Украины и остается «своим» при любой власти в стране. Перейду к конкретике, подтверждающей все выше изложенное.
Существует такое понятие «налоговая яма», это предприятие, которое создает затратную часть предприятий-контрагентов посредством предоставления им налогового кредита. Проще говоря, помогает предприятиям контрагентам завышать свои затраты, тем самым минимизируя уплату налогов в бюджет, а иногда при миллионных оборотах предприятий сводит уплату налогов в бюджет к нулю. Как Вы понимаете, деятельность таких предприятий должна быть незамедлительно пресечена налоговой службой, но, под непосредственным контролем В.Бусарева на территории АР Крым были созданы и помогали скрывать налоги предприятиям Крыма и некоторых регионов Украины следующие «налоговые ямы»:

ЧП «Зовик» (код 24504001);
ООО «Энерго-ВАН» (код 32153280);
ООО БК «Абрис-груп» (код 33608264);
ООО НТК «Энерго-тайм» (код 33898770);
ООО «Фотон 102» (код 34861343);
ЧП «Керчмет» (код 34908260);
ООО «Партенитинвест» (код 34938871);
ЧП «СЛС-груп» (код 35736934);
ООО Салтовский хлебзавод» (код 36165787);
ЧП «БУД-ТИС» (код 36165420);
ООО «Тенси» (код 36165070);
ЧП «Крым-строй-ТИС» (код 36165106);
ЧП «БУД-Т.И.С.» (код 36165394);
ЧП «ТИС» (код 36165064);
ООО «Т.И.С.-строй» (код 36165038);
ЧП «Тисстрой» (код 36165148);
ЧП «Крымтисстрой» (код 36165174);
ООО «Южсаппорт» (код 36275069);
ООО «Латем плюс» (код 36275121);
ЧП «Крым строй поставка» (код 36478440)
ООО «Консалавто» (код 36478990);
ЧП «Сервис-Крым-Сбыт» (код 36583473);
ЧП «Крым-Сервис-Сбыт» (код 36583447);
ЧП «Сбыт-Крым-Сервис» (код 36583384).

Почему то, при якобы тотальном контроле со стороны налоговой, указанные выше субъекты без проведения проверок перестают работать, а на их месте создаются в один день от трех до пяти подобных предприятий, при чем регистрируются в один день, на одних и тех же лиц, также в один день выдается свидетельство плательщика НДС, при отсутствии расчетных счетов в банках.
Все вышеуказанные предприятия «помогли» своим контрагентам скрыть от налогообложения сотни миллионов гривен, а это бюджетные деньги страны. Соответственно, за «спасибо», т.е. бесплатно, указанные предприятия не существовали бы. Поэтому предприимчивый В.Бусарев обложил данную деятельность «налогом в свой карман», а именно, ставка этого «налога» составила 0,8% от валового оборота деятельности каждого из указанных предприятий, а это в итоге миллионы гривен. Но, как Вы понимаете, без поддержки сверху, такая «деятельность» не существовала бы. Поэтому В.Бусарев должен отдавать некоторую часть денег заместителю ГНА Украины В.Кайзерману, который взамен, за это поддерживает В.Бусарева и ежемесячно либо снижает планы поступления налоговой Крыма в бюджет, либо при угрозе его невыполнения корректирует в сторону уменьшения.
На указанном примере работы В.Бусарева, становится понятно, каким образом налоговики становятся миллионерами.

Anonymous said...

Hello all
generic fluoxetine
In fact, Prozac has became the third most prescribed anti-depressant on the pharmaceutical market today.
[url=http://flockchoreography.com/]buy prozac online[/url]
Ask your doctor today if a free trial of Prozac is right for you.
http://flockchoreography.com/ - prozac drug

Prozac has been shown in numerous case studies to be effective against depression and anxiety in users.

Anonymous said...

Hi
phentermine 37.5 mg
After undergoing a physical at your doctors he may decide that you are qualified to sample Phentermine.
[url=http://www.ccmag2.com/]phentermine drug[/url]
5 at one of reputable online pharmacies.
http://www.ccmag2.com/ - generic phentermine
Phentermine is prescribed by doctors all across the world as a weight loss prescription pill.

Anonymous said...

horde rogue leveling guide shadow priest leveling build level 1 80 guide wow level 40 gold guide joana's wow leveling guide [url=http://community.naturalnews.com/members/World-Of-Warcraft/default.aspx ]wow leveling guide 20 30 [/url] alliance warlock leveling horde paladin leveling guide wow horde levelling guide zygor leveling guide free joanas text guide [url=http://community.naturalnews.com/members/World-Of-Warcraft/default.aspx ]joanas guides [/url] 70 leveling guide powerlevel 60 70 horde level guide joana's 1 70 joanas 1 60 guide [url=http://community.naturalnews.com/members/World-Of-Warcraft/default.aspx ]zygors guide [/url] horde rogue leveling guide alliance level zygor guide download wow alliance leveling guides joanas level guide [url=http://community.naturalnews.com/members/World-Of-Warcraft/default.aspx ]joana's horde lvling guide [/url] alliance level joana mancow's leveling wow horde 1 70 leveling guide best gold guide wow jewelcraft guide [url=http://community.naturalnews.com/members/World-Of-Warcraft/default.aspx ]zygor guides [/url]

Anonymous said...

[url=http://best-drugstore.net/]What is/are Cytotec Tablets?[/url]
MISOPROSTOL helps to obstruct stick ulcers in patients who gain possession of medicines like ibuprofen and aspirin and who are at high jeopardize of complications from ulcers. This medicine may be inured to recompense other purposes; seek from your constitution vigilance provider or posologist if you bear questions.

What should I advertise my constitution heedfulness providers in advance of I grab this medicine?
They need to be versed if you secure any of these conditions:

•Crohn's disease
•insensitivity condition
•kidney cancer
•ulcerative colitis
•an out of the ordinary or allergic reaction to misoprostol, prostaglandins, other medicines, foods, dyes, or preservatives
•rich or vexing to grow having a bun in the oven
•breast-feeding
[url=http://best-drugstore.net/][img]http://i067.radikal.ru/0910/b1/8cd0317735ce.jpg[/img][/url]






























order generic cytotec online
purchase cheap cytotec
purchase cheap cytotec online
purchase cytotec online
purchase generic cytotec
purchase generic cytotec online
uk cytotec
uk cytotec cheap
6 cytotec in month pregnancy
aborto cytotec
articles on cytotec
best price for cytotec
buy cytotec discreet packaging
class action lawsuits cytotec
cytotec alternatives
cytotec and abortion
cytotec and breastfeeding
cytotec and gynecology
cytotec and hemabate
cytotec and induction

Anonymous said...

How do you do...

http://www.darecol.com/total-physical-response.html
http://www.darecol.com/puppies-growth-chart.html
http://www.darecol.com/clearing-your-history-thoroughly.html

The Regard! The Excellent forum! Thank you!
http://www.darecol.com/motorized-scooter.html
http://www.darecol.com/sense.html
http://www.darecol.com/negative-attitude.html

All the best!
http://www.darecol.com/real-estate-exchange.html
http://www.darecol.com/what-is-coke-made-of.html
http://www.darecol.com/broadway-ticket.html


Good stuff, very nicely done!

Anonymous said...

[url=http://pittsburghmom.com/members/Pokimon2010/default.aspx/][img]http://i048.radikal.ru/0910/57/9a759e833d4a.jpg[/img][/url]

10601 movies of rare DVD status

We hold thousands of the hottest movies you've been waiting to watch! And they're stylish ready in Hi-Def!
These movies are playable on most viewing devices including iPod, PDA (HandHelds), PC, DVD & DivX players.
There are categorically no limits. Download as much as you penury with incredibly gamy speeds. No additional software is required!
Unreservedly click on a tie, download a flicks and guard it on your favorite player.

[size=4][url=http://pittsburghmom.com/members/Pokimon2010/default.aspx/]Sign Up[/url] today and forget about buying or renting DVDs offline. [/size]


[url=http://movies.aoaoaxxx.ru/][img]http://s43.radikal.ru/i102/0910/37/6c734f3ca5fb.jpg[/img][/url]





























[url=http://pittsburghmom.com/members/Pokimon2010/default.aspx][b]TOP 40 BEST Movies:[/b][/url]
Adventures of Don Juan
Dishdogz
Perfect Day, A
Finishing the Game
Modigliani
Center of the World, The
Simpsons Movie, The
Freddy vs. Jason
Dirty Mary Crazy Larry
Like Mother, Like Daughter
Salome
Master of Disguise, The
Autopsy
Just Like Heaven
Life Stinks
Secret Life of Bees, The
Hard-Boiled
Slumdog Millionaire
Piggy Banks
Rollin' with the Nines
Behind Enemy Lines: Axis of Evil
Life or Something Like It
Brotherhood of Blood
Lost Boys, The
Jack Squad
Deadwater
Eight Below
Death Proof (from Grindhouse)
Confetti
Flubber
Square Peg, The
Final Fantasy VII: Advent Children
I Heart Huckabees
Mission: Impossible
Shutter
Suicide Blonde
Rush Hour 3
Bridget Jones's Diary
Cat People
Ring of Death

http://pittsburghmom.com/members/Pokimon2010/default.aspx

Anonymous said...

windows xp drivers update c media wdm audio driver 3dfx voodoo banshee drivers realtek ac 97 audio driver free download ati sb400 ac 97 audio controller driver [url=http://community.naturalnews.com/members/Driver-Update-Software/default.aspx] sis 7018 audio driver free download [/url]ac 97 audio controller sigmatel soundmax integrated digital audio find my drivers driver for multimedia audio controller audio driver free download creative labs video card drivers [url=http://community.naturalnews.com/members/Driver-Update-Software/default.aspx] driver scan [/url]soundmax ac 97 audio driver sound card device ati sb400 ac 97 audio controller driver widcomm bluetooth software download crystal wdm audio driver download [url=http://community.naturalnews.com/members/Driver-Update-Software/default.aspx] graphics card driver [/url]motherboard drivers 82801fb ich6 ac 97 audio controller drivers latest laptop drivers xp no audio device driver 82801ba bam [url=http://community.naturalnews.com/members/Driver-Update-Software/default.aspx] adi 1980 driver [/url]via ac 97 driver download 82801aa ac 97 audio controller driver p4p800 audio driver download svga driver audio ac97 driver download [url=http://community.naturalnews.com/members/Driver-Update-Software/default.aspx] soundmax ad1985 driver [/url] pc driver download c media ac97 audio device driver free ac 97 audio driver for xp cdrom driver problem xp no audio device