Привет! Мне нужна помощь в ситуации, когда у меня есть папка «слайды», и у меня есть несколько текстовых / html-файлов, например:
slide1.html
slide2.html
slide3.html
и так далее .....
Структура этих файлов выглядит следующим образом:
<h2>Title of the Slide</h2>
<p><a href="http://mydomain.com"><img src="tick_icon.jpg" width="227" height="227" alt="icon" longdesc="http://longdescription" /></a></p>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
3 свойства Название, изображение и описание. По одному в каждой строке.
У меня есть 10-12 таких файлов. Я хотел функцию, которая будет зацикливать и анализировать все эти файлы в папке с именем 'slides'
и возвращать значения каждой строки (из 3 строк) как переменные, чтобы я мог поместить их в свой код для макета.