Code Monkey home page Code Monkey logo

dropboxignore's People

Contributors

adamholwerda avatar alexndrmac avatar asbjornu avatar cpojer avatar dk-github-acc avatar drallas avatar montaguegabe avatar pre-commit-ci[bot] avatar sp1thas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dropboxignore's Issues

Dropbox ignores the .dropignore file

First of all, I applaud you for making this script.
It should be a default feature in DropBox.

Installing en running the script goes well.
Generating .dropignore files based on .gitignore files works like a charm.

BUT..... Dropbox just keeps syncing all files and folders.
At least on my computer, an iMac runnning OSX 10.14.6.

I've also tried running the ignore command, but that always results in :
Total number of ignored files: 0

Except pattern is not honored

I've been experimenting with patterns to target certain files and folders and noticed the except pattern is ignored.

Steps to reproduce

Add these lines in .dropboxignore

name_folder/
!name_folder/name_stuff_to_keep

Expected result:
The 'name_folder' should be ignored by DropBox with the exception of files and folders matching 'name_stuff_to_keep' and thus the folder 'name_folder' itself.

except pattern is ignored

I've been experimenting with patterns to target certain files and folders and noticed the except pattern is ignored.

Steps to reproduce

Add these lines in .dropboxignore

name_folder/
!name_folder/name_stuff_to_keep

Expected result:
The 'name_folder' should be ignored by DropBox with the exception of files and folders matching 'name_stuff_to_keep' and thus the folder 'name_folder' itself.

README: Please provide some details about the .dropboxignore file

Hello,

Sorry but I am confused.

The .dropboxignore file specifies which files to be ignored by dropbox sync. But is this a (built-in) feature of dropbox? Or is it a feature added by this application (project).

If it's a feature added by this project, I am confused why that isn't explicitly stated in the README (because .dropboxignore is what I was looking for). The CLI tool is nice and all, but all I personally (and probably others) care about is adding stuff to .dropboxignore. Namely,

**/node_modules

in .dropboxignore in the root directory of all my Node projects.

And I just did, and it works! Amazing!

I also tried genupi, but it created a plethera of .dropboxignore files. I'd rather not have to put one of those in all my projects.

TLDR: Explain the .dropboxignore file in README.

Broken on later versions of OS X

See: https://stackoverflow.com/questions/16658333/grep-p-no-longer-works-how-can-i-rewrite-my-searches

Running dropboxignore genupi on OSX results in multiple outputs of:

usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
	[-e pattern] [-f file] [--binary-files=value] [--color=when]
	[--context[=num]] [--directories=action] [--label] [--line-buffered]
	[--null] [pattern] [file ...]

The grep command is not working because -P is no longer supported on Mac.

Junk characters in CLI output

Describe the bug
When using the dropboxignore CLI on macOS 13.5.2, I get junk characters such as \e[34m sprinkled around in the output. The result from running the command dropboxignore ignore ./node_modules for instance, is:

usage: realpath [-q] [path ...]
\e[34mTotal number of ignored files: 0 \e[0m
Total number of ignored folders: 1 \e[0m

To Reproduce
Steps to reproduce the behavior:

  1. Install dropboxignore on macOS
  2. Run any dropboxignore command
  3. Notice how the output is full of junk characters.

Expected behavior
The output should not be full of junk characters.

Desktop (please complete the following information):

  • OS: macOS 13.5.2
  • Version: 1.2.2

Upgrade codecov

Describe the bug
Currently, codecov/codecov-action@v2 is used and because of this the following deprecation warning is raised:

unit (ubuntu-22.04)
The following actions uses node12 which is deprecated and will be forced to run on node16: codecov/codecov-action@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

For this reason, we should upgrade to codecov/codecov-action@v3

Expected behavior
Unittests should be executed without deprecation warnings
Screenshots
image

Doesn't work on MacMini

I've been waiting for something like this for a very long time. I'm so happy you took the time to implement this. thank you!

However after trying this I keep getting errors.

So I've open Terminal jumped inside my Dropbox folder, and a particular folder inside of that that uses git and has node_modules.

I've tried dropboxignore ignore ~/Dropbox/test and it returns "/usr/local/bin/dropboxignore: line 572: realpath: command not found"

Also going inside the folder directly and just typing "dropboxignore ignore ." returns the same error.

Using Mac Mini M1 2020

Can't ignore folders

Using dropboxignore I am able to ignore files but not folders.

On creating a new folder inside a dropbox synced folder and ignoring

mkdir test
dropboxignore ignore ./test

The command outputs

Total number of ignored files: 0 
Total number of ignored folders: 0

and the folder is not ignored and remains synced to the online repository.

using -v 2 the command outputs

Thu Sep  9 16:46:40 BST 2021  [ DEBUG ] Operating system: Linux 
Thu Sep  9 16:46:40 BST 2021  [ DEBUG ] realpath command is installed 
Thu Sep  9 16:46:40 BST 2021  [ DEBUG ] attr package is installed 
Thu Sep  9 16:46:40 BST 2021  [ DEBUG ] Input folder: "./test" 

Total number of ignored files: 0 
Total number of ignored folders: 0 

I am using Ubuntu 18.04, dropboxignore v1.0.0, dropbox CLI 2020,03.04 and dropbox daeman 130.4.4978.

Any help is greatly appeciated

realpath illegal option on macOS 13

Describe the bug
All dropboxignore commands seem to invoke Unix commands that possibly behave differently on macOS than on Linux, causing the following error message to be printed to the console repeatedly:

usage: realpath [-q] [path ...]
realpath: illegal option -- -
usage: realpath [-q] [path ...]
realpath: illegal option -- -
usage: realpath [-q] [path ...]
realpath: illegal option -- -
usage: realpath [-q] [path ...]
realpath: illegal option -- -
usage: realpath [-q] [path ...]
realpath: illegal option -- -
usage: realpath [-q] [path ...]
realpath: illegal option -- -

To Reproduce
Steps to reproduce the behavior:

  1. Install dropboxignore on macOS 13.5.2.
  2. Execute any dropboxignore command.
  3. Notice how usage: realpath [-q] [path ...] is printed to the console.

Expected behavior
I expect the command to work.

Desktop (please complete the following information):

  • OS: macOS 13.5.2
  • Version: 1.2.2

Improve help message

Help message of dropboxignore should be change to:

Usage: "$PROGRAM_NAME" <command> <path> [-v 0-2] [-p pattern]
  Commands:
    generate            Generate .dropboxignore files based on existing .gitignore files.
    update              Update existing .dropboxignore files if at least one .gitignore file has been changed.
    ignore              Ignore file or folder from dropbox under the given path.
    list                List ignored files and folders under the given path.
    revert              Revert ignored file or folder under the given path.
    delete              Delete specific .dropboxignore file or every .dropboxignore file under the given path.
    help                Will print this message and then will exit.
    version             Will print the version and then will exit.
  Options:
    -v                  Choose verbose level (0: Error, 1: Info, 2: Debug)
    -p                  Filtering pattern (Can be used with list command in order to filter results)

The usage function can be found here

Run tests using multiple github runners

Both unit and integration tests, should be executed in more than one operating system, in particular, should be executed using the following runners: ubuntu-22.04, ubuntu-20.04, macos-12, macos-11

In order to achieve this, run-on and strategy on .github/workflows/testing.yaml should look like this:

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-22.04, ubuntu-20.04, macos-12, macos-11 ]

`dropboxignore update` broken

Describe the bug
dropboxignore update overwrite to .gitignore instead append to .dropboxignore

To Reproduce
Steps to reproduce the behavior:

  1. Create folder with .gitignore
  2. The content of .gitignore( if applicable)
bin/

and .dropboxignore files is

bin/
  1. change .gitignore to
bin/
foo/
  1. run dropboxignore update

Expected behavior
.dropboxignore change to

bin/
foo/

Actual behavior
.gitignore change to

foo/

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Version: latest master

Additional context
The problem should be here

update_dropboxignore_file() {
  diff_content=$(diff --new-line-format="" --unchanged-line-format="" --ignore-blank-lines --ignore-tab-expansion --ignore-space-change --ignore-trailing-space -I "# [Automatically|-]" "${1}" "${2}")
  if [ -n "$diff_content" ]; then
    tee "$1" >/dev/null <<EOF
# Automatically updated .dropboxignore file at "$(date)"
# ----
$diff_content
# ----
EOF
    echo -e "$GREEN Updated $(get_relative_path "$2" "$BASE_FOLDER") $DEFAULT"
  else
    log_debug "No changes found: $(get_relative_path "$2" "$BASE_FOLDER")"
  fi
}

should change to

...
tee -a "$2" >/dev/null <<EOF
...

Command with relative path doesn't work on my Ubuntu 20.04

Describe the bug
Run whatever the command with relative path returns errror cat: /usr/local/share/dropboxignore/VERSION.txt: No such file or directory

To Reproduce
Steps to reproduce the behavior:

  1. Just run with relative path

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Version v0.1.4-beta

Additional context
snap package

Installation script should not use wget as a default way to retrieve the dropboxingore

As you can see in the README.md file, there are more than one methods to perform the basic installation. The selected method is not respected by install.sh script because installation script uses wget to retrieve the dropboxignore shell script.

This should be changed:

  1. git clone the whole repo instead of retrieving bin/dropboxingore.sh script using wget.
  2. Remove cloned repo after the installation.
  3. Mention on README.md file that git should be installed in order to install the package using the basic installation way.

Skip Coverage Report pipeline step on macos-12

Describe the bug
For some reason, coverage report is taking too long in macos-12, given that is not necessary to generate the coverage report on both ubuntu-22 and macos-12, a condition should be added in order to skip Coverage Report pipeline step when using the macos-12 runner.

Expected behavior
Skip coverage report when using macos-12 runner

Screenshots
image

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.