- Notifications
You must be signed in to change notification settings - Fork0
Provided is a Google Apps Script that's soul purpose is to help make MLA writing easier
License
WillDev12/MLA-Helper
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Here are the installation steps:
- Copy the code by hovering over the right side and pressing the square
- Open the Google Dock of your choice and under the top menu select Extensions\Apps Script
- When the new tab opens, delete the premade text and paste the code.
- Go back to the dock, click refresh, and enjoy!
Install code:
//WillDevv12 was here////For more Google Script related content, see https://github.com/WillDev12//varui=DocumentApp.getUi();vardoc=DocumentApp.getActiveDocument(),body=doc.getBody(),cup=body.getParagraphs();functiononOpen(){ui.createMenu('MLA Helper').addItem('Launch GUI','launchGUI').addSeparator().addItem('Make MLA Header','newHeader').addItem('New Quote','newQuote').addSeparator().addSubMenu(DocumentApp.getUi().createMenu('New Citing').addItem('Create Citings Page','citingsPage').addSeparator().addItem('Book','newCitation')).addSubMenu(DocumentApp.getUi().createMenu('Fonts').addItem("Times New Romanator","timesNew").addItem("Italicator","italixer")).addToUi();ui.alert("MLA Helper v1.0.5 script by WillDevv12 \n\n Catch me on GitHub: https://github.com/WillDev12");}functionnewQuote(){varoutput=UrlFetchApp.fetch("https://raw.githubusercontent.com/WillDev12/MLA-Helper/main/scr/html/quote.html");varform=HtmlService.createHtmlOutput(output.getContentText()).setWidth(800).setHeight(360);ui.showModalDialog(form,'');}functionnewCitation(){varoutput=UrlFetchApp.fetch("https://raw.githubusercontent.com/WillDev12/MLA-Helper/main/scr/html/citation.html");varform=HtmlService.createHtmlOutput(output.getContentText()).setWidth(800).setHeight(700);ui.showModalDialog(form,'New Citation');}functionnewHeader(){body.insertParagraph(0,"Name\nTeacher's Name\nClass\nDate (Day# Month Year)\n\n");body.insertParagraph(1,"TITLE").setAlignment(DocumentApp.HorizontalAlignment.CENTER);}functionreturnedHeading(title,name,tname,came,day,month,year){constmonthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];body.insertParagraph(0,name+"\n"+tname+"\n"+came+"\n"+day+" "+monthNames[month]+" "+year+"\n\n");body.insertParagraph(1,title).setAlignment(DocumentApp.HorizontalAlignment.CENTER);}functiontimesNew(){constselection=DocumentApp.getActiveDocument().getSelection();if(selection!=null){constelement=selection.getRangeElements()[0];element.getElement().asText().setFontFamily(element.getStartOffset(),element.getEndOffsetInclusive(),"Times New Roman").setFontSize(element.getStartOffset(),element.getEndOffsetInclusive(),12);}else{vare="nullselected";FeedbackError(e);}}functionitalixer(){constselection=DocumentApp.getActiveDocument().getSelection();if(selection!=null){constelement=selection.getRangeElements()[0];element.getElement().asText().setItalic(true);}else{vare="nullselected";FeedbackError(e);}}functioncitingsPage(){varpar=doc.getParagraphs();varnum=1;for(variinpar){num++;}num=num-1;body.insertPageBreak(num);body.insertParagraph(num+1,"Works Cited").setAlignment(DocumentApp.HorizontalAlignment.CENTER);body.insertParagraph(num+2,"");par=doc.getParagraphs();varposition=doc.newPosition(par[par.length-1],0);doc.setCursor(position);}functionSendQuote(quote,author,pagen){varstr='"'+quote+'" ('+author+" "+pagen+").";varcursor=DocumentApp.getActiveDocument().getCursor();varsurroundingText=cursor.getSurroundingText();surroundingText.appendText(str);}functionciteBook(cont,afn,amn,aln,asfx,title,pub,city,sn,snum,edition,year){varproduct="";varproduct2="";varindent1="";varitalix="";if(aln===""){}else{product=aln+", "}if(amn===""){}else{product=product+amn+" "}if(afn===""){}else{product=product+afn+", "}if(asfx===""){}else{product=product+asfx+", "}if(cont==="role"){}else{product=product+cont+". "}if(title===""){}else{italix=title+". "}if(edition===""){}else{product2=edition+" ed., "}if(city===""){}else{product2=product2+city+", "}if(pub===""){}else{indent1=pub+", "}if(year===""){}else{indent1=indent1+year+". "}if(sn===""){}else{indent1=indent1+sn+", "}if(snum===""){}else{indent1=indent1+snum+"."}varoutput="<p>"+product+"<i>"+italix+"</i>"+product2+"<br> "+indent1;varform=HtmlService.createHtmlOutput(output).setWidth(500).setHeight(150);ui.showModalDialog(form,'Output Citation');}functionFeedbackError(e){if(e==="null"){ui.alert("ERROR: One or more required inputs are missing.")}elseif(e==="nullselected"){ui.alert("ERROR: You must select text before running this script.")}else{ui.alert(e);}}functionlaunchGUI(){vars=UrlFetchApp.fetch("https://raw.githubusercontent.com/WillDev12/MLA-Helper/main/scr/html/sidebar.html");varservice=HtmlService.createHtmlOutput(s.getContentText()).setTitle('MLA Helper');DocumentApp.getUi().showSidebar(service);}
You could also gohere to copy a prebuilt template for Google Docs (ad link):
https://direct-link.net/378237/mla-helperHere is a breif list of things that MLA Helper can do:
- Fonts and Formatting
- Change selected text to Times New Roman
- Change a sentence to Italic
- Quotes
- Open a dialog that automatically quotes text on input
- Citing
- Create a works cited page in the click of a button
- Heading
- Create MLA header in the click of a button
- Library
- Interactive Google Script library
v1.0.5 update: -Added Sidebar -Re-organized UI -Updated Source -Template update -Fixed citing format -Fixed minor MLA errorsMLA Helper now hosts a Google Script library where you can use our functions in your personal code!
Library ID:
1g-0LjSh1pEMcYM4aT9tBLyONhwIOd8iLlg901Va3yYjhAY9JagfNnY_B
- Copy the provided id
- Open the GS file of your choice.
- Under "Library," press the plus button, paste, and add.
Using is simple, but following the instructions will make it easier.
Here is how to define a quote: [Remember to define with var before sending to doc]
functionnewQuote(){varquote=MLAHelper.createQuote("quote","author","pg#");varcitation=MLAHelper.createCitation("authorFirstName","authorMiddleName","authorLastName","authorSuffix","contribution","title","publisher","city","seriesName","seriesNumber","edition","year");Logger.log(quote);Logger.log(citation);}
The output should be similar to this:
Executionlog-:--:--AM/PMNoticeExecutionstarted-:--:--AM/PMInfo"quote"(authorpg#).-:--:--AM/PMInfoauthorLastName,authorMiddleNameauthorFirstName,authorSuffix,contribution.title.editioned.,city,publisher,year.seriesName,seriesNumber.-:--:--NoticeExecutioncompleted
You can also generate base foundations for an MLA essay:
functionsetNew(){MLAHelper.createHeader("name","teacherName","className","day","month","year","title");}
It saves time1
It is easy to use2
It it easy to install3
Footnotes
MLA helper was made to save time. The easy to use GUI makes writing a whole lot easier when it comes to things such as quoting, citing, and a few others which makes the process a whole lot simpler.↩
When creating MLA helper, I decided to make the most foolproof GUI possible so that anyone would be able to use it problem free. Because of this, it is very organised and gets the job done for those who are not tech handy.↩
Installing the program is easy and can be done in no time. Please seeInstallation for firther details or clickhere for a pre-made template (ad link)↩
About
Provided is a Google Apps Script that's soul purpose is to help make MLA writing easier
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
.svg%2520(1).png&f=jpg&w=240)