Skip to main content

Self tracking your online life!

Project description

rebrand

Refactor your software using programming language independent string replacement.

Helps by renaming directories, filenames and file contents in a case-preserving manner.

rebrand demo

How does it work

Imagine we want to rename a library called SomeThing to AnotherName.

It will first normalize "SomeThing" to ["some", "thing"] and "AnotherName" to ["another", "name"], and build patterns on this.

Then, when matching and replacing, it will memorize the casing pattern and separator on e.g. "Some-thing" to replace it with the same convention, like so: "Another-name".

This works for:

  • filenames
  • directories
  • file contents

Binaries are just copied, and warnings are currently shown for png and jpg files containing logo or icon.

Installation

pip install rebrand

Usage

rebrand <OLD> <NEW> <LOCATION> (optional: <DESTINATION>)
# e.g. rebrand ancient modern .

TODO:

  • Implement radically faster matching
  • More options (such as disabling image warnings, verbosity, ignore patterns)
  • Switch from fire back to argparse

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rebrand-0.0.12.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

rebrand-0.0.12-py2.py3-none-any.whl (5.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rebrand-0.0.12.tar.gz.

File metadata

  • Download URL: rebrand-0.0.12.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0

File hashes

Hashes for rebrand-0.0.12.tar.gz
Algorithm Hash digest
SHA256 4b9884796f1962ca10ba0e18ac0394efee9d03588c4d7315fc3ef6cdd2721f7b
MD5 8cef7d54051c04001230d54d18a39bfe
BLAKE2b-256 e9008008fd2e6b2066589059584ccd584ea625dd593e5d841e79aad135d409f5

See more details on using hashes here.

File details

Details for the file rebrand-0.0.12-py2.py3-none-any.whl.

File metadata

  • Download URL: rebrand-0.0.12-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0a0

File hashes

Hashes for rebrand-0.0.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 60d7455600f35927d739e14e488172cb4e22fd9f964593d2ed058c98975fda49
MD5 3b5c0225537be815a574c692a93deef6
BLAKE2b-256 595bc47f3df51cfdb1e27048f107ee6e64ed4f19645dae2edd8104980f4996f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page