Twitter has become a big part the online lives of a lot of people in the recent months. Twitter ir kļuvusi par lielu daļu online dzīvi daudz cilvēku pēdējo mēnešu laikā. Although in itself Twitter is a pretty simple service, which makes it easy for just about everyone to use it, it ships with an API which has helped people port it to just about every platform. Kaut arī pati par sevi čivināšana ir diezgan vienkāršs pakalpojums, kas ļauj viegli tikai par visiem to izmantot, tā kuģiem ar API, kas ir palīdzējis cilvēkiem osta tā, lai tikai par katru platformu. Twitter has been ported to web browsers, to cellphones, and apparently even Twitter ir pārnests uz Web pārlūkprogrammās, lai mobilo telefonu, un, acīmredzot, pat washing machines veļas mašīnas haven't been spared. nav izņēmums. The Linux command line has always been a favorite of geeks. Linux komandrindas vienmēr ir bijusi izlasei Geeks. Here's a trick that's great fun, and could be useful if required. Šeit ir triks, ka ir ļoti jautri, un tas varētu būt noderīgi, ja nepieciešams.
Let's see how to post an update to your Twitter account right from the Linux command line. Let's redzēt, kā ievietot atjauninājums jūsu čivināt kontu tiesības no Linux komandrindu. This will also work on the MacOS X command line. Šis strādās arī Mac OS X komandrinda. Enter the following command in your terminal interface, replacing username and password with your Twitter account credentials, and status="Tweeting from the Linux command line" with your own message. Ievadiet šādu komandu jūsu gala interfeiss, kas aizstāj lietotājvārdu un paroli ar savu čivināt kontu pilnvaras un statusu = "Tweeting no Linux komandrindas" ar savu ziņojumu.
# curl -u username:password -d status="Tweeting from the Linux command line" http://twitter.com/statuses/update.xml > /dev/null # Cirtot-u username: password-d status = "Tweeting no Linux komandrindas" http://twitter.com/statuses/update.xml> / dev / null
So if your Twitter username is fuzzycat17 and you password is fur123ball the above command will look like this: Tātad, ja jūsu čivināt lietotājvārds ir fuzzycat17 un jūs parole fur123ball iepriekš minēto komandu izskatīsies šādi:
# curl -u fuzzycat17:fur123ball -d status="Tweeting from the Linux command line" http://twitter.com/statuses/update.xml > /dev/null # Cirtot-u fuzzycat17: fur123ball-d status = "Tweeting no Linux komandrindas" http://twitter.com/statuses/update.xml> / dev / null
Running this command will result in a new Tweet being posted from your account containing the words Tweeting from the Linux command line Running šo komandu novedīs jaunu Tweet tiek norīkoti no Jūsu konta, kas satur Tweeting vārdus no Linux komandrindas
Now go check your Twitter home page to see if the Tweet was posted correctly. Tagad pārbaudiet jūsu čivināt mājas lapu, lai redzētu, vai čivināt izlikšanas pareizi.
As I said, this trick could be completely for geekish fun, or could be put to good use. Kā jau teicu, šis triks varētu būt pilnīgi par geekish jautri, vai varētu veiksmīgi izmantot. You could integrate this command into shell script to notify you of something. Jūs varētu integrēt šo komandu ar čaumalu skriptu informēsim jūs par kaut ko.
Happy Tweeting. Happy Tweeting.























Its cool tips, thx. To cool padomus, thx. How to make a script that implements these steps? Kā veikt skriptu, kas izpilda šīs darbības?
Can I assume that aa direct message or @ reply would simply be added to the sent string? Vai es pieņemu, ka aa tiešu ziņu vai @ atbilde būtu vienkārši pievienot nosūtīts string? For example curl -u fuzzycat17:fur123ball -d status=”@somename Tweeting from the Linux command line” Piemēram cirtot-u fuzzycat17: fur123ball-d status = "@ somename Tweeting no Linux komandrindas" http://twitter.com/statuses/update.xml http://twitter.com/statuses/update.xml > /dev/null; or status=”d somename . > / Dev / null; vai status = "d somename. . . . . ” "
True? Taisnība?