novoid / move2archive Goto Github PK
View Code? Open in Web Editor NEWManaging event-related files in a folder hierarchy like "<ARCHIVE>/2013/2013-05-17 Event name/"
License: GNU General Public License v3.0
Managing event-related files in a folder hierarchy like "<ARCHIVE>/2013/2013-05-17 Event name/"
License: GNU General Public License v3.0
For stamps by date2name
about day and time, the current implementation of "common substring" can tap into this stamp. Actually -- extending the script's internal documentation, this already takes place with two files 2023-06-11T12.26.18 Wedding of Paula and John - Guests arriving.jpg
and 2023-06-11T13.05.48 Wedding of Paula and John - Ceremony starts.jpg
which share the last digit of the seconds; instead of the anticipated pattern of Wedding of Paula and John
, the implementation suggests 8 Wedding of Paula and John
.
Tests so far did not yield the same error for files where date2name
assigned only the day alone.
The attached log reports the findings for the current version of move2archive
by 2023-06-11 in an instance of Linux Debian 13/trixie (branch testing) with Python 3.11.4.
Using the current implementation by 2023-06-11, the move of an individual file into the archive directory is dysfunctional. It however is possible (from the CLI) to deposit a stack of multiple files at once into an archive folder.
Again, the log attached below documents an instance of Linux Debian 13/trixie (branch testing) with Python 3.11.4 as provided by the repositories of Debian.
Just my two cents from a perspective of a guy that somewhat knows working in command-line, but it's not my primary area of computer use and file browsing. Also using scripts is not my forte.
m2a --help
to see where do you put source directory. But help only mentions target directory. A couple of head scratches later I have a moment of revelation! It probably requires a folder specified right after m2a
.My first attempt - failed:
m2a . --archivepath="G:\My Drive\archive"
ERROR item "." has got no valid datestamp! Can not process this item.
My second attempt - failed:
m2a *.jpg --archivepath="G:\My Drive\archive"
ERROR File/Folder "*.jpg" does not exist! Aborting.
Aha! Maybe it doesn't require it at all! Maybe it takes the current path as the source.
Nope - failed:
m2a
ERROR
The archive directory "C:\Users\USER\archive" is not a directory!
Wait, so do I have to create the archive
folder myself? Let's try that and see what changes.
m2a
m2a: error: Please add at least one file name as argument
Ahhh, but at least archive
is now created.
Ok, it works by giving it specific files. Okay. Let's try:
m2a *png --archivepath="C:\archive"
ERROR File/Folder "*png" does not exist! Aborting.
Still nope!
I checked that at least one PNG file exists in C:\Users\USER\Downloads\
namely: 2022-12-14T14.42.36 pan tadeusz oversimplified -- book ai.png
.
I try to invoke:
m2a *png --archivepath="C:\archive"
ERROR File/Folder "*png" does not exist! Aborting.
Fuuuu...., well I surrender. Just as a test - let's give it one specific file and cross my fingers.
m2a "C:\Users\USER\Downloads>m2a "2022-12-14T14.42.36 pan tadeusz oversimplified -- book ai.png" --archivepath="C:\archive"
ERROR Folder for year "C:\archive\2022" does not exist! Aborting.
Oh my god...
Similar to a physical archive, I had to re-use some data of yesterday already stashed by move2archive and intended to clear the space again (now) by move2archvie. While this didn't work for that there already is a file of same name in the current working directory and the archive, there were two other files so far never deposit into the archive:
Asking what if: what if move2archive's action would include a try/escape clause to the effect:
Maybe to check files to contain the same content based on a hash is safer than a check based on file name if file tags assigned and annotations (appendfilename) of different days differ.
Short backstory, I saw your suggestion of the organize tool. It seems pretty powerful, but one side effect was that I ended up with a lot of files in a format like YYYY-M-D, where the leading 0 is dropped for month or day.
It doesn't seem to effect sorting of the files in any way so I don't really mind.
I changed the regexp in my local move2arch like this to allow it to parse those formats too:
\d\d\d\d-[01]\d-[0123]\d ->
\d\d\d\d-[01]?\d-[0123]?\d
I would like to get the opportunity to do m2a --batchmode foo.txt
with the default settings so that I get the same result than m2a foo.txt
+ interactively accept defaults per Return
.
So far, I need to specify directories in batch-mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.