diff --git a/src/main/kotlin/main/parser.kt b/src/main/kotlin/main/parser.kt index b8803d6..585d2be 100644 --- a/src/main/kotlin/main/parser.kt +++ b/src/main/kotlin/main/parser.kt @@ -17,7 +17,7 @@ fun takeOnlyJs(fileName: String): String { } fun jsWords(code : Map) : Map{ - val js = File("C:\\Users\\thoma\\Desktop\\sample.txt").readText().toString().split(",") + val js = File("src/main/kotlin/main/sampleJS.txt").readText().toString().split(",") return code.filter { it.key !in js } } @@ -32,14 +32,14 @@ fun splitLanguages(file : String){ if (js != "") { - File("C:\\Users\\thoma\\Desktop\\test2\\javascript.js").writeText(js) + File("javascript.js").writeText(js) } if (newHtml != File(file).readText()) { - File("C:\\Users\\thoma\\Desktop\\test2\\html.html").writeText(newHtml) + File("html.html").writeText(newHtml) } if (css != "") { - File("C:\\Users\\thoma\\Desktop\\test2\\css.css").writeText(css) + File("css.css").writeText(css) } } diff --git a/src/main/kotlin/main/sampleJS.txt b/src/main/kotlin/main/sampleJS.txt new file mode 100644 index 0000000..cac6227 --- /dev/null +++ b/src/main/kotlin/main/sampleJS.txt @@ -0,0 +1 @@ +abstract,alert,all,anchor,apply,area,arguments,Array,ArrayBuffer,assign,async,atob,Attr,Audio,before,BigInt,BigInt64Array,BigUint64Array,Blob,Boolean,btoa,Buffer,byte,case,catch,CDATASection,char,CharacterData,class,clearInterval,clearTimeout,clientInformation,close,closed,comment,concat,confirm,console,const,constructor,continue,createComment,createDocumentFragment,createDocumentType,createEvent,createNodeIterator,createRange,createTextNode,createTreeWalker,crypto,customElements,Data,DataView,Date,decodeURI,decodeURIComponent,default,delete,do,document,documentElement,Document,DocumentFragment,DocumentType,double,Element,else,embed,EmbeddingElements,enctype,endsWith,escape,eval,eval,event,Event,EventTarget,export,false,fetch,File,FileList,finally,find,finish,Float32Array,Float64Array,focus,for,form,FormData,frameElement,frames,from,Function,Function,getComputedStyle,getElementsByName,getAttribute,getAttributeNS,getAttributeNode,getAttributeNodeNS,getElementsByClassName,getElementsByTagName,getElementsByTagNameNS,getElementsByTagNameNS,getRootNode,globalThis,go,goto,hasAttribute,hasAttributeNS,hasAttributes,hasChildNodes,hasFocus,headers,history,host,hostname,href,id,iframe,if,implements,import,in,includes,indexOf,inherit,innerHeight,innerWidth,input,insertAdjacentElement,insertAdjacentText,insertAdjacentHTML,insertAdjacentHTML,insertBefore,instanceof,int,interface,isFinite,isNaN,isPrototypeOf,item,join,localStorage,location,long,location,locationbar,map,Math,matchMedia,max,Media,MediaError,MediaKeySession,MediaList,message,MIMETypeArray,name,NaN,navigator,new,NodeList,Notification,null,object,Object,onabort,onbeforeunload,onblur,oncanplay,oncanplaythrough,onchange,onclick,onclose,oncontextmenu,oncopy,oncut,ondblclick,ondevicemotion,ondeviceorientation,ondrag,ondragend,ondragenter,ondragexit,ondragleave,ondragover,ondragstart,ondrop,ondurationchange,onemptied,onended,onerror,onfocus,onhashchange,oninput,oninvalid,onkeydown,onkeypress,onkeyup,onlanguagechange,onload,onloadeddata,onloadedmetadata,onloadend,onmessage,onmessageerror,onmousedown,onmouseenter,onmouseleave,onmousemove,onmouseout,onmouseover,onmouseup,onmousewheel,onoffline,ononline,onpagehide,onpageshow,onpaste,onpause,onplay,onplaying,onpopstate,onprogress,onratechange,onreset,onresize,onscroll,onsearch,onseeked,onseeking,onselect,onshow,onstalled,onstorage,onsubmit,onsuspend,ontimeupdate,ontoggle,onunload,onvolumechange,onwaiting,onwheel,open,opener,option,origin,package,pageXOffset,pageYOffset,parent,parseFloat,parseInt,password,performance,personalbar,play,popstate,prompt,Promise,prompt,propertyIsEnumerable,prototype,proxy,public,push,RadioNodeList,Range,RangeError,reference,Reflect,RegExp,RegExp,Reflect,RegExpStringIterator,RegExpStringIterator,releaseEvents,removeChild,removeEventListener,removeNode,removeRange,repeat,replace,requestAnimationFrame,requestIdleCallback,resizeBy,resizeTo,return,route,scroll,scrollBy,scrollTo,screen,Screen,screenLeft,screenTop,screenX,screenY,scrollTo,scrollX,scrollY,scrollbars,search,select,self,self,setInterval,setTimeout,setAttribute,setAttributeNode,setAttributeNodeNS,setAttributeNS,setIntegrity,setItem,setInterval,setTimeout,shadowRoot,short,size,some,sort,speechSynthesis,splice,split,start,status,statusbar,Storage,String,submit,super,Symbol,SyntaxError,TaskAttributionTiming,Text,Textarea,then,this,thresholdthrowthrows,to,toGMTString,toJSON,toLocaleString,toString,toggle,top,transitionend,transient,true,typeof,unescape,undefined,unhandledrejection,unhandledrejection,union,Unit,unscopables,URIError,URL,URLSearchParams,valueOf,var,VBArray,void,volatile,wait,WeakMap,WeakRef,WeakSet,WebSocket,Window,window,windowbar,windowname,with,XMLHttpRequest,XMLSerializer,yield,i,c,count,dataset,let,classList,contains,col,row,function,reload,add,break,addEventListener,forEach,getElementById \ No newline at end of file