]> gitweb.factorcode.org Git - factor.git/commitdiff
twitter.prettyprint: wrap tweet text
authorJoe Groff <arcata@gmail.com>
Sun, 27 Jun 2010 21:16:41 +0000 (14:16 -0700)
committerJoe Groff <arcata@gmail.com>
Sun, 27 Jun 2010 21:16:41 +0000 (14:16 -0700)
extra/twitter/prettyprint/prettyprint.factor

index 3f84611e237325596df50477276b2b5eb82da32b..2bfc269b204e053d574058b9728c82bf860f2797 100644 (file)
@@ -23,7 +23,8 @@ CONSTANT: tweet-username-style
 CONSTANT: tweet-text-style 
     H{
         { font-name "sans-serif" }
-        { font-size 18 }
+        { font-size 16 }
+        { wrap-margin 500 }
     } 
 
 CONSTANT: tweet-metadata-style
@@ -36,18 +37,20 @@ CONSTANT: tweet-metadata-style
         [
             [ dup user>> user-image [ image. ] when* ] with-cell
             [
-                tweet-text-style [
-                    tweet-username-style [
-                        dup user>> screen-name>> write
+                H{ { wrap-margin 600 } } [
+                    tweet-text-style [
+                        tweet-username-style [
+                            dup user>> screen-name>> write
+                        ] with-style
+                        " " write dup text>> print
+
+                        tweet-metadata-style [
+                            dup created-at>> write
+                            " via " write
+                            dup source>> write
+                        ] with-style
                     ] with-style
-                    " " write dup text>> print
-
-                    tweet-metadata-style [
-                        dup created-at>> write
-                        " via " write
-                        dup source>> write
-                    ] with-style
-                ] with-style
+                ] with-nesting 
             ] with-cell
         ] with-row
     ] tabular-output nl