Skip to content

Code review ideas: slugify the network name #11

@ghost

Description

make_files.py:55
base_filename is the network name (read from the csv file) with certain characters replaced (namely spaces).
This pattern is usually called 'slugify'
On github;
un33k has a unicode version for python called python-slugify
benlinton has a bash/cli project called slugify
In django there is a built-in called slugify

The code on line 55 needs to create a name which is acceptable for a file system, and this involves not just replacing spaces. This line could be replaced with a call to any of these projects above which can handle many more outlier cases than just replacing spaces (ie unicode, slashes, double extensions etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions