少額文章販売の話
TIME rest time current/total
TopicsPlaceHolder

少額文章販売の話

湘南.pm #1

Aug 26th, 2023

Profile

songmu

Profile

songmu

代表的なOSS

Perl

わたしがL(の作者)です

% perl -ML -E 'say String::Random->new->randregex("[0-9a-zA-Z]{12}")'

Perlの話

正規表現のeオプション

ghq handbook

handbook文化

miyagawaさん由来! (?)

プラットフォーム

leanpub

zenn

zennとPDF出力(未対応)

https://github.com/zenn-dev/zenn-community/issues/82

その他

zennとGitHubの連携

リポジトリが以下の構成になっていればいい。

.
├── articles/ # 単独記事
└── books/    # 本

あとはzennの画面から連携設定できる。pushしたら自動反映。

https://github.com/Songmu/zenn.dev

.
├── articles
│   └── hogenoge.md
└── books
    └── ghq-handbook
        ├── 01-introduction.md
        ├── 02-basic-usage.md
        ├── 03-command-root.md
        ├── 04-command-get.md
        ├── 05-command-list.md
        ├── 06-command-create.md
        ├── 07-bulk-ghq-get.md
        ├── 08-ghq-roadmap.md
        └── config.yaml

cli

% npm install -g zenn-cli
% zenn init
% zenn preview # 便利

留意点

zennのGitHub連携

bookのリポジトリとzenn管理リポジトリとの連携

ghq-handbookが更新されたら、その内容をzenn.devにpushするように

cpina/github-action-push-to-another-repository

公開されているカスタムアクションで簡単に実現。
https://github.com/cpina/github-action-push-to-another-repository

name: push to zenn
on:
  push:
    branches: [master]
jobs:
  push:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: cpina/github-action-push-to-another-repository@main
      env:
        API_TOKEN_GITHUB: ${{ secrets.GH_PAT }}
      with:
        destination-github-username: Songmu
        destination-repository-name: zenn.dev
        target-branch: main
        source-directory: ja
        target-directory: books/ghq-handbook

以上

宣伝

宣伝2

OSS活動を支援してくれると嬉しいです。