Skip to content

Instantly share code, notes, and snippets.

View JedBeom's full-sized avatar

JedBeom JedBeom

View GitHub Profile
// ==UserScript==
// @name EBSi 기출문제
// @namespace http://tampermonkey.net/
// @version 1.0
// @description EBSi의 뭣같은 기출문제 다운로드를 고칩니다
// @author JedBeom
// @match https://www.ebsi.co.kr/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ebsi.co.kr
// @grant none
// @run-at document-end
'''
참고:
requests: https://stackoverflow.com/questions/13137817/how-to-download-image-using-requests
FPDF: https://stackoverflow.com/questions/27327513/create-pdf-from-a-list-of-images
'''
import requests
import shutil
'''
파이썬을 이용해 한글 hwp 문서의 표를 읽는다.
공식 API를 이용하지 않고, 미리보기 글자를 읽는 식의 일종의 편법(?)을 이용한다.
Body 필드도 있던데, 지금 당장 필요치 않아서 사용하지 않는다.
참고: https://yahohococo.tistory.com/45
사용하는 대상 파일은 링크가 너무 길어서 아래 댓글에 남겨둔다.
'''
import olefile
isStop = false
let words = document.querySelectorAll(".match-body.left .flip-card")
let meanings = document.querySelectorAll(".match-body.right .flip-card")
function clickAnswers() {
for(let i = 0; i < 4; i += 1) {
for(let j = 0; j < 4; j += 1) {
if (words[i].getAttribute("data-idx") === meanings[j].getAttribute("data-idx")) {
.slick-list,svg:not(:root){overflow:hidden}.slick-slide.dragging img,.zoom-overlay{pointer-events:none}.slick-loading .slick-slide,.slick-loading .slick-track{visibility:hidden}code,kbd,pre,samp{font-family:D2Coding,'D2 coding',monospace,monospace}img,legend{max-width:100%}progress,sub,sup{vertical-align:baseline}*,.slick-slider,legend{box-sizing:border-box}.p-article__body,pre{word-wrap:break-word}img[data-action=zoom]{cursor:pointer;cursor:-moz-zoom-in}.zoom-img,.zoom-img-wrap{position:relative;z-index:666;transition:all .3s}img.zoom-img{cursor:pointer;cursor:-moz-zoom-out}.zoom-overlay{z-index:420;background:#fff;position:fixed;top:0;left:0;right:0;bottom:0;filter:"alpha(opacity=0)";opacity:0;transition:opacity .3s}.slick-list,.slick-slider,.slick-track{position:relative;display:block}.zoom-overlay-open .zoom-overlay{filter:"alpha(opacity=100)";opacity:1}.zoom-overlay-open,.zoom-overlay-transitioning{cursor:default}.slick-slider{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-selec

Keybase proof

I hereby claim:

  • I am jedbeom on github.
  • I am beom (https://keybase.io/beom) on keybase.
  • I have a public key ASCjVcjt5G4wK6YA36psqK-rmycxwFa0gNxLkYFvCIjZwAo

To claim this, I am signing this object: