Skip to content
/ postem Public

Cross posting client for twitter, hatebu, and own services.

License

Notifications You must be signed in to change notification settings

azu/postem

Repository files navigation

Postem

TomblooとかTombfixのようなクロスポストクライアントアプリ。

📝 Note: このアプリは個人的な用途で作成されているため、バイナリが配布されていません。 そのため、手元のElectron環境で動かす前提の作りになっています。(それを修正するPRは歓迎です)

Features

  • Twitter、はてなブックマークなどへのクロスポスト
  • はてなブックマークを使ったタグ補完
  • 独自に対応サービスを追加可能
  • 入力欄はtextlintでのリアルタイムLint
  • URLスキームを使ってブラウザから起動できる
image

Installation

アプリに必要な依存をYarnでインストールします。

yarn install

アプリを起動する前に利用するサービスの設定をservice.jsで定義してください。

サポートしているサービス

利用するサービスは後述するservice.jsに定義します。 postemリポジトリに実装があるビルトインサポートしているサービスは次の通りです。

利用するサービスの設定

クロスポストできるサービスの一覧をservice.jsで定義します。

cp src/service.example.js src/service.js

デフォルトでは次のサービスが有効になっています。

  • Twitter
  • はてなブックマーク
  • デバッグ(Development modeのみ有効)

また、src/servicesを参考にして独自のサービスを追加できます。

Usage: 起動方法

Development mode:

yarn start

Production mode: dist/ディレクトリにバイナリが出力されます。

yarn run dist
# dist/ にアプリができる

Browser mode: asocial-bookmark形式のリポジトリに対応しています。

  • https://postem.netlify.com/?title={TITLE}&url={URL}&github.owner={Owner名}&github.repo={リポジトリ名}&github.ref={refsheads%2Fブランチ名}&github.indexPropertyName={プロパティ名}&github.token={GitHub_Token}

使い方: 投稿

  1. 投稿するサービスの選択(アイコンをクリック or ショートカット)
  2. タグや説明欄を入力
  3. "Submit"で送信(Cmd+Enter)

使い方: ショートカット

表示されているアイコンの左から順番にCmd+数字のショートカットが振られています。

  • Cmd+1: Twitter
  • Cmd+2: はてなブックマーク

最後のアイコンだけはCmd+0が振られています。

使い方: コマンドライン引数

次の引数を付けて起動すると初期値が入った状態で起動できます。

  • --title: set default title
  • --url: set default url
./bin/cmd.js --title "タイトル" --url "https://example.com"

使い方: URL scheme(production)

URL schemeはproduction modeで作成したバイナリを一度起動しておく必要があります。 起動すると、次のURL schemeが自動的に登録されます。

postem://

今見ているサイトについて投稿する場合は、次のJavaScriptを実行するとアプリが起動できます。

location.href = `postem://?url=${encodeURIComponent(window.top.location.href)}&title=${encodeURIComponent(window.top.document.title)}`

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT

About

Cross posting client for twitter, hatebu, and own services.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published