Code Monkey home page Code Monkey logo

ctrl's People

Watchers

 avatar  avatar  avatar

ctrl's Issues

The sqlite package seems to be obsolete

The sqlite package displays a bunch of deprecation warnings, it might require an update :

make: Leaving directory '/home/runner/.dub/packages/d2sqlite3-0.19.1/d2sqlite3'
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1181,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1205,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1235,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1268,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(166,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(179,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(192,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(205,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(220,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(233,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(247,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(278,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(294,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(381,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(416,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(433,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
ctrl 0.0.1+commit.2.g49d6e5f: building configuration "ctrl-test-library"...
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1181,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1205,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1235,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/database.d(1268,13): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(166,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(179,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(192,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(205,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(220,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(233,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(247,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(278,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(294,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(381,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(416,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
../../../.dub/packages/d2sqlite3-0.19.1/d2sqlite3/source/d2sqlite3/statement.d(433,5): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.

Add "cut" support

The tool only supports copying files, but it doesn't support moving them.

Set up releases

It's still unclear how this should be handled :

  • Create releases manually
  • Create releases when a commit is pushed into master

The problem with the second approach is that I want to avoid publishing a release when technical or minor changes are pushed to master. Using tags seems to be the way to go, so I'll look into implementing this semi automatic approach :

Rethink the executable names

The current executable file names,ctrlc and ctrlp, sound confusing because people would expect to find an executable called pastard, which is the name of the project. As such, it would make more sense to create a pastard executable that acts as a front end for the other two. Ideally, I'd like pastard to contain the main function and parse input arguments, then call the ctrlc, ctrlp and ctrlx libraries as needed.

Clipboard file can not be created

Running pastard after a fresh install results in the following error :

std.exception.ErrnoException@std/stdio.d(421): Cannot open file `/home/hassan/.config/pastard/.clipboard' in mode `w' (No such file or directory)
----------------
??:? @safe void std.exception.bailOut!(std.exception.ErrnoException).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x56524b93cf0d]
??:? @safe shared(core.stdc.stdio._IO_FILE)* std.exception.enforce!(std.exception.ErrnoException).enforce!(shared(core.stdc.stdio._IO_FILE)*).enforce(shared(core.stdc.stdio._IO_FILE)*, lazy const(char)[], immutable(char)[], ulong) [0x56524b96a445]
??:? ref @safe std.stdio.File std.stdio.File.__ctor(immutable(char)[], scope const(char)[]) [0x56524b94c220]
??:? void utils.Clipboard.init() [0x56524b93ebf8]
??:? ref utils.Clipboard utils.Clipboard.__ctor(immutable(char)[]) [0x56524b93eab3]
??:? _Dmain [0x56524b93736e]

Clipboard::init() does attempt to create the file if it does not exist, but it neglects to create the directories leading to it :

    void init()
    {
        if(!path.exists)
        {
            File(path, "w");
        }
    }

Copying a file that doesn't exist

Attempting to copy a file that doesn't exist won't cause an error until it is pasted. Instead, an error should be displayed as soon as ctrlc file_that_does_not_exist is ran.

Add option to copy multiple files in one call

A lot of times I copy multiple files from a given directory. Ideally I would like pastard to do this with some sort of glob pattern, but for now, I'd be more comfortable leaving that to other UNIX tools :

ls *.d | ctrlc

Or to avoid breaking changes :

ls *.d | xargs ctrlc

Add some sort of reporting

I noticed that when pasting files, ctrl doesn't display anything to confirm whether or not they were pasted successfully. It should at least display the files in question, and if there are errors, notify the user that the relevant files are still present in the clipboard.

Something like this :

$ pwd
/home/ctrl
$ ctrl -C foo bar
$ cd /tmp
$ ls
a
b
bar
$ ctrl -V
Copying /home/ctrl/foo to /tmp/foo [OK]
Copying /home/ctrl/bar to /tmp/bar [Error : bar already exists in this directory]

Warning: /tmp/bar is still present in the clipboard
$ ctrl -l
/home/ctrl/bar

ctrl doesn't support folders

image

It occurred to me last night that there's no way for ctrl to handle folders. It's going to be a whole can of worms since it introduces many questions.

  • Should it queue the folder path or all the files inside it ?
  • Should it handle recursion ?
  • What should it do in case there's an error ?

And other fun things to ask myself.

Measure test coverage

The code has tests but I have no idea how much coverage there is, it could be a useful metric. Bonus points if it's displayed as a badge on the readme file.

Dub-ify the project

The project has its own custom folder structure. It should be made compatible with dub in order to make it easy to build and get dependencies.

The test coverage is suspiciously high

Codecov.io is reporting a coverage of 98%, which is too good to be true

image

This should be investigated. I'll try commenting out some of the tests to see if the coverage changes.

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.