Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's aim for consistency in page names, and no repetition in generated files :) #18

Open
julianharty opened this issue May 11, 2017 · 4 comments

Comments

@julianharty
Copy link
Owner

I'm amazed to discover my browser can cope with spaces and * characters in URLs. Some of our generated pages include these, but not all. I've noticed we use a couple of mapping algorithms e.g. some pages started with:

  • dynamic (albeit not in the current implementation 0e26703)
  • term_** e.g. term_**e**rrors.html
  • term_ e.g. term_errors.html
  • spaces e.g. I SLICED UP FUN.html and term_**s**pecial characters.html

Also while writing this issue I notice we have 2 instances of pages for what seem to be the same topic e.g. here are all the files containing terms:

-rw-r--r--  1 julianharty  staff  4117 10 May 12:50 term_**e**rrors.html
-rw-r--r--  1 julianharty  staff   709 10 May 12:50 term_**i**nputs.html
-rw-r--r--  1 julianharty  staff  1000 10 May 12:50 term_**i**ntegrations.html
-rw-r--r--  1 julianharty  staff   835 10 May 12:50 term_**l**ocation.html
-rw-r--r--  1 julianharty  staff  3599 10 May 12:50 term_**s**pecial characters.html
-rw-r--r--  1 julianharty  staff   704 10 May 12:50 term_**s**tore.html
-rw-r--r--  1 julianharty  staff  3951 10 May 12:50 term_errors.html
-rw-r--r--  1 julianharty  staff   849 10 May 12:50 term_integrations.html
-rw-r--r--  1 julianharty  staff   653 10 May 12:50 term_pages_and_content.html
-rw-r--r--  1 julianharty  staff  3442 10 May 12:50 term_special_characters.html
-rw-r--r--  1 julianharty  staff   653 10 May 12:50 term_special_formats.html

There are 6 with **'s in their names and 5 without (inputs isn't duplicated). Note the sizes of the files for seemingly identical content varies significantly. The differences are related to layout and adding a 'back' button.

julianharty$ diff dist/term_\*\*e\*\*rrors.html dist/term_errors.html 
12,17c12
<       <button class='back-button white' onclick='goBack()' title='Go Back'><</button>
< <div class='header'>Errors &amp; Error messages</div>
< 
< 
< <div class="body">
<     <h1>Errors, error messages, &amp; error testing</h1>
---
>       <h1>Errors, error messages, &amp; error testing</h1>
40d34
< </div>

Here's where I'm hoping we'll get to soon:

  1. no duplication in the files - 1 file per term/topic, per heuristic, etc
  2. URLs to be contiguous terms without any spaces or formatting characters. I'd prefer underscores to represent spaces in URLs which should work well even in older, less capable web browsers. e.g. I_SLICED_UP_FUN.html
@ISNIT0
Copy link
Collaborator

ISNIT0 commented May 12, 2017

I believe the files are duplicated because the old files are still present - if you clear out ./dist it should fix that.

I'll take a look at the **s in the name, it was laziness that caused me to leave them in.

@julianharty
Copy link
Owner Author

The duplicate files were being regenerated by the script (as indicated by the timestamps in the directory listing). Anyway, thank you for cleaning this up.

@julianharty
Copy link
Owner Author

julianharty commented May 18, 2017

A quick note before I lose track. Here's perhaps an unusual case where an odd filename is still generated. I'd expanded a term (to match the original heuristic in I SLICED UP FUN) which has 2 terms for the second 'I'. For the moment I've split the terms back into 2 distinct terms. Perhaps we can revisit having a dual term at some point in future?

file:///Users/julianharty/myopensourceprojects/testing-heuristics/dist/term_interactions_/_interruptions.html

BTW: this file wasn't generated so clicking on the link got a 404 error.

@ISNIT0
Copy link
Collaborator

ISNIT0 commented May 18, 2017

Oooh, fun :) it's because the '/' ends up causing everything to look in the wrong place :)

We can look at that some time soon

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

No branches or pull requests

2 participants