Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

FaxWeb is done

FaxWe­b, a web fron­tend for mget­ty+send­fax is fin­ished. It work­s. It's prob­a­bly close to bugfree ;-)

The miss­ing piece is a nicer reim­ple­men­ta­tion of re­spond (and this one will be cross-­plat­for­m, too) us­ing PyQt, which is 50% done.

I am on­ly miss­ing how to im­ple­ment por­ta­ble systray icon­s. On Mac they make no sense, on Lin­ux I have it work­ing, on Win­dows I have no idea.

Here's the sim­ple in­ter­face for faxwe­b:

It even has a lit­tle AJAXy "the page does­n't reload" niceties cour­tesy of MochiK­it!

Al­so from MochiK­it, the nicer, round­ed look&feel. Com­pare to this old­er, ugli­er one:

I know the new one is not good, ei­ther, but I have de­cid­ed that since I can't aim for awe­some, I should aim for ad­e­quate, and set­tle for bor­ing and harm­less.

Of course, if any CSS/X­HTML gu­ru vol­un­teers for a makeover, I'd be very hap­py, since I use the same CSS ev­ery­where (even on parts of this blog ;-).

All in al­l, a plea­sure to write this thing, thanks to Cher­ryPy!

Open Source Remix

One more thing to love about Open Source/Free Soft­ware:

Maybe each screw does­n't work ex­act­ly as you wan­t. But you can hit them with a big enough ham­mer. And if you have a big enough ham­mer, ev­ery screw is a nail.

Mget­ty+send­fax sucks a lit­tle in some ar­eas. It sup­ports no class1 fax­es (ok, it may do if you re­build with a switch it says does­n't re­al­ly work).

Efax sucks a lit­tle in some ar­eas. It has no spool­ing mech­a­nis­m. It has no way at all to be used de­cent­ly from win­dows clients.

So, remix them!

Take efax's efax com­mand (the one that ac­tu­al­ly sends the fax­es), and mget­ty+send­fax's send­fax com­mand.

They are quite sim­i­lar. So, write a tiny shell wrap­per that makes efax look like send­fax.

And Voilá. Mget­ty+e­fax, which works on class1 fax/­modems ;-)

The wrap­per it­self is left as an ex­er­cise for the read­er.

The state of simple Linux fax server software

A cus­tomer asked me to im­ple­ment for him a sim­ple fax serv­ing so­lu­tion.

Here's what he want­ed:

  • A cen­­tral re­­ceived fax re­pos­i­­to­ry.

  • A way to send, as sim­­ple as pos­si­ble (the clas­sic fax-print­­er sce­­nar­i­o).

I vague­ly re­mem­bered know­ing that Lin­ux could do that, so I said yes. Then I start­ed try­ing to fig­ure out how to do it.

The 500lb go­ril­la of lin­ux fax soft­ware is of course Hy­lafax. And it's just about as pret­ty and cud­dly as a 500lb go­ril­la, too!

Put it sim­ply: waaaaaay too much soft­ware for the goal.

Hy­lafax is a very com­plex soft­ware pack­age, and while it does have some tools to make man­age­ment sim­ple, it would prob­a­bly have forced me to sup­port this thing for­ev­er. And that's not mi idea of fun.

Not to men­tion that I could­n't find Cen­tOS/RHEL4 pack­ages (not too big a prob­lem, but an­noy­ing).

Then I spent 10 hours try­ing to make it pick up the phone. And I start­ed be­ing an­noyed.

So, I start­ed look­ing for sim­pler stuff, and the sec­ond go­ril­la seems to be mget­ty+send­fax.

The more I read about it, the more I liked it, and I fi­nal­ly im­ple­ment­ed us­ing it.

The good news:

  • It's re­al­­ly sim­­ple. I was re­­ceiv­ing fax­es in 5 min­utes.

  • It was way less fid­gety about mo­­dem set­up than Hy­lafax.

  • The fax qual­i­­ty was very good (prob­a­bly not their mer­it, but it was nice).

Now, the bad news:

  • It's old soft­­ware. Check the we­b­­page and look at the bro­ken links and an­­cient re­leas­es.

  • The win­­dows client sup­­port was pa­­thet­ic.

How pa­thet­ic: ok, here is how you make it work:

  • Set­up mget­­ty+send­­fax enough that you can make it send from the CLI.

  • Set­up sam­­ba enough that you can do a shared print­­er from the win­­dows side.

  • The shared print­­er should print to print­­­fax.­­pl (look at the ger­mglish page).

  • On the win­­dows side, start re­spond and then when you print to the fax, the fax serv­er hooks to the clien­t's port 5555, and re­spond show a huge pop­up ask­ing for the num­ber, re­­cip­i­en­t, and sender.

  • Ex­­plain to your client that where it says "name" he should put his email ad­­dress. There is no way to save that ad­­dress so it's not asked again.

  • Af­ter the fax is sen­t, the us­er gets an email (if he filled the form cor­rec­t­­ly) with the re­­port.

  • The al­ter­­na­­tive no­ti­­fi­­ca­­tion mech­a­nism is win­pop­up. Which is­n't there in XP any­­more any­way.

Amaz­ing­ly, it does work fair­ly well, and the client is not ter­ri­bly an­noyed. I would be, though.

So, what can be done:

  1. Now that there is a PyQt4/Win32 I may write a re­spond re­­place­­men­t.

  2. Maybe print­­­fax.­­pl can be ex­­tend­ed/re­­placed to give re­­port in­­­for­­ma­­tion to that re­spond re­­place­­men­t.

Sounds like a nice fun projec­t... NOT! But it is a fair­ly sim­ple, nec­es­sary one.

So I will prob­a­bly do it. Or else, I may have to learn how to prop­er­ly use Hy­laFax.

IUP/Qt: Timers and images

Well, timers are done, in­clud­ing the idle timer, and im­ages are kin­da there.

It is much sim­pler to add stuff now that the prop­er OO skele­ton is in place.

How­ev­er, I am not mak­ing progress in the iup­con­trols li­brary. Then again, I have the flu.

Further IUP/Qt advances: Canvas

I keep work­ing on it, which is nice. I have fin­ished the skele­ton of the im­ple­men­ta­tion of a Qt driv­er for the CD can­vas.

I had it kin­da work­ing with the gener­ic X driver, but it sucked a bit to have this lar­gish chunk of Mo­tif code I did­n't un­der­stand in the mid­dle of it al­l.

It has on­ly the most ba­sic stuff im­ple­ment­ed, and the scroll­bar stuff is not there, but it does draw and set col­ors ;-)

So, right now, the next step is get­ting the iup­con­trols li­brary up, but that should­n't be too hard, I think.

But, we'll see.

PS: If any­one reads this and wants to check it out, just email me, I can ship it.

Contents © 2000-2023 Roberto Alsina