You are not logged in.
Hi!
Um, I was just starting out with bash scripting and already thinking of creating a Twidge "daemon".. It simply prints out the recent updates.. I was thinking of having the output be like this:
+-------------------------+------------------------------------------+
| another_twitter_user | Update from another_twitter_user |
+-------------------------+------------------------------------------+
| twitter_user | Update from twitter_user.... |
+-------------------------|------------------------------------------+
Would this be somewhat hard?
I have this just as a start while trying to learn bash...
#!/bin/sh
while true; do
twidge lsrecent -us;
sleep 2;
done;
It at least just prints out the most recent update... Haha This is what it looks like:
<twitter_user> Some update from twitter_user...
<another_twitter_user> Some update from another_twitter_user...
Any help and pointers appreciated!
Offline
Obligatory: 0x3A28213A, 0x6339392C, 0x7363682E
I would use Perl, because I don't know bash that well, and in Perl it would be pretty straightforward. It seems that it wouldn't be too difficult in bash either, but I have little experience to support that impression.
Offline
I don't know much about twidge, but why not just have it write to a fifo so you can tail the fifo.
Hi! Thanks for the reply.. By fifo, would you mean "first in, first out"? I'm not quite sure if this would be possible since when I do a sleep for 2 seconds, there are times that in that 2 second span there are more tweets and twidge just outputs them as one big chunk of text that was already formatted..
Someone from #bash spoonfed me with a command. Since the first thing I'd like to do is remove those '<' '>', he gave me this:
${name:1:${name}:-2}
I would use Perl, because I don't know bash that well, and in Perl it would be pretty straightforward. It seems that it wouldn't be too difficult in bash either, but I have little experience to support that impression.
Um, might you be able to share your idea? The one that I can't seem to have an idea on how to format it would be that twidge returns tweets like this:
<twitter_user> Some update from twitter_user. Some
update from twitter_user.
There's a linebreak if a tweet is long but still aligned with the second column.
The same person provided me with another code that separates "name | status".. Although there are times that it becomes "name | status | continuation of status". Will provide it here once I get home to get in hand with my computer.
Thanks for the help again!
Offline
Offline
Um, might you be able to share your idea? The one that I can't seem to have an idea on how to format it would be that twidge returns tweets like this:
<twitter_user> Some update from twitter_user. Some update from twitter_user.
You mean in bash or in Perl? I don't have time to work it out right now but I can come back and try it later in the day.
Offline
I surrendered with this one. I have no idea where to go even after being spoonfed. I might study the basics first and probably bump into this as I move forward. Thanks for the replies anyways!
Offline