Giter Club home page Giter Club logo

gss-hagaki's Introduction

はじめに

gss-hagakiはGoogleスプレッドシートから宛名のPDFを作成します。

説明などは下記のページを参考にしてください。

作った経緯について

デモサイト(PosGo)

PosGoとgss-hagakiの使い方について

使いかた

  1. リポジトリをクローンします
  2. composer update します
  3. Googleスプレッドシートでデータを作成します
  4. 共有されたURLに対してgss-hagakiを実行します

リポジトリクローン

$ git clone https://github.com/yousan/gss-hagaki

composer update します

$ composer update

GoogleCloud でサービスアカウントを作成する

ローカル環境でテスト実行を行う方法です。サービスアカウントの作成、鍵の取得は一度行えば良いです。

  1. GoogleCloudでサービスアカウントを作成する
  2. サービスアカウントに対する鍵(secret.json)を作成する。
  3. 鍵を設置する (gss-hagaki直下にsecret.json)
  4. スプレッドシートに上記で作成したサービスユーザのメールアドレス(ID)に対して共有する。

Googleスプレッドシートでデータを作成します

PosGoとgss-hagakiの使い方について https://2017.l2tp.org/archives/809 を参考にしてください。 スプレッドシートを作成しそのサービスアカウントに対して共有を行います。 例: [email protected] 権限は閲覧者で大丈夫です。

共有されたURLに対してgss-hagakiを実行します

下記のようなコードを書いて実行します。 過去のバージョンではファイルに書き出していましたが、出力が標準出力に出るかもしれないので注意してください。

<?php
require_once(__DIR__.'/../vendor/autoload.php');

use GSSHagaki\GSSHagaki;

$url    = 'https://docs.google.com/spreadsheets/d/1yfMIdt8wgBPrMY3UwiCTsX3EN_2gcLCmPAEy8dfYeLY/export?usp=sharing&format=csv';
$hagaki = new GSSHagaki($url);

ライセンスについて

gss-hagakiはGPLv3です。MigMixフォントについてはIPAフォントライセンスです。1

Footnotes

  1. http://mix-mplus-ipa.osdn.jp/migmix/

gss-hagaki's People

Contributors

yousan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.