Giter Site home page Giter Site logo

dropbox_filename_sanitizer's Introduction

Dropbox filename sanitizer

This little command line program displays and/or mangles the specified files to conform to characters allowed to synchronize correctly on Dropbox. I wrote this after having files shared with people and much later learning they weren't even getting them! The program is implemented in the Nimrod programming language.

License

MIT license.

Installing from source code

Stable version

Install the Nimrod compiler. Then use Nimrod's Nimble package manager to install the binary:

$ nimble update
$ nimble install argument_parser
$ nimble install dropbox_filename_sanitizer

This will install the dropbox_filename_sanitizer command into Nimble's binary directory.

Development version

Install the Nimrod compiler. Then use Nimrod's Nimble package manager to install locally the github checkout:

$ nimble update
$ nimble install argument_parser
$ git clone https://github.com/gradha/dropbox_filename_sanitizer.git
$ cd dropbox_filename_sanitizer
$ nimble install

Installing prebuilt binaries

If you trust binaries and random strangers on the internet, you can go to https://github.com/gradha/dropbox_filename_sanitizer/releases and download any of the .zip files attached to a specific release. Put the binary file somewhere in your $PATH and invoke at will

Usage

Once you have installed the program you can run the command and pass the directory where your Dropbox shared folder exist:

$ dropbox_filename_sanitizer /home/user/Dropbox

This will display all the files that have conflicting characters and the name they would be mangled into. Pass the -m or --mutate switch to actually perform renaming of these files. All behaviour is recursive.

If you want to invoke this program periodically you can put the command into your crontab. But if you don't want to use cron or want to execute it from other login scripts, you can use the -p or --period switch to specify how many seconds need to have elapsed since the last run of the program using this switch to actually scan the directories. What this means is that if you put the following line in your login scripts:

dropbox_filename_sanitizer -p 3600 -m /home/user/Dropbox

The command will create a ~/.dropbox_filename_sanitizer_last_run to remember when was the last time it was run, and if 3600 seconds have not elapsed, the command will quit without checking the folder. In general the command is fast enough that you don't have to care, but maybe you want to put this into a semi-automatic script which may run at a high frequency and don't want to spam your hard drive with I/O requests.

Some paths are always ignored during directory traversal. The list of case insensitive paths to ignore is:

If you are reading this on GitHub the list will be empty, see file docs/ignored_paths.rst.

Documentation

There is not much more documentation documentation, you can see all the files on the github project linked from the docindex file and dropbox_filename_sanitizer_last_run --help will display the command line usage. You can also read the files installed with the Nimble package and use the doc nakefile task to build their HTML version. Unix example:

$ cd `nimble path dropbox_filename_sanitizer`
$ nake doc
$ open docindex.html

Changes

This is development version 0.4.1. For a list of changes see the docs/CHANGES.rst file.

Git branches

This project uses the git-flow branching model with reversed defaults. Stable releases are tracked in the stable branch. Development happens in the default master branch.

Feedback

You can send me feedback through github's issue tracker. I also take a look from time to time to Nimrod's forums where you can talk to other nimrod programmers.

dropbox_filename_sanitizer's People

Contributors

gradha avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.