Skip to content

Instantly share code, notes, and snippets.

@afaur
Created December 30, 2016 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afaur/e4321fdb9c952bf0879a85c153c634ef to your computer and use it in GitHub Desktop.
Save afaur/e4321fdb9c952bf0879a85c153c634ef to your computer and use it in GitHub Desktop.
// site: http://www.beaufortonline.com/building-and-construction-terms-dictionary/
// Get element with class '.nine'
var items = document.querySelector('.nine').getElementsByTagName('p');
// Find total amount of 'p' elements inside of tag with class '.nine'
var total = items.length;
// Collect terms and definitions
var terms = {}
// iterate over all the nested elements
for (i=0; i<items.length; i++) {
// If a tag contains a 'em' tag
var hasEm = items.item(i).querySelector('em');
// When a tag has an 'em' tag we know the next tag contains all the term data
if (hasEm) {
// Get the next tags innerText
var wordDefStr = items.item(i+1).innerText;
// Convert the word + def string into a pair array
var wordDefPair = wordDefStr.split(': ');
// If our term is less then six characters long then collect it
if ( wordDefPair[0].length < 6 ) {
terms[ wordDefPair[0] ] = wordDefPair[1];
}
}
}
// Output all colleted terms and definitions
console.log( JSON.stringify(terms) );
{
"APRON":"Trim used under the stool on interior windows.",
"ARCH":"A curved structure that will support itself and the weight above its curved opening by mutual pressure.",
"ARRIS":"A sharp edge formed when two planes or surfaces meet. Found on edges of moldings, doors, shelves, and in cabinet construction.",
"ASTM":"American Society for Testing Materials.",
"ATTIC":"The space between the roof and the ceiling.",
"BATT":"A roll or sheet of insulation designed to be installed between members of frame construction.",
"BEAM":"A structural member transversely supporting a load.",
"BEECH":"A whitish to reddish brown hardwood used especially in construction for interior and exterior cabinet parts. Blends well with birch for stained kitchen cabinets and vanities.",
"BIRCH":"Hard and heavy light reddish brown hardwood. The most widely used hardwood veneer for flush doors, cabinet work, and paneling. Mill products include interior trim, floor ing, sash, and trim.",
"BRICK":"A solid masonry unit composed of clay or shale. Formed into a rectangular prism while soft and burned or fired in a kiln.",
"CHAIN":"A unit of land measurement 66 ft. in length.",
"CHASE":"A slot or continuous groove built in a masonry wall to accommodate ducts, pipes, or conduits.",
"CHORD":"The horizontal member of a truss connecting the lower corners.",
"CLEAT":"A piece of wood, normally used in frame construction, fastened to another member to serve as a brace or support.",
"CORE":"The inner layer or layers of plywood. The core may con sist of veneer, solid lumber, or composition board.",
"COVE":"Molded trim of a concave shape used around cabinet construction and other built-ins.",
"CULL":"Building material (especially boardsl that is rejected because of defects or below usuable grade.",
"DEED":"A document indicating that the ownership of land has been transferred from one person to another.",
"DOME":"A roof used over an entryway or a complete structure in the form of a hemisphere.",
"DUCTS":"In a house, usually round or rectangular metal pipes for distributing warm air from the heating plant to rooms, or air from a conditioning device or as cold air returns. Ducts are also made of composition materials.",
"EAVES":"The lower portion of the roof that overhangs the wall.",
"ELL":"An extension or wing of a building at right angles to the main section.",
"FILL":"Sand, gravel, or loose earth used to bring a subgrade up to a desired level around a house.",
"FLUE":"The space or passage in a chimney through which smoke, gas, or fumes ascend. Each passage is called a flue, which together with any others and the surrounding masonry make up the chimney.",
"GAIN":"(a) A recess or notch into which a door hinge fits flush with the surface. (b) Refers to the way heat is extracted from solar radiation.",
"GRADE":"The surface of the ground around a building.",
"GROUT":"A plaster-like material used to seal between ceramic and other tile in kitchens, showers, and baths.",
"JAMB":"The side and head lining of a doorway, window, or other opening.",
"JOIST":"A horizontal structural member which supports the floor or ceiling system.",
"LATH":"A building material of wood, metal, gypsum, or in sulating board that is fastened to the frame of a building to act as a plaster base.",
"LEASE":"A contract for the use of land for a period of years with a designated payment of a monthly or annual rental.",
"LOT":"A measured amount of property (land) having fixed boundaries.",
"MAPLE":"Both hard and soft maple are generally light tan and used in construction where hardness is a major factor.Used for expensive cabinetwork, flooring, doors, and trim. Often used for interior railings, posts, and furniture.",
"PANEL":"In house construction, a thin flat piece of wood, plywood, or similar material, framed by stiles and rails as in a door or fitted into grooves of thicker material with molded edges for decorative wall treatment.",
"PECAN":"See HICKORY.",
"PIER":"A masonry pillar usually below a building to support the floor framing.",
"PITCH":"The slope of a roof usually expressed as a ratio.",
"PLAT":"A drawing of surveyed land indicating the location, boun daries. and dimensions of the parcel. The recorded plat, usually sent to an appropriate governmental office or the county recorders office, also contains information as to easements, restrictions, and lot number.",
"PLATE":"Sill plate is a horizontal member anchored to a masonry wall. Sole plate is bottom horizontal member of a frame wall. Top plate is top horizontal member of a frame wall support ing ceiling joists, rafters or other members.",
"PLUMB":"Exactly perpendicular; vertical.",
"RIDGE":"The top edge of the roof where two slopes meet.",
"RISE":"In stairs, the vertical height of a step or flight of stairs.",
"RISER":"Each of the vertical boards closing the spaces between the treads of stairways.",
"RUN":"In stairs, the net width of a step or the horizontal distance covered by a flight of stairs.",
"SASH":"A single light frame containing one or more lights of glass.",
"SILL":"The lowest member of the frame of a structure, resting on the foundation and supporting the floor joists or the uprights of the wall. The member forming the lower side of an opening, as a door sill.",
"STOOL":"The horizontal ledge or strip as part of the frame below an interior window.",
"STUDS":"The vertical framing members of a wall.",
"SUMP":"A pit in a basement floor which collects water and into which a sump pump is placed to remove the water.",
"TITLE":"Evidence indicating the rights a person has to the owner ship and possession of land.",
"TRACT":"A specified area of land.",
"TRAP":"A U-shaped pipe below plumbing fixtures designed to create a water seal and prevent sewer odors and gases from being released into the habitable areas.",
"TREAD":"The horizontal board in a stairway on which the foot is placed.",
"TRIM":"The finish materials in a building, such as moldings, ap plied around openings (window trim, door trim) or at the floor and ceiling of rooms (baseboard, cornice).",
"TRUSS":"Structural members arranged and fastened in triangular units to form a ridge framework for support of loads over a long span.",
"WYTHE":"Pertaining to a single-width masonry wall."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment