Git Product home page Git Product logo

chadow's People

Contributors

skytreader avatar

Watchers

 avatar  avatar  avatar

chadow's Issues

Add a depth parameter when indexing

To bound the execution of the index function.

Ideally, if there are directories to traverse beyond the given depth, the logs will warn the user of these unreachable directories.

Version check should be smarter

We've decided to stick with SemVer protocols. The __version_check function should perform smarter checks based on SemVer: allow backwards-compatibility when possible, terminate (?) if not.

index test is flaky

Looks like equality test for DirectoryIndex is dependent on the order items are added rather than being treated like a set.

To debug, print out the indices compared in the test.

Using chadow outside the repo directory runs into problems with the version check

(chadow) chad@scheherazade:~$ python ~/.chadow/chadow.py createlib photos
Traceback (most recent call last):
  File "/home/chad/.chadow/chadow.py", line 24, in <module>
    VERSION: str = get_version()
  File "/home/chad/.chadow/chadow.py", line 12, in get_version
    with open("VERSION") as v:
FileNotFoundError: [Errno 2] No such file or directory: 'VERSION'
(chadow) chad@scheherazade:~$ ls ~/.chadow/
chadow.py  config.json  testlib
(chadow) chad@scheherazade:~$ cd kode/chadow/
(chadow) chad@scheherazade:chadow$ python ~/.chadow/chadow.py createlib photos
INFO: Writing config file: /home/chad/.chadow/config.json
INFO: Created new lib: photos
(chadow) chad@scheherazade:chadow$

Also check, how come this is not showing up in bats tests?

Have aliases for media paths

At least this is a user-friendliness improvement so users don't have to refer to full paths for commands.

Ultimately, this should be useful for when mount paths go awry (just refer to the alias!).

Create delete commands

deletelib, deletesector, deletemedia

Naturally, prompt the user for confirmation before doing this.

Handle the case where one path is a redundancy of another path

As things stand, we assume that paths within a sector contain unique subsets of the entire library, but taken together all sectors should, in the end, have the same files.

But within a sector, we may have two media which are intersecting or possibly even complete replicas.

Start Exit Codes from 100

Exit code 1 is already returned by the Python interpreter for an exception. Therefore, any exception we did not expect will return an error code similar to CONFIG_NOT_FOUND.

Make tests faster

Maybe by making a reset script so that the virtualenv does not have to be uninstalled/installed after/before each and every test.

Normalize media directory further

/media/chad/PHOTOS/ and /media/chad/PHOTOS are the same but the trailing slash makes a difference right now.

All commands that take in a path should normalize properly like this.

Tab autocompletion would be a great deal of help

chadow.py [TAB] should list the available commands (kind of similar to chadow.py --help).

chadow.py <command> [TAB] should list the existing values that could be used as arguments for the command.

A storage medium path should be manageable from different installations

Try:

createlib library
regsector library flash
regmedia library flash /media/usr/LIBRARY

When that media path was indexed in a different installation already, it becomes impossible to manage it in a different installation.

Solution: When "installing" chadow, generate a UUID in the config (with uuidgen) then save this UUID in the metadata of the media path.

Have a command to un-manage storage medium directories

This is a "nuclear option" in case the management of the directory has become so convoluted.

This is a destructive operation so user-confirmation is required.

First of all we must consider how this will affect the indices where the directory is listed.

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.