Skip to content

Instantly share code, notes, and snippets.

@truckingsim
Last active August 29, 2015 13:58
Show Gist options
  • Save truckingsim/9990727 to your computer and use it in GitHub Desktop.
Save truckingsim/9990727 to your computer and use it in GitHub Desktop.
Emmet code to generate a form to do local testing for scraper.
Used just to get emmet as the gist name....
index.html
.idea/
html>(head>title{form scraping test})+(body>(div>label[for=testText]{Text}+input:text#testText[name=testText])+(div>select#testSelect[name=testSelect]>[value=$]{optionText$}*10)+(div>label[for=testPass]{Password}+input:p#testPass[name=testPass])+(div>label[for=testSelect]{Select}+select#testSelect[name=testSelect]>[value=val$$]{text$$}*10)+(div>(label[for=radioTest$]>input:r#radioTest$[name=radioTest][value=$$]+{Radio $})*2)+(div>(label[for=alternateRadioTest$]{Alternate Radio $}+input:r#alternateRadioTest$[name=alternateRadioTest][value=$$])*2)+(div>(label{Radio In Label w/ No For $}+input:r#radioTestInLabelWithNoFor$[name=radioTestInLabelWithNoFor][value=$$])*2)+(div>(input:r#radioTestNoLabelWithId$[name=radioTestNoLabelWithId][value=$$])*2)+(div>(input:r[name=radioTestNoLabelWithNoId][value=$$])*2)+(div>(label[for=checkboxTest$]>input:c#checkboxTest$[name=checkboxTest][value=$$]+{Checkbox $})*2)+(div>(label[for=alternateCheckboxTest$]{Alternate Checkbox $}+input:c#alternateCheckboxTest$[name=alternateCheckboxTest][value=$$])*2)+(div>(label{Checkbox In Label w/ No For $}+input:c#checkboxTestInLabelWithNoFor$[name=checkboxTestInLabelWithNoFor][value=$$])*2)+(div>(input:c#checkboxTestNoLabelWithId$[name=checkboxTestNoLabelWithId][value=$$])*2)+(div>(input:c[name=checkboxTestNoLabelWithNoId][value=$$])*2)+(div>textarea#testTextarea[name=testTextarea])+(div.container>input:text#testContainerText$[name=testContainerText$]*4+textarea#testcontainerTextarea[name=testContainerTextarea]+(label[for=radioContainerTest$]>input:r#radioContainerTest$[name=radioContainerTest][value=$$]+{Radio Container $})*2)+script[src=jquery.js])
html>(
head>
title{form scraping test})
+(body>
(div>
label[for=testText]{Text}+input:text#testText[name=testText])
+(div>
select#testSelect[name=testSelect]>[value=$]{optionText$}*10)
+(div>
label[for=testPass]{Password}+input:p#testPass[name=testPass])
+(div>
label[for=testSelect]{Select}+select#testSelect[name=testSelect]>[value=val$$]{text$$}*10)
+(div>
(label[for=radioTest$]>input:r#radioTest$[name=radioTest][value=$$]+{Radio $})*2)
+(div>
(label[for=alternateRadioTest$]{Alternate Radio $}+input:r#alternateRadioTest$[name=alternateRadioTest][value=$$])*2)
+(div>
(label{Radio In Label w/ No For $}+input:r#radioTestInLabelWithNoFor$[name=radioTestInLabelWithNoFor][value=$$])*2)
+(div>
(input:r#radioTestNoLabelWithId$[name=radioTestNoLabelWithId][value=$$])*2)
+(div>
(input:r[name=radioTestNoLabelWithNoId][value=$$])*2)
+(div>
(label[for=checkboxTest$]>input:c#checkboxTest$[name=checkboxTest][value=$$]+{Checkbox $})*2)
+(div>
(label[for=alternateCheckboxTest$]{Alternate Checkbox $}+input:c#alternateCheckboxTest$[name=alternateCheckboxTest][value=$$])*2)
+(div>
(label{Checkbox In Label w/ No For $}+input:c#checkboxTestInLabelWithNoFor$[name=checkboxTestInLabelWithNoFor][value=$$])*2)
+(div>
(input:c#checkboxTestNoLabelWithId$[name=checkboxTestNoLabelWithId][value=$$])*2)
+(div>
(input:c[name=checkboxTestNoLabelWithNoId][value=$$])*2)
+(div>
textarea#testTextarea[name=testTextarea])
+(div.container>
input:text#testContainerText$[name=testContainerText$]*4
+textarea#testcontainerTextarea[name=testContainerTextarea]
+(label[for=radioContainerTest$]>input:r#radioContainerTest$[name=radioContainerTest][value=$$]+{Radio Container $})*2
)
+script[src=jquery.js]
)
@truckingsim
Copy link
Author

You will need to use the minified version for emmet to work. emmet.full is just for reference to make it easier to see what is happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment