Giter Club home page Giter Club logo

treeverse's Introduction

NOTE: Post-acquisition, Twitter started making life difficult for applications like Treeverse that access twitter data. Since I don’t have time to play cat-and-mouse games with a hostile platform, I'm retiring Treeverse. The codebase of Treeverse dates back to a bookmarklet I wrote in 2014. It’s been a pleasure to see something started as a curiosity project picked up by the OSINT and archivist communities. Thanks to everyone who shared their enthusiasm over the years.

NetflixOSS Lifecycle

Treeverse Icon Treeverse

Treeverse is a tool for visualizing and navigating Twitter conversation threads.

It is available as a browser extension for Chrome and Firefox.

Installation

Chrome Users:

Download Treeverse for Chrome

Firefox Users:

Download Treeverse for Firefox

Introduction

After installing Treeverse for your browser, open Twitter and click on the tweet that you would like to visualize the conversation of (or try this one.)

If you’re using Chrome, the icon for Treeverse should turn from grey to blue in your browser. Click it to enter Treeverse.

Opening Treeverse in Chrome

If you're using Firefox, the icon will be hidden until you open a tweet, and then it will appear in the address bar.

Opening Treeverse in Firefox

Exploring the Conversation

Screenshot of Treeverse.

Conversations are visualized as a tree. Each box is an individual tweet, and an line between two boxes indicates that the lower one is a reply to the upper one. The color of the line indicates the time duration between the two tweets (red is faster, blue is slower.)

As you hover over nodes, the reply-chain preceeding that tweet appears on the right-side pane. By clicking a node, you can freeze the UI on that tweet in order to interact with the right-side pane. By clicking anywhere in the tree window, you can un-freeze the tweet and return to the normal hover behavior.

Right pane in action.

Some tweets will appear with a red circle with white ellipses inside them, either overlayed on them or as a separate node. This means that there are more replies to that tweet that haven't been loaded. Double-clicking a node will load additional replies to that tweet.

More tweets indicator.

Privacy

Treeverse runs entirely in your browser. No data is collected or tracked by Treeverse directly when you use or install it. Browser extension installs may be tracked by Google and Mozilla, and the data requests made to Twitter may be tracked by Twitter.

When you create a sharable link, the data is sent to a server so that it can be made available to other users. Access to the shared link server may be tracked to prevent abuse.

Additionally, when Treeverse runs it loads a font hosted by Google Fonts (https://fonts.google.com/). Google may track this download.

Bugs & Contact

Tweet @paulgb or report on GitHub.

Credits

Icon created by Eli Schiff.

Treeverse would not be possible without the excellent d3.js. Styling is powered by Semantic UI.

treeverse's People

Contributors

edent avatar martinklepsch avatar paulgb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

treeverse's Issues

rate-limited?

The tree stopped expanding.

And it took me a while to realize I can open the console.

There I saw hundreds of such pink errors:

treeverse-errors_anon

... only then I realized that perhaps I got rate-limited? It was a large tree.

What would be mitigation methods? Some ideas:

  • show in the GUI when that error happens
    • only much later I realized that pressing "stop expanding" was the right thing to do
  • auto-stop the expanding after 5 such messages came in?
  • additional option to fill in some (0.01s ? 0.1s, 0.5s, 1s ?) delay between each API call, to escape from ANY rate-limiting by twitter?

Now that I know what can happen, I will find my way around, I guess. For newbs though, a solution could be fruitful.

Thanks for this amazing tool. Have used it for the second discussion now. Great!

Archive mode doesn't work as expected

Thank you for the Treeverse, it is very useful for us.
The issue is related to the archive mode.
If you open the archive mode from the Treeverse menu, the dragging area for the json files to be opened are not shown as in the screenshot-1.
screenshot-1
I tried to run the archive mode from this address also: https://paulgb.github.io/Treeverse/
In that case, I could upload the json file I have but the tweet contents are not visible in the graphical interface as in the screenshot-2.
screenshot-2
Therefore, in either case, we can't use the archive mode properly.
Thanks again for all your effort.

Doesn't work in Firefox if using mobile.twitter.com

When viewing a tweet on the mobile website (mobile.twitter.com), the extension isn't active, e.g.:

https://mobile.twitter.com/tastapod/status/1075743440632233984

For background, the reason I'm on a mobile.twitter.com subdomain is that bookmarked tweets only seem to be accessible via the mobile version of twitter and not the desktop version. 🤷‍♂️ Thanks Twitter!

Issues outstanding from 3.0 rewrite

  • Links are not clickable
  • Images do not appear
  • Long tweets are cut off (!)
  • The Chrome version requires the user to click, then refresh, the first time in a session. We could probably do this automatically.
  • Show a message of some sort when users not logged in to Twitter try to use it. (#37)

Error MSG: No 'Access-Control-Allow-Origin' header is present on the requested resource.

The extension isn't working for me, here is what is in my console:

XMLHttpRequest cannot load https://twitter.com/Bortseb/status/897884889458106369. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-extension://aahmjdadniahaicebomlagekkcnlcila' is therefore not allowed access. The response had HTTP status code 400.

RTL support

Any tweet is adjusted LTR, even if the content is is hebrew or arabic and should show as RTL.
In case of mixed content the whole tweet gets out of order (for example, this tweet is adjusted fine in Twitter, but not in treeverse version).

(Feature Request): Show summary of tweets in tree

It would be nice to have an option to show a summary of the tweet itself in the tree - for example the first 40 characters followed by an ellipsis, or a thumbnail of an image. This would make the tree a lot more legible.

Collapse tweets

After I have explored some expanded parts of a conversation, I would like to be able to collapse that part by e.g. clicking the top-level tweet of that thread, so that my screen does not get cluttered, allowing me to focus on other threads which I have not explored yet. You could also add toggling collapse/expand with the space button.

This would need a method on TweetTree called collapseNodes, which would just hide them from the UI (but would keep the tweet content so that it does not get reloaded if I toggle it back). Its implementation could be done by adding a isVisible field on TweetNode, which would skip rendering it and all of its children if set to true.

Does the above description make sense? Great tool otherwise, thanks for building it!

making it easier to read the whole tree

Thanks very much for Treeverse!
Often I want to read a whole discussion there, but it's hard to keep track of where I've been.
Would you be interested in some UI ideas for this?

One idea involves allowing the user to mark nodes that they've already read.
Another involves keyboard navigation [I realize there's some already].
These ideas could be combined.
Details on request! 😅

Build fails on webpack (type conversion errors)

Running node v13.11.0. Some type errors on build. I would fix it myself if I knew typescript.

$ ./node_modules/.bin/webpack
(lots of stuff that's fine…)
ERROR in /Users/fei/git/treeverse2/src/viewer/tweet_visualization.ts
./viewer/tweet_visualization.ts
[tsl] ERROR in /Users/fei/git/treeverse2/src/viewer/tweet_visualization.ts(66,26)
      TS2352: Conversion of type 'Selection<SVGGElement, {}, null, undefined>' to type 'D3Selector' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Type 'SVGGElement' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 16 more.

ERROR in /Users/fei/git/treeverse2/src/viewer/tweet_visualization.ts
./viewer/tweet_visualization.ts
[tsl] ERROR in /Users/fei/git/treeverse2/src/viewer/tweet_visualization.ts(68,22)
      TS2352: Conversion of type 'Selection<SVGGElement, {}, null, undefined>' to type 'D3Selector' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

ERROR in /Users/fei/git/treeverse2/src/viewer/tweet_visualization.ts
./viewer/tweet_visualization.ts
[tsl] ERROR in /Users/fei/git/treeverse2/src/viewer/tweet_visualization.ts(69,22)
      TS2352: Conversion of type 'Selection<SVGGElement, {}, null, undefined>' to type 'D3Selector' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.

ERROR in /Users/fei/git/treeverse2/src/viewer/visualization_controller.ts
./viewer/visualization_controller.ts
[tsl] ERROR in /Users/fei/git/treeverse2/src/viewer/visualization_controller.ts(83,13)
      TS2322: Type 'Timeout' is not assignable to type 'number'.

Super-long posts (as with long URLs or large images) can't scroll

Long posts that are too tall for the window don't seem to get a scroll bar, and seemingly can only occasionally be scrolled with the mouse wheel, either.

See, for an example, the right-side reply to this post: https://twitter.com/bikelaneuprise/status/1037351778860318725
treeverse_toobig2

I have unfortunately lost the source on this one, but the issue is similar — a photo attached to the tweet is so tall that it pushes up under the infobox, and with no ability to scroll, it's impossible to see all the text.
treeverse_toobig

Here's another image example, from https://twitter.com/bikelaneuprise/status/1037026430440361984. This one for some reason I was able to scroll with the mouse wheel.
treeverse_toobig3

Display links to other tweets

First off, thank you for this tool. It's pleasantly enjoyable and I think the UX of hovering over and being able to see the whole thread is really clever.

I was just browsing a conversation and I noticed some people linking to past tweets from their tweets. I was curious if you had thought about including links to other tweets as explorable? Not sure about where you would represent them, maybe as a sideways edge, if it doesn't exist in the graph so far, and if it does, an edge to that existing node?

I guess technically then this would be "graphverse" instead of "treeverse"...

Not working anymore

Version: 3.1

The page seems to refresh when clicking the extension, but it doesn't display. No console errors. I ran it incognito so as to assure there were no other extensions that could interfere.

untitled

Cannot expand "show more replies"

Hi,
It seems like Treeverse can't load tweets hidden behind the "show more replies" link.
In this case, there is an ellipsis on the tweet, and the double-click just makes it disappear, without any branch appears.
It only happens with tweets displayed with "show more replies" below in twitter display.

Thanks a lot for this app, Treeverse is amazing :)

Fix stuff that broke in the most recent Twitter change

A recent Twitter change resulted in a big change in how Treeverse works. Instead of opening up a new tab, Treeverse injects itself into the current HTML page.

These things are known to be broken:

  • The download button has been removed for now because the way offline export worked made some assumptions about the page that have changed.
  • Loading "deeper" works, but loading "broader" does not. (fixed in 1.3)
  • Warnings appear in the console from Semantic UI over font loading.
  • It breaks the back button. (fixed in 2.0)
  • Archive mode doesn't work (#21)

Allow JSON export

There is a way to get a JSON file from the share server, but it should be possible locally too.

`nextChildren` in `tweet_parser.ts` is unnecessary

Hi!
I have a question about the parser.

On line 149 of src/viewer/tweet_parser.ts

let nextChildren = [];

What is the purpose of the array nextChildren that is not returned or used inside the function? Future purpose? Idea in progress? Leftover? I might also have missed something.

Thanks for your work which I am trying to adapt for Python in order to retrieve the tree structure of conversations.

Get ancestors of tweets in threads (crawling upwards)?

Sorry if maybe this isn't possible in Twitter, it would make this app really useful to me (already use it a lot!).

I saw #45 discussed downward traversal options, is there anything preventing traversing threads up to the source from which all replies were issued?

Support keyboard navigation

Keyboard navigation would make a great addition, especially on big trees where point-and-clicking becomes hard.

Treeverse seems not work anymore

Once you click on the treeverse chrome add on - it opens the new tab...with the blank window but it does not load any tweet data. Not sure if it is a Twitter issue or if somehow Treeverse has stopped working.

A tweet can be so big that the infobox covers it and scrolling doesn't work.

As reported by @infinitebuffalo in #22:

I have unfortunately lost the source on this one, but the issue is similar — a photo attached to the tweet is so tall that it pushes up under the infobox, and with no ability to scroll, it's impossible to see all the text.
treeverse_toobig

Here's another image example, from https://twitter.com/bikelaneuprise/status/1037026430440361984. This one for some reason I was able to scroll with the mouse wheel.
treeverse_toobig3

How could I turn Treeverse into a command line tool to get conversation trees?

Hi!
Thanks for Treeverse.
Contrary to "twarc replies --recursive", Treeverse is able to retrieve conversations older than the search limit (which is 7 or 30 days).
I would like to add the possibility to retrieve conversations (status_id as a tree structure, or just status_id & in_reply_to_status_id pairs or in twarc json format) automatically while using Treeverse as a script or a command inside a terminal.
I am new to TypeScript (I know C++, Python and a bit of JavaScript). Do you think it can be done? Would it be easier to just use the brute-force method "list all reply to a given username, filter by in_reply_to_status_id) in a Python script (which is not so easy because tools like TweetScraper don't retrieve "in_reply_to_status_id" so I'd have to make speed limiting API calls)?
Do you have suggestions or recommendations on how to achieve this? I wouldn't want to start hacking in the wrong direction... :-)
Thanks.

save as?

Treeverse has become quite useful in my research. Is there a way to do a "save as" with the treeverse.html page so the user can pick the name it is saved under?

not working

Hi,
when I use it with the latest google chrome in Win 10, I have

image

Export with view of every tweet

It would be great if there was a way of exporting with every tweet in view. Right now I can save the page as an html file, but I only get the tweets from the branch currently suggested. Would it be possible to replace the user thumbnails in the viewer with the entire tweet text, so that when saved as a pdf/html you could zoom in anywhere, offline?

Traversal options

feature request: tree traversal choices?

  • width first vs breadth first traversal;
    • for some discussions one is rather bad - results in either too wide or to tall pictures.
  • perhaps (W,H) options for:
    • "crawl W tweets horizontally, then (in each) H tweets downwards",
    • and vice versa (for the first idea above);
    • and W and H can also be infinity.

Thanks for considering.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.