Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Re:VIEWで技術書を書こう

zaki50
January 30, 2016

 Re:VIEWで技術書を書こう

iPhone Dev Sapporo勉強会

zaki50

January 30, 2016
Tweet

More Decks by zaki50

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • YAMAZAKI Makoto (@zaki50) • Realm engineer(Java team) •

    גࣜձࣾ uPhyca
 (Android/iOSͷडୗ։ൃɺίϯαϧςΟϯά)
  2. Re:VIEWͰͰ͖Δ͜ͱ • ݟग़͠ • Օ৚ॻ͖ • ૬ޓࢀর • ਤදͱࣗಈ࠾൪ •

    ιʔείʔυ • Ϧʔυจ • ίϥϜ • ғΈهࣄ • ஫ऍ • ࣮ߦ݁Ռͷಈతຒ ΊࠐΈ
  3. ݪߘͷྫ = ໾ʹཱͭ౾஌ࣝ ٕज़ॻΛ࡞Δࡍʹ٧·Δ෦෼Λ·ͱΊ·ͨ͠ɻ ஌Βͳ͚Ε͹ͨͲΓண͔ͳ͍஌ࣝ΍ɺͪΐͬͱͨ͠޻෉ͳͲศརͳςΫχοΫΛ঺հ͠·͢ɻ == ਪ঑͢ΔσΟϨΫτϦߏ੒ #@# NOTE author:vvakame

    TechBooster͕ਪ঑͢ΔσΟϨΫτϦߏ੒Λड़΂͓͖ͯ·͢ɻ ཁ఺͸࣍ͷͱ͓ΓͰ͢ɻ ۩ମతʹ͸@<list>{directory}Ͱ͢ɻ * ϦϙδτϦͷτοϓϨϕϧʹ͸ϑΝΠϧΛ͋·ΓࢄΒ͔͞ͳ͍ * ෳ਺ਓͰࣥචͨ࣌͠ʹͦΕͧΕͷϑΝΠϧ͕ࠞͬͨ͟ΓअຐʹͳͬͨΓ͠ͳ͍Α͏ʹ͢Δ * ஶऀશһͰར༻͢ΔreviewͷόʔδϣϯΛݻఆ͢Δ * ϏϧυखॱΛ౷Ұ͢ΔͨΊʹԿΒ͔ͷλεΫϥϯφʔΛ࢖͏ʢTechBoosterͷ৔߹ɺNode.js+gruntʣ //list[directory][σΟϨΫτϦߏ੒]{ ᵓᴷᴷ README.md ᵓᴷᴷ circle.yml ʢCIαʔϏεͰ͋ΔCircle CIͷઃఆϑΝΠϧʣ ᵓᴷᴷ setup.sh ʢࣥචલʹgem΍npmͷΠϯετʔϧΛߦ͏εΫϦϓτʣ ᵓᴷᴷ Gemfile ʢbundlerܦ༝ͰRe:VIEWΛར༻͢ΔͨΊͷઃఆϑΝΠϧʣ ᵓᴷᴷ Gemfile.lock ʢϥΠϒϥϦͷόʔδϣϯΛϩοΫ͢Δʣ ᵓᴷᴷ package.json ʢgruntΛར༻͢ΔͨΊͷnpm༻ઃఆϑΝΠϧʣ ᵓᴷᴷ npm-shrinkwrap.json ʢϥΠϒϥϦͷόʔδϣϯΛϩοΫ͢Δʣ ग़య https://github.com/TechBooster/C89-FirstStepReVIEW-v2/blob/master/articles/tips.re
  4. pdfੜ੒(Macͷྫ) * MacTex(https://www.tug.org/mactex/)ΛΠϯετʔϧ $ gem install bundler $ git clone

    https://github.com/TechBooster/C89- FirstStepReVIEW-v2.git $ cd C89-FirstStepReVIEW-v2 $ npm install $ npm run pdf
  5. pdfͷ഑ஔ $ cat /dev/urandom | openssl enc -base64 | tr

    -cd 'a-zA-Z0-9' | fold -w 64 | head -n 400 > urls.csv * IntelliJ Ͱ։͍ͨΒ ^(.+)$ Λ ,$1,https://storage.googleapis.com/techbooster_c89/$1/book.pdf ʹஔ׵͠ Excel Ͱ։͍ͯઌ಄Χ ϥϜʹ C89_10001 ͷΑ͏ͳ௨͠൪߸Λ;Δ # QRը૾ੜ੒ $ for i in $(cat urls.csv | xargs -n 1 ); do qrencode -o qrimages/$(echo $i | cut -d, -f1).png $(echo $i | cut -d, -f3); done $ gsutil mb -p techbooster-c88 gs://techbooster_c89 $ gsutil defacl set public-read gs://techbooster_c89 * ϒϥ΢βͰ https://console.developers.google.com/project/techbooster-c88/storage/browser/techbooster_c89/ Λ։͖ɺpdf ϑΝΠϧΛΞοϓϩʔυ͢Δ 
 $ for i in $(cat ./urls.csv | xargs -n 1 ); do echo $(echo $i | cut -d, -f1); gsutil cp gs://techbooster_c89/book.pdf gs:// techbooster_c89/$(echo $i | cut -d, -f2)/C89_Android_Recipe.pdf; done * ϒϥ΢β͔ΒΞοϓϩʔυͨ͠ϑΝΠϧΛ࡟আ͢Δ 
 * htmlͱcssͰɺQRίʔυΛϥϕϧγʔϧ༻ʹϨΠΞ΢τ