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

PyCon by Python

Park Hyunwoo
August 18, 2018

PyCon by Python

파이콘 한국 2018 라이트닝토크에서 발표했던 자료입니다.

Park Hyunwoo

August 18, 2018
Tweet

More Decks by Park Hyunwoo

Other Decks in Design

Transcript

  1. Ѥъೠ Ҵղ ౵੉ॆ ࢤక҅ী ૑ࣘ੸ੋ ࠁఙ੉ غҊ੗ ౵੉௑ ೠҴਸ ৈח

    ੉ਬח “౵੉ॆ ࢤక҅ী ૑ࣘ੸ੋ ࠁఙ੉ غҊ੗” ۄҊ ೤פ׮.
  2. .php ੉ ಕ੉૑ ࡺ݅ ইפۄ ౵੉ॆ കಕ੉૑о php۽ غয ੓ਸ

    ࣻب ੓Ҋ – ࢎप਷ ইפ૑݅ – ߹ ޙઁח ইתפ׮.
  3. 16 for patron in preset.patrons: 17 patron = patron.rsplit('/', 1)

    18 if len(patron) == 2: 19 patrons.append({'name': patron[0], 'org': patron[1]}) 20 else: 21 patrons.append({'name': patron[0]}) 22 23 page = template.render({ 24 'coc': preset.coc, 25 'sponsor_levels': preset.sponsor_levels, 26 'staffs': preset.staffs, 27 'volunteers': preset.volunteers, 28 'patrons': patrons, 29 'keynotes': preset.keynotes, 30 'programs': preset.programs, 31 'session_categories': preset.session_categories, 32 }) 33 34 # Save result as html file 35 with open("pyconkr-2018-booklet.html", "wb") as file: 36 file.write(page.encode('utf-8')) 37 38 # Build 39 if os.environ.get('TARGET') == 'production': 40 if not os.environ.get('DOCRAPTOR_APIKEY'): 41 sys.exit('Please set DOCRAPTOR_APIKEY to bulid production pdf!') 42 import docraptor 43 44 baseurl = "https://lqez.github.io/pyconkr-2018-booklet/" 45 docraptor.configuration.username = os.environ['DOCRAPTOR_APIKEY'] 46 doc_api = docraptor.DocApi() Ӓېࢲ ੉ߣীח ౵੉ॆਵ۽ ٜ݅য ࠁওणפ׮. ޛۿ ׮ܲ ঱যੋ HTMLҗ CSSب ࢎਊ೮णפ׮.
  4. pyconkr.pdf pyconkr.html preset.py ইޖౡ, ؘ੉ఠܳ ӗҊ ࣚਵ۽ ࠂࢎ ࠢৈ֍ӝ ೧ࢲ

    ౵੉ॆ dict ഋधਵ۽ ળ࠺೤פ׮. sponsor_levels = [ { 'name': '׮੉ইހ٘', 'code': 'diamond', 'mode': 'full', 'sponsors': [ { 'name': 'ߛ௼࢟۞٘', 'img': 'banksalad.svg', 'desc': '''ӝࣿ੉ Әਲ਼ਸ ߄Ե ࣻ ੓ਸөਃ? ߛ௼࢟۞٘ח ’਋ܻ’੄ Әਲ਼ਸ ߄ }, { 'name': 'ೞ੉ಌழ֏౟', 'img': 'hyperconnect.svg', 'desc': '''ೞ੉ಌழ֏౟ח ੹ ࣁ҅ 2র ׮਍۽٘ܳ ӝ۾ೠ জ 'ই੗ܰ'৬ ೣԋ }, ], }, {
  5. pyconkr.pdf pyconkr.html Jinja2ܳ ੉ਊ೧ HTML ޙߨਸ о૓ ޙࢲܳ ٜ݅যշפ׮. ੉޷૑ח

    ੋࣧܳ ਤ೧ svg৬ э਷ ߭ఠ ౵ੌ۽ ળ࠺೤פ׮. preset.py
  6. pyconkr.pdf pyconkr.html ੉ઁ HTML ౵ੌਸ PDF۽ ߸ജೞݶ ؾפ׮. preset.py <!DOCTYPE

    html> <html dir="ltr" lang="ko-KR"> <head> <meta charset="utf-8" /> <title>౵੉௑ ೠҴ 2018</title> <meta name="author" content="PyCon Korea 2018 Organizing team"/> <meta name="date" content="2018-07-10"/> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="frontcover"> <div class="wrap"> <img class="slogan" src="images/pyconkr2018-slogan-white-left.svg"> <h2>౵੉௑ ೠҴ 2018</h2> <h3>ࢲ਎, ௏ুझ</h3> <p><strong>झ೐ܽ౟</strong> / 8ਘ 15ੌ, 17ੌ</p> <p><strong>ౚషܻ঴</strong> / 8ਘ 17ੌ</p> <p><strong>ஶಌ۠झ</strong> / 8ਘ 18ੌ, 19ੌ</p> <img class="logo" src="images/pyconkr2018-logo-white.svg"> <img id="item-7" src="images/pyconkr2018-item-7.svg"> <img id="item-8" src="images/pyconkr2018-item-8.svg"> </div> </div>
  7. ੜ ؾפ׮. ೞ૑݅ റਗࢎ۽ࠗఠ ഛੋਸ ߉ইঠ ೞח ޙઁо ੓য, ѾҴ

    ੉ۧѱ ೞ૓ ޅೞҊ ׮द ਃ୒೧ࢲ ߉ওणפ׮.
  8. pyconkr.pdf pyconkr.html preset.py ୭ઙ ౵ੌਸ ੋࣧ স୓ী ߄۽ ࠁյ ࣽ

    হ঻૑݅, ݆਷ ࠗ࠙ਸ programmable ೞѱ ೧Ѿೡ ࣻ ੓঻णפ׮.