0% found this document useful (0 votes)
5 views3 pages

Handout 08

This document provides instructions on using PowerShell to generate a list of files in a project directory and create an HTML file with hyperlinks to those files. It explains the basics of HTML, including the use of tags and the importance of relative paths for file accessibility. Additionally, it outlines the steps to create and save an HTML file using Notepad, ensuring it can be opened on any device with a web browser.

Uploaded by

pargostilum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Handout 08

This document provides instructions on using PowerShell to generate a list of files in a project directory and create an HTML file with hyperlinks to those files. It explains the basics of HTML, including the use of tags and the importance of relative paths for file accessibility. Additionally, it outlines the steps to create and save an HTML file using Notepad, ensuring it can be opened on any device with a web browser.

Uploaded by

pargostilum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Instituto Superior del Traductorado –

Information Search Techniques


DIEGEP 5649

Handout 08: Organizing information


Part II: The alternative
Let PowerShell do it for you. Yes, that is an overstatement, but we can certainly use
PowerShell to crawl the project’s directory recursively to generate a list of all the files and
their location. Then, we can use the collected information to generate an HTML document
containing the list of hyperlinks.

HTML stand for Hyper Text Markup Language. Markup language is a computer language that
consists of keywords or tags that help format the overall view the document and the data it
contains. It is a very basic language used mostly for documents designed to be displayed in a
web browser. And this is exactly the reason why we should consider it an excellent choice
when looking for high compatibility. Any device that can browse the internet can open this
file.

HTML tags come mostly in pairs and they delimit content so as to instruct the browser how
to display the information. The first tag in the pair is called an opening tag. The second tag
is called a closing tag.

The tags we are going to use for this project are h1 (heading), p (paragraph), a (anchor or
link) and br (break).

The code in the HTML file will look like this:

The browser will render the aforementioned code this way:

So now we have a file that can be viewed and opened on any device. It also lists all the files
in our project and facilitates access to them.

www.traductorado.edu.ar Page 1 of 3
Instituto Superior del Traductorado –
Information Search Techniques
DIEGEP 5649

There are other HTML tags that can be used to add and display the information in more
beautiful ways. Even if they would not contribute much to the purpose of this handout, it
might be a good idea to do a little research on ‘HTML tags’ to see how else you can style and
format your document.

A note on paths

To guarantee portability, the location of the files (defined in the href attribute) must be a
relative path. A relative path is the location relative to the document containing the
hyperlinks.

For example, your translation project (including the contents document) is contained within
a directory named Translations.

These are the absolute or full paths:

'C:\Translations\contents.html'
'C:\Translations\termbases\termbase_01.txt'
'C:\Translations\termbases\termbase_01.txt'

When you send the translation project to a client or agency, you will send the Translations
directory with all the files in it. And this is where the complication arises. Where will the
recipient place the directory?

If the recipient places the Translations directory in his Downloads folder, then the path is no
longer 'C:\Translations\termbases\termbase_01.txt' but 'C:\Users\...\Downloads\
Translations\termbases\termbase_01.txt'. Consequently, the hyperlinks in contents.html
will not work.

This is why it is necessary to use relative paths. Because relative paths never change, they
always point to the same location no matter where the Translations directory is placed.

To reach termbase_01.txt from contents.html, the relative path is ‘termbases\


termbase_01.txt’.

So wherever the Translations directory is placed, it will still work because it looks for the
termbase in a location relative to contents.html instead of a root directory in C:\.

www.traductorado.edu.ar Page 2 of 3
Instituto Superior del Traductorado –
Information Search Techniques
DIEGEP 5649

Create an HTML file with Notepad

This is the tree view of the directory structure


created in Handout 04.

You are going to place contents.html in the root


(inside Translations). It will contain hyperlinks to
Source Text.docx, Target Text.docx and
Termbase.txt.

To create contents.html using Notepad, follow these steps:

a. Open Notepad.
b. Type the HTML code.
c. Then click on File > Save As
d. Name the file: contents.html
e. Save as type: All files (*.*)
f. Save in the Translations directory.

Things to look at

 The tree view of Translations directory (contents.html should be there).


 The full HTML code of contents.html in Notepad.
 contents.html in the browser.

Since you are saving the file with the .html extension, when you double click on it, it will be
opened by your default browser. To edit contents.html, you have to right-click on the file
and then on Open with > Notepad.

www.traductorado.edu.ar Page 3 of 3

You might also like