|
|
@ -156,7 +156,6 @@ class PublicRelations(Bureau):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
tweet_id = self.get_tweet_id(shortcode)
|
|
|
|
tweet_id = self.get_tweet_id(shortcode)
|
|
|
|
self.log.debug("tweet details for id:" + tweet_id)
|
|
|
|
|
|
|
|
tweet = self.t.t.statuses.show(id=tweet_id)
|
|
|
|
tweet = self.t.t.statuses.show(id=tweet_id)
|
|
|
|
prn = printer.Usb(0x416, 0x5011, in_ep=0x81, out_ep=0x03)
|
|
|
|
prn = printer.Usb(0x416, 0x5011, in_ep=0x81, out_ep=0x03)
|
|
|
|
prn.codepage = "cp437"
|
|
|
|
prn.codepage = "cp437"
|
|
|
@ -185,7 +184,9 @@ class PublicRelations(Bureau):
|
|
|
|
prn.image(im, impl="bitImageColumn")
|
|
|
|
prn.image(im, impl="bitImageColumn")
|
|
|
|
|
|
|
|
|
|
|
|
tw_shortcode = self.short_tweet_id(tweet["id_str"])
|
|
|
|
tw_shortcode = self.short_tweet_id(tweet["id_str"])
|
|
|
|
|
|
|
|
prn.textln("retweet")
|
|
|
|
prn.barcode("PRtwrt." + tw_shortcode, "CODE128", function_type="B")
|
|
|
|
prn.barcode("PRtwrt." + tw_shortcode, "CODE128", function_type="B")
|
|
|
|
|
|
|
|
prn.textln("like")
|
|
|
|
prn.barcode("PRtwlk." + tw_shortcode, "CODE128", function_type="B")
|
|
|
|
prn.barcode("PRtwlk." + tw_shortcode, "CODE128", function_type="B")
|
|
|
|
prn.text("\r\n\r\n")
|
|
|
|
prn.text("\r\n\r\n")
|
|
|
|
|
|
|
|
|
|
|
@ -198,7 +199,6 @@ class PublicRelations(Bureau):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
tweet_id = self.get_tweet_id(data)
|
|
|
|
tweet_id = self.get_tweet_id(data)
|
|
|
|
self.t.t.statuses.retweet(id=tweet_id)
|
|
|
|
self.t.t.statuses.retweet(id=tweet_id)
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@add_command("twre", "Reply to Tweet")
|
|
|
|
@add_command("twre", "Reply to Tweet")
|
|
|
|
def tw_reply(self, data):
|
|
|
|
def tw_reply(self, data):
|
|
|
@ -216,7 +216,6 @@ class PublicRelations(Bureau):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
tweet_id = self.get_tweet_id(data)
|
|
|
|
tweet_id = self.get_tweet_id(data)
|
|
|
|
self.t.t.favorites.create(id=tweet_id)
|
|
|
|
self.t.t.favorites.create(id=tweet_id)
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|