#punch
85 messages · Page 1 of 1 (latest)
thanks, merged it. I added a small change to allow files to be created without -t flag
Can you remove the help file
mhm
I have one last implementation in mind which involves making the temporary file system I mentioned earlier
Ok. the trash right?
yes
Got it.
Also @dusty mortar in case it helps the general idea I was going to make was to have a file which stored the last date when it was cleared and if the difference of today and that day i larger than some amount then clear it.
What is going to trigger the clearing
Got it
so daemon or when punch is run?
the daemon would increase complexity by a bit and also increase resource consumption
when punch is run
k
also should we also add a feature to restore the files.
yeah I was thinking of some sort of punch undo which would undo the last trash or an easier option punch --drag <TARGET> which would retrieve files from the before mentioned trash directory
yeah we should maintain an internal database with when it was added and where it is from.
sounds good
My approach to moving the file is recreating them on the ~/.ptrash directory. Doing that will cause original date created to change.
Is there any better idea?
this should be done via the build rather than the code, so when its building it creates ~/.ptrash which can be accessed later
let me add that in the build.sh
That makes sense.
But I am referring to the approach of moving the files
we need to move the files/folder to that directory
There is no move API, we can use copy, create(for directories) and remove to achieve the same functionality
this, copy then deleting should be the way to go
gracias
implemented the internal database with rusqlite, called when trash is called(didnt implement actual trash yet, just placeholder flag)
created a pull request for trashing files, it is not yet include the tracking feature that enables auto delete or restore.
Basically just trash
wow, great timing
lol
dw basically got that covered👍
Once you are done, I think we can try use anyhow and thiserror to manage error handling
i think we should probably use anyhow instead as thiserror is more for libraries
Should we nixify it?
note: /usr/bin/ld: cannot find -lsqlite3: No such file or directory
collect2: error: ld returned 1 exit status
since your pull request i am getting the above error
That's on me, I use sqlite for the internal database, seems to be a linker issue meaning not downloaded on your system. I should add that in the build script
For now try sudo apt-get install libsqlite3-dev
yeah it works now
I was busy today so I should be able get the undo command working later
What do you mean by this
Hey all, what's up
Hey
so far so good on the undo function
Hello all, I'm quite new to Rust but I would like to contribute in some way. I thought a nice feature would be renaming and/or creating copies of existing files. I'm happy to implement these features over the coming days to get some more experience with the language if that's ok. Also, I think "spicy_lemonade" should maybe create another discord dedicated to this project
Hellloo, that's a great idea puch -rename can't believe I didn't think of that, also I don't really feel like creating a separate server for this for this one reason being it's a bit isolated meaning people can't just hop in and see how the projects going/what it is
Fair enough, I'm guessing threads exist forever? I don't know much about discord threads/how long they exist so I was just thinking about that. I'll start working on the rename feature when I get up tomorrow (it's 1 am here)
Also, just wanted to let you know about a potential issue (it might just be a me problem but whatever), I'm on windows and when I wanted to use punch from cmd I had to manually add the punch path to my system paths in order to use it from there. I have no idea how to append to the "path" variable from bash/rust on windows and also don't know if anyone else had this problem but if you did, let me know
ah, I made this with linux in mind since my main computer runs linux. but Ill try to make a separate build script for windows
To be honest I'm probably in the minority of windows users who want to manage files from the command line haha
good point, threads last as long as they are active (there for 24 hours) I guess i should create a server lol
Could always make a new server for in-depth development talk and keep this thread for bumping and meeting new users/contributers
I mean seeing as some dependencies are required i think it would be a good idea to make a nix build script
nvr mind there are a lot of permission problems with using nix as a build script
i am going to get started on punch -ren now
Can it be fixed with a simple sudo command?
i mean during runtime to get access to our files
ah
@storm aurora can you look into rename_file function in https://github.com/muppi090909/punch/blob/main/src/main.rs I am seeing a very unusual bug which i am not able to fix i have added various dbg!a for ease
alr
ah I see the prob
to = to.join(PathBuf::try_from(args[0].clone()).unwrap());
its meant to be args[1]
should be good now
@storm aurora i have opened a pull request for the rename feature
Alright, I'll get it when I wake up it's 2 am here
lol its 11AM here
Good work done from you guys, For windows you can use git bash to test, It's what I used to test the feature I worked on.
Bump
Filesystem manager, a combination of mkdir, touch ,cat, and rm but with easy to remember commands. More features in the future such as file tracking and history.
Hi i am looking to contribute to this project. Could you point me to some good first issues or some features to implement. @storm aurora
sure, I was thinking of implementing a temporary trash can so that when you type punch -t foo.txt it sends the file into the custom trash directory rather than just deleting. which would allow the user to undo any accidental mistakes :)
I also think we could rewrite it in clap
although I havent used clap before but yes from what im seeing,it looks like it would be beneficial rewriting the parsing in it
I began doing just that
Hey @storm aurora I am interested, what can I do?