Code Monkey home page Code Monkey logo

bizdocify's Introduction

BizDocify

Morkdown からビジネス向けっぽい PDF を生成する仕組み

出来上がりのサンプル

input --> output.pdf

インストール方法(Windows向け)

$ErrorActionPreference = "stop"
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

$bizdocifyUrl = "https://github.com/kongou-ae/bizdocify/archive/master.zip"
$hugoUrl = "https://github.com/gohugoio/hugo/releases/download/v0.54.0/hugo_extended_0.54.0_Windows-64bit.zip"

Invoke-WebRequest -Uri $bizdocifyUrl -OutFile $HOME/Downloads/bizdocify.zip
Expand-Archive -Path $HOME/Downloads/bizdocify.zip -DestinationPath $HOME

Invoke-WebRequest -Uri $hugoUrl -OutFile $HOME/Downloads/hugo.zip
Expand-Archive -Path $HOME/Downloads/hugo.zip -DestinationPath $HOME
mv $HOME\hugo.exe $HOME\bizdocify-master

使い方(Windows向け)

ドキュメントの書き方

  • config.toml にドキュメントの基本情報を記載します
  • .\hugo.exe new content\YOURFILENAME.md で空ファイルを作成します
  • title:Author: を記入します
    • 複数の Markdown ファイルが存在する場合、Markdown ファイルを title: に記載された文字列の順番で整列したうえで PDF ファイルを生成します
  • 好きな文章を Markdown ファイルに書きます

出来上がりの確認方法

  • .\hugo.exe server を実行して、Web Server を起動します
  • tools.html を開いて Viewer をクリックします
  • 表示された Vivliostyle Viewer を利用して、できあがりの PDF の見た目を確認します
    • Markdown を更新した場合、Vivliostyle Viewer を手動でリロードしてください
    • 更新が反映されない場合、DevTool を 利用して Chrome のキャッシュを無効化してください

PDF の出力方法

Google Chrome で Vivliostyle Viewe にアクセスしたうえで、右クリック → 印刷 を選択して PDF として保存します。

ショートコード

Markdown にショートコードを追記することで、PDF ファイルに情報を追加できます。

img

画像の記法を次のように囲うと、画像に図表番号が付与されます。

{{% img title="App Service の全体図" %}}
![aaaaa](/images/2019-03-05-001.PNG)
{{% /img %}}

table

テーブルの記法を次のように囲うと、テーブルに図表番号が付与されます。

{{% table  title="利用するFQDN一覧" %}}
| No | 管理者 | 利用者 |
|------------|------------|----------------|
| 1 |adminportal.region.fqdn|portal.region.fqdn|
|2 |adminmanagement.region.fqdn|management.region.fqdn|
{{% /table %}}

ライセンス

  • GNU Affero General Public License v3.0
  • BizDocify は次のソフトウェアを含んでいます。

bizdocify's People

Contributors

kongou-ae avatar

Stargazers

@nekoruri avatar

Watchers

James Cloos avatar  avatar

bizdocify's Issues

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.