Giter Club home page Giter Club logo

black-history-archiver's Introduction

my-fave-tweet-salvager

特定のアカウントの過去ツイートを全件取得します。 アカデミック版のtwitter api(v2)のキーが必要です。 取得した過去ツイートをDBに追加・CSV出力する機能を抱き合わせてます

前提条件

  • git
  • docker
  • docker-compose

上記のソフトウェアが実行するマシンにインストールされていること。

準備体操

dotenvファイルをサンプルファイルからコピーして必要な値を入れる。

cp .env.example .env

調整したら、docker-compose up -d で各コンテナを起動させる。

基本的な使い方

  • 立ち上げたappコンテナにログインする
docker-compose exec app bash
  • ログインしたら、マイグレーション行いデータベースの準備をする。
db-migrate
  • あとは以下に上げるコマンドを実行して過去ツイートを取得する

DBに保存する場合

# user-idは取得したいアカウントのIDに適宜書き換える
 python main.py --user-id=sunflower930316 --save-format=db

CSV出力の場合

# user-idは取得したいアカウントのIDに適宜書き換える
 python main.py --user-id=sunflower930316 --save-format=csv

使い方(応用編)

本アプリケーション最低限のものしか用意してません。 保存するデータを変えるために、テーブル構造を変更するなど行う場合は本リポジトリをfork して自分のええ塩梅になるようにソースコード・DBなどを書き換えてください。

black-history-archiver's People

Contributors

fyui001 avatar

Watchers

 avatar

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.