npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qiitanage

v0.0.3

Published

Qiitaの記事を管理します

Downloads

4

Readme

Qiitanage

非公式のQiita管理コマンドです。
個人用のQiita記事をローカルにダウンロードします。
(余裕があれば、Qiita記事のアップも追加したいです。)

使い方

前提と注意

Qiitanageは、Qiitaの記事をZenn形式のディレクトリに、Zenn形式のファイル名・Markdownで保存します。

Zenn形式とは、articlesディレクトリに、slugというファイル名で、YAML Front Matterと呼ばれる設定が頭にあるマークダウン形式で、記事を保存します。articlesディレクトリは、複数形であることに注意して下さい。なお、Zenn形式のディレクトリの詳細な説明は、「Zenn CLIで記事・本を管理する方法」をご覧ください。

このZenn形式を用いることにより、Qiita記事を容易にZennで公開することができます。

パッケージををインストール

Qiitanageは、Zenn形式のディレクトリである必要があり、articlesディレクトリ(複数形です)のあるディレクトリで下記のコマンドを実行して下さい。

npm i qiitanage

Qiita発行のトークンを取得

Qiitanageは、Qiita記事を読み書きするために、Qiitaの発行するアクセストークンが必要となります。
そのため、そのアクセストークンの取得方法を、以下に記載します。

Qiitaのアプリケーションページを開き、新しくトークンの発行画面に行きます。

個人用のQiita記事をローカルにダウンロードします。
スコープはread_qiitawrite_qiitaをチェックして下さい。
(ただし、本Qiitanageは現在、読み込み権限のみ使用します。書き込みは将来的な話です。)
アクセストークンは、複数発行できますし、削除も容易です。

生成されたアクセストークンをコピーして使用します。

アクセストークンの設定方法

方法は大きく2つで、一時的な方法、設定ファイルに保存して使う半永続的な方法に分類できます。

  • 一時的な方法
    • コマンド: export QIITA_ACCESS_TOKEN=1234567890abcdefg
    • Qiitanageのコマンドで-tオプションを用いて指定する。
  • 半永続的な方法
    • QIITA_ACCESS_TOKEN=1234567890abcdefg.envファイルに記入します。.envファイルは、人に見せてはならないものであるため.gitignoreに必ず記入して下さい。

利用する

qiitanage -i 0123456789abcdefghij

IDが0123456789abcdefghijであるあなたのQiita記事をarticlesディレクトリに保存します。ファイル名は、作成年月日8桁-q-0123456789abcdefghijとなります。これは編集しないで下さい。

qiitanage -oi 0123456789abcdefghij

IDが0123456789abcdefghijであるあなたのQiita記事をarticlesディレクトリに上書き保存します。

qiitanage -a

あなたの全てのqiita記事をarticlesディレクトリに格納します。
既にarticlesディレクトリにある場合は、上書きしません。

qiitanage -oa

あなたの全てのqiita記事をarticlesディレクトリに格納します。
oオプションんがあるため、既にarticlesディレクトリにある場合は、上書きします。

また、Qiita記事をarticlesディレクトリに保存すると、同時にqiita_itemsディレクトリに、タイトルの入った名称のシンボリックリンクを作成します。

依存package

  • qiita-js-2
  • commander
  • dotenv

License

MIT