Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
fixes DocNow#369
Browse files Browse the repository at this point in the history
  • Loading branch information
edsu committed Jan 22, 2021
1 parent ac62f80 commit 8f52cfa
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 49 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ twarc
twarc is a command line tool and Python library for archiving Twitter JSON data.
Each tweet is represented as a JSON object that is
[exactly](https://dev.twitter.com/overview/api/tweets) what was returned from
the Twitter API. Tweets are stored as [line-oriented JSON](https://en.wikipedia.org/wiki/JSON_Streaming#Line-delimited_JSON). Twarc will handle
the Twitter API. Tweets are stored as [line-oriented JSON](https://en.wikipedia.org/wiki/JSON_Streaming#Line-delimited_JSON). twarc will handle
Twitter API's [rate limits](https://dev.twitter.com/rest/public/rate-limiting)
for you. In addition to letting you collect tweets Twarc can also help you
for you. In addition to letting you collect tweets twarc can also help you
collect users, trends and hydrate tweet ids.

twarc was developed as part of the [Documenting the Now](http://www.docnow.io)
Expand Down Expand Up @@ -164,7 +164,7 @@ The `dehydrate` command generates an id list from a file of tweets:

### Hydrate

Twarc's `hydrate` command will read a file of tweet identifiers and write out the tweet JSON for them using Twitter's [status/lookup](https://dev.twitter.com/rest/reference/get/statuses/lookup) API.
twarc's `hydrate` command will read a file of tweet identifiers and write out the tweet JSON for them using Twitter's [status/lookup](https://dev.twitter.com/rest/reference/get/statuses/lookup) API.

twarc hydrate ids.txt > tweets.jsonl

Expand Down Expand Up @@ -312,7 +312,7 @@ non-sandboxed environments is 500)

## Gnip Enterprise API

Twarc supports integration with the Gnip Twitter Full-Archive Enterprise API.
twarc supports integration with the Gnip Twitter Full-Archive Enterprise API.
To do so, you must pass in the `--gnip_auth` argument. Additionally, set the
`GNIP_USERNAME`, `GNIP_PASSWORD`, and `GNIP_ACCOUNT` environment variables.
You can then run the following:
Expand All @@ -328,7 +328,7 @@ You can then run the following:
## Use as a Library

If you want you can use twarc programmatically as a library to collect
tweets. You first need to create a `Twarc` instance (using your Twitter
tweets. You first need to create a `twarc` instance (using your Twitter
credentials), and then use it to iterate through search results, filter
results or lookup results.

Expand Down Expand Up @@ -372,9 +372,9 @@ for tweet in t.hydrate(open('ids.txt')):

## User vs App Auth

Twarc will manage rate limiting by Twitter. However, you should know that
twarc will manage rate limiting by Twitter. However, you should know that
their rate limiting varies based on the way that you authenticate. The two
options are User Auth and App Auth. Twarc defaults to using User Auth but you
options are User Auth and App Auth. twarc defaults to using User Auth but you
can tell it to use App Auth.

Switching to App Auth can be handy in some situations like when you are
Expand All @@ -391,7 +391,7 @@ If you know what you are doing and want to force App Auth, you can use the

twarc --app_auth search ferguson > tweets.jsonl

Similarly, if you are using Twarc as a library you can:
Similarly, if you are using twarc as a library you can:

```python
from twarc import Twarc
Expand Down
14 changes: 7 additions & 7 deletions README_es_mx.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

*Traducciones: [japonés], [Inglés], [Portugués], [Sueco], [Swahili]*

Twarc es una recurso de línea de commando y catálogo de Python para archivar JSON dato de Twitter. Cada tweet se representa como
un artículo de JSON que es [exactamente](https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object) lo que fue capturado del API de Twitter. Los Tweets se archivan como [JSON de línea orientado](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON). Twarc se encarga del [límite de tarifa](https://developer.twitter.com/en/docs/basics/rate-limiting) del API de Twitter. Twarc también puede facilitar la colección de usuarios, tendencias y detallar las identificaciones de los tweets.
twarc es una recurso de línea de commando y catálogo de Python para archivar JSON dato de Twitter. Cada tweet se representa como
un artículo de JSON que es [exactamente](https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/tweet-object) lo que fue capturado del API de Twitter. Los Tweets se archivan como [JSON de línea orientado](https://en.wikipedia.org/wiki/JSON_streaming#Line-delimited_JSON). twarc se encarga del [límite de tarifa](https://developer.twitter.com/en/docs/basics/rate-limiting) del API de Twitter. twarc también puede facilitar la colección de usuarios, tendencias y detallar las identificaciones de los tweets.

Twarc fue desarrollado como parte del proyecto [Documenting the Now](http://www.docnow.io/) el cual fue financiado por el [Mellon Foundation](https://mellon.org/).
twarc fue desarrollado como parte del proyecto [Documenting the Now](http://www.docnow.io/) el cual fue financiado por el [Mellon Foundation](https://mellon.org/).

## La Instalación

Antes de usar Twarc es necesario registrarse por [apps.twitter.com](https://apps.twitter.com/). Después de establecer la solicitud, se anota el clabe del consumidor, el secreto del consumidor, y entoces clickear para generar un access token y el secretro del access token. Con estos quatros requisitos, está listo para usar Twarc.
Antes de usar twarc es necesario registrarse por [apps.twitter.com](https://apps.twitter.com/). Después de establecer la solicitud, se anota el clabe del consumidor, el secreto del consumidor, y entoces clickear para generar un access token y el secretro del access token. Con estos quatros requisitos, está listo para usar twarc.
1. Instala [Python](https://www.python.org/downloads/) (2 ó 3)
2. Instala Twarc atraves de pip (si estas acezando de categoría: pip install --upgrade twarc)
2. Instala twarc atraves de pip (si estas acezando de categoría: pip install --upgrade twarc)

## Quickstart:

Expand Down Expand Up @@ -151,7 +151,7 @@ Si tiene un geo-location, puede usarlo.

`twarc trends 39.9062,-79.4679`

Twarc buscara el lugar usando el [trends/closest](https://developer.twitter.com/en/docs/api-reference-index) API para encontrar el `woeid` más cerca.
twarc buscara el lugar usando el [trends/closest](https://developer.twitter.com/en/docs/api-reference-index) API para encontrar el `woeid` más cerca.

### Timeline

Expand Down Expand Up @@ -189,7 +189,7 @@ Para conseguir los usuarios en una lista, se puede usar el list URL con el comma

## Use as a Library

Twarc se puede usar programáticamente como una biblioteca para coleccionar tweets. Necesitas usar un `Twarc` instance (usando tus credenciales de Twitter), y luego lo usas para buscar por resultados de búsqueda.
twarc se puede usar programáticamente como una biblioteca para coleccionar tweets. Necesitas usar un `twarc` instance (usando tus credenciales de Twitter), y luego lo usas para buscar por resultados de búsqueda.

`from twarc import Twarc

Expand Down
39 changes: 20 additions & 19 deletions README_ja_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ twarc

*翻訳: [英語], [ポルトガル語], [スペイン語], [スワヒリ語], [スウェーデン語]*

Twarcは、TwitterのJSONデータをアーカイブするためのコマンドラインツールおよびPythonライブラリーのプログラムです。
twarcは、TwitterのJSONデータをアーカイブするためのコマンドラインツールおよびPythonライブラリーのプログラムです。

- 各ツイートは、Twitter APIから返された内容を[正確に](https://dev.twitter.com/overview/api/tweets)表すJSONオブジェクトとして表示されます。
- ツイートは[line-oriented JSON](https://en.wikipedia.org/wiki/JSON_Streaming#Line-delimited_JSON)として保存されます。
- TwarcがTwitterのAPI[レート制限](https://dev.twitter.com/rest/public/rate-limiting)を処理してくれます。
- Twarcはツイートを収集できるだけでなく、ユーザー、トレンド、ツイートIDの詳細な情報の収集(hydrate; ハイドレート)にも役立ちます。
- twarcがTwitterのAPI[レート制限](https://dev.twitter.com/rest/public/rate-limiting)を処理してくれます。
- twarcはツイートを収集できるだけでなく、ユーザー、トレンド、ツイートIDの詳細な情報の収集(hydrate; ハイドレート)にも役立ちます。

Twarcは[Mellon Foundation](https://mellon.org/)によって援助された[Documenting the Now](http://www.docnow.io)プロジェクトの一環として開発されました.
twarcは[Mellon Foundation](https://mellon.org/)によって援助された[Documenting the Now](http://www.docnow.io)プロジェクトの一環として開発されました.

## Install | インストール

Twarcを使う前に[Twitter Developers](http://apps.twitter.com)にあなたのアプリケーションを登録する必要があります.
twarcを使う前に[Twitter Developers](http://apps.twitter.com)にあなたのアプリケーションを登録する必要があります.

登録したら, コンシューマーキーとその秘密鍵を控えておきます.
そして「Create my access token」をクリックして、アクセストークンと秘密鍵を生成して控えておいてください.
これら4つの鍵が手元に揃えば, Twarcを使い始める準備は完了です.
これら4つの鍵が手元に揃えば, twarcを使い始める準備は完了です.

1. [Python](http://python.org/download)をインストールする (Version2か3)
2. [pip](https://pip.pypa.io/en/stable/installing/) install twarcする
Expand All @@ -35,7 +35,7 @@ $ brew install twarc

## Quickstart | クイックスタート

まず初めに, アプリケーションのAPIキーをTwarcに教え, 1つ以上のTwitterアカウントへのアクセスを許可する必要があります.
まず初めに, アプリケーションのAPIキーをtwarcに教え, 1つ以上のTwitterアカウントへのアクセスを許可する必要があります.

twarc configure

Expand All @@ -53,7 +53,8 @@ $ brew install twarc

### Configure | 設定

`configure`コマンドで, 取得したアプリケーションキーをTwarcに教えることができます.
`configure`コマンドで, 取得したアプリケーションキーをtwarcに教えることができます.
break

twarc configure

Expand Down Expand Up @@ -141,7 +142,7 @@ Twitterはツイートの言語をコーディングしようとします. [ISO

### Hydrate | ハイドレート

Twarcの`hydrate`コマンドは, ツイートの識別子のファイルを読み込んで, Twitterの[status/lookup](https://dev.twitter.com/rest/reference/get/statuses/lookup) APIを用いてそれらのツイートのJSONを書き出します.
twarcの`hydrate`コマンドは, ツイートの識別子のファイルを読み込んで, Twitterの[status/lookup](https://dev.twitter.com/rest/reference/get/statuses/lookup) APIを用いてそれらのツイートのJSONを書き出します.

twarc hydrate ids.txt > tweets.jsonl

Expand Down Expand Up @@ -199,7 +200,7 @@ Geolocationがあれば, `WOE ID`の代わりにジオロケーションを使

twarc trends 39.9062,-79.4679

バックグラウンドでTwarcは, Twitterの[trends/closest](https://dev.twitter.com/rest/reference/get/trends/closest) APIを使用して, 場所を検索し, 最も近い`WOE ID`を見つけます.
バックグラウンドでtwarcは, Twitterの[trends/closest](https://dev.twitter.com/rest/reference/get/trends/closest) APIを使用して, 場所を検索し, 最も近い`WOE ID`を見つけます.

### Timeline | タイムライン

Expand All @@ -220,10 +221,10 @@ Geolocationがあれば, `WOE ID`の代わりにジオロケーションを使
### Replies | 返信

残念ながら, TwitterのAPIは現在, ツイートへの返信の取得をサポートしていません.
代わりに, Twarcは検索APIを使用してその機能の近似を行います.
代わりに, twarcは検索APIを使用してその機能の近似を行います.

Twitterの検索APIは, 1週間以上前のツイートの取得をサポートしていません.
そのため, Twarcは先週までに送信されたツイートに対する返信のみを取得できます.
そのため, twarcは先週までに送信されたツイートに対する返信のみを取得できます.

特定のツイートへの返信を取得したい場合は以下のようにします.

Expand Down Expand Up @@ -273,7 +274,7 @@ Premium APIを使用するには、使用しているエンドポイントと環
--limit 1000 \
> tweets.jsonl

環境がサンドボックス化されている場合、Twarcが一度に100件以上のツイートを要求しないように
環境がサンドボックス化されている場合、twarcが一度に100件以上のツイートを要求しないように
`--sandbox`を使用する必要があります。(サンドボックス化されていない環境のデフォルトは 500)

twarc search blacklivesmatter \
Expand All @@ -286,8 +287,8 @@ Premium APIを使用するには、使用しているエンドポイントと環

## Use as a Library | ライブラリとして使用

必要で応じてTwarcをプログラム的にライブラリとして使ってツイートを収集することができます
最初に(Twitterの資格情報を使用して)Twarcインスタンスを作成し、検索結果、フィルタ結果、
必要で応じてtwarcをプログラム的にライブラリとして使ってツイートを収集することができます
最初に(Twitterの資格情報を使用して)twarcインスタンスを作成し、検索結果、フィルタ結果、
または検索結果の反復を処理するために使用できます。

```python
Expand Down Expand Up @@ -328,8 +329,8 @@ for tweet in t.hydrate(open('ids.txt')):

## User vs App Auth

TwarcはTwitterによるレート制限を管理しますが、 それらのレート制限は、認証方法によって
異なります。ユーザー認証とアプリ認証の2つのオプションがありますが、Twarcは
twarcはTwitterによるレート制限を管理しますが、 それらのレート制限は、認証方法によって
異なります。ユーザー認証とアプリ認証の2つのオプションがありますが、twarcは
デフォルトでユーザー認証を使用するので、アプリ認証を使用するように指示することもできます。

アプリ認証への切り替えは、ツイートを検索するときなんかに便利です。ユーザー認証は
Expand All @@ -345,7 +346,7 @@ TwarcはTwitterによるレート制限を管理しますが、 それらのレ

twarc --app_auth search ferguson > tweets.jsonl

同様に、Twarcをライブラリとして使用している場合は、次のことができます。
同様に、twarcをライブラリとして使用している場合は、次のことができます。

```python
from twarc import Twarc
Expand Down Expand Up @@ -441,7 +442,7 @@ URLを短縮すると, 最もよくツイートされたURLのランキングリ
## twarc-report

[twarc-report](https://github.com/pbinkley/twarc-report)プロジェクトでは, [D3.js](http://d3js.org/)でのビジュアライゼーションでの使用に適したCSVまたはJSONを生成・出力するユーティリティスクリプトを用意しています.
以前はTwarcの一部であった`directed.py``d3graph.py`としてtwarc-reportプロジェクトに移管しました.
以前はtwarcの一部であった`directed.py``d3graph.py`としてtwarc-reportプロジェクトに移管しました.

またそれぞれのスクリプトは, ビジュアライゼーションのHTMLでのデモを生成できます.

Expand Down
14 changes: 7 additions & 7 deletions README_pt_br.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ twarc
twarc é uma ferramenta de linha de comando e usa a biblioteca Python para arquivamento de dados do Twitter com JSON.
Cada tweet será representado como um objeto JSON
[exatamente](https://dev.twitter.com/overview/api/tweets) o que foi devolvido pela
API do Twitter. Os Tweets serão armazenados como [JSON, um por linha](https://en.wikipedia.org/wiki/JSON_Streaming#Line-delimited_JSON). Twarc controla totalmente a API [limites de uso](https://dev.twitter.com/rest/public/rate-limiting)
para você. Além de permitir que você colete Tweets, Twarc também pode ajudá-lo
API do Twitter. Os Tweets serão armazenados como [JSON, um por linha](https://en.wikipedia.org/wiki/JSON_Streaming#Line-delimited_JSON). twarc controla totalmente a API [limites de uso](https://dev.twitter.com/rest/public/rate-limiting)
para você. Além de permitir que você colete Tweets, twarc também pode ajudá-lo
Coletar usuários, tendências e hidratar tweet ids.

twarc Foi desenvolvido como parte [Documenting the Now](http://www.docnow.io)
Expand Down Expand Up @@ -155,7 +155,7 @@ O comando `dehydrate` gera uma lista de id de um arquivo de tweets:

### Hydrate

O comando do Twarc `hydrate` Lê um arquivo de IDs de tweets e escreve o tweet em JSON para eles usando Twitter [status/lookup](https://dev.twitter.com/rest/reference/get/statuses/lookup) API.
O comando do twarc `hydrate` Lê um arquivo de IDs de tweets e escreve o tweet em JSON para eles usando Twitter [status/lookup](https://dev.twitter.com/rest/reference/get/statuses/lookup) API.

twarc hydrate ids.txt > tweets.jsonl

Expand Down Expand Up @@ -307,7 +307,7 @@ ambientes sem sandbox é 500)
## Usar twarc como uma biblioteca

Se você quiser pode usar `twarc` programaticamente como uma biblioteca
para coletar Tweets. Primeiro você precisa criar uma instância do `Twarc`
para coletar Tweets. Primeiro você precisa criar uma instância do `twarc`
(usando as suas Credenciais do Twitter) e, em seguida, usá-lo para iterar
através de resultados de pesquisa ou filtrar resultados de pesquisa.

Expand Down Expand Up @@ -351,9 +351,9 @@ for tweet in t.hydrate(open('ids.txt')):

## User x App Auth

Twarc gerenciará a limitação de taxas pelo Twitter. No entanto, você deve
twarc gerenciará a limitação de taxas pelo Twitter. No entanto, você deve
saber que a limitação de taxa varia de acordo com a maneira como você
autentica. As duas opções são User Auth e App Auth. O padrão do Twarc é usar a
autentica. As duas opções são User Auth e App Auth. O padrão do twarc é usar a
autenticação do usuário, mas você pode dizer a ele para usar o App Auth.

Mudar para App Auth pode ser útil em algumas situações, como quando você está
Expand All @@ -370,7 +370,7 @@ de linha de comando `--app_auth`:

twarc --app_auth search ferguson > tweets.jsonl

Da mesma forma, se você estiver usando Twarc como uma biblioteca, você pode:
Da mesma forma, se você estiver usando twarc como uma biblioteca, você pode:

```python
from twarc import Twarc
Expand Down
Loading

0 comments on commit 8f52cfa

Please sign in to comment.