Skip to content

Update DIRECTORY #1161

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

Merged
merged 5 commits into from
Sep 6, 2019
Merged

Update DIRECTORY #1161

merged 5 commits into from
Sep 6, 2019

Conversation

jai-dewani
Copy link
Contributor

Index more problems from sections like

  • Machine Learning
  • Project Euler
  • Scripts

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run the script in the scripts directory instead of doing this by hand.

Copy link
Member

@cclauss cclauss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backslashes worry me... do the URLs work? master/\digital_image_processing

The URLs do not seem to work.

@jai-dewani
Copy link
Contributor Author

Just saw the URL problem, will fix it

@@ -36,7 +36,7 @@ def print_directory_md(top_dir: str = ".") -> None:
if filepath != old_path:
old_path = print_path(old_path, filepath)
indent = (filepath.count(os.sep) + 1) if filepath else 0
url = "/".join((URL_BASE, filepath, filename)).replace(" ", "%20")
url = "/".join((URL_BASE, filepath.split(os.sep)[1], filename)).replace(" ", "%20")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are URLs which always use slashes. os.sep on Windows is a backslash which is not a good idea in a URL.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used os.sep to remove the back slashes in filepath
Before that filepath were something like "\\folder" and that's why bad URLs were generated.

@cclauss cclauss merged commit ab25079 into TheAlgorithms:master Sep 6, 2019
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
* Update DIRECTORY

* Updated DIRECTORY

* Fixed bug in directory build and re-build the directory.md

* fixed url issue

* fixed indentation in Directory.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants