Code Monkey home page Code Monkey logo

sharedrop's People

Contributors

madx avatar moox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

piec maxwellsun

sharedrop's Issues

Add filter to only catch certains files

I put all kind of crap on my Desktop folder, including the screenshots (default location on osx) so we should add a way to filter what should be handled by this program. Maybe just (png|jpg...) for a start ?
Or a regex pattern to catch "Screen shot ..." ?

Drop the Ruby dependency

$HASH_CMD "$file" | cut -d' ' -f1 | ruby -ne 'puts $_.to_i(16).to_s(36)'

This line depends on Ruby, I don't want this dependency anymore if the project is going to be used by more that 1 person (me :D)

I need to find away to do this efficiently in bash.

Better architecture

Ok, I just had a review of the code after @MoOx's PR, there are some things I really don't like with the codebase in general (not due to @MoOx's commits but due to the fact that the script was a hack at the beginning)

Here's a better architecture I've been thinking about:

sharedrop
├── bin
│   └── sharedrop                 # Actual executable, to be symlinked in ~/.bin
├── lib
│   ├── config.sh                 # Configuration variables definitions
│   ├── core.sh                   # Core functionality
│   ├── logging.sh                # Logging facilities
│   ├── os 
│   │   ├── linux.sh              # Linux-specific stuff
│   │   └── osx.sh                # OS X-specific stuff
│   └── web.sh                    # Web listing generator
├── Makefile                      # Makefile to help installation and bootstrap
├── README.md                     # Project description and instructions
└── test
    ├── test_add_local_file.sh    # Tests for adding a local file
    ├── test_clean_old_files.sh   # Tests for cleaning old files
    └── test_remove_local_file.sh # Tests for removing a local file

What do you think?

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.