tq - a task queue specialized to drive
I want drive
to
- Send Telegram notification after
push
finished - Remap
delete
totrash
so I won't accidentally destroy files - Queue my
push
andpull
commands and do them one-by-one
None of those should be made into drive
, so here the wrapper comes!
Important note: Please treat it as unstable before I give it a version number. I've accidentally deleted my files more than one time, thankfully they are either in Google drive's trash can, or they are not important (Yes some of them are wiped out on my disk, before I push them to Google drive.)
- http://vicerveza.homeunix.net/~viric/soft/ts/
- It seems a good replacement of this project; Have a look to it before using mine.
- Maybe I'll change
dpush
as a wrapper to it if it's useful to me.
WIP
Assume this utility is called by / soft-linked to / aliased to d
,
d queue
- start a task queue for furtherpushq
/pullq
d queue
- same asd queue start
d queue dump
- dump queue content in an easy-to-read formatd queue dumpjson
- dump queue content in JSON formatd queue load
- load queue content from stdin before starting queued queue quit
- put a "stop" task into queued pushq
- put task to queue and exitd pullq
- put task to queue and exit- [broken]
cat | d pull
- collect file names from stdin, every line is treated as a task - [broken]
cat | d pullq
- collect file names from stdin, every line is treated as a task d index
- create two pure-text index files for remote and local contentd rename A B
- renameA
toB
,B
will be processed bybasename()
- Note: the usage and meaning of this command is different to
drive index
- Note: the usage and meaning of this command is different to
- [TODO]
d help
For push
/ pull
/ pushq
/ pullq
/ rename
, absolute paths will be
translated to relative path from the google drive root folder.
All other commands are directly passed to drive
.
.---------------------------------------------------------------------------. | | | @---. | | | | | .----------. | | | cli_main | | | '----------' .--------. | | | | models | | | |------------. .----------------. '--------' | | | | | telegram_queue | .---------------. | | .--------. .-------. '----------------' | lib_drive_cmd | | | | cli_tq | | cli_d | | '---------------' | | '--------' '-------' .------------. .--------------. | | | | | task_queue | | lib_telegram | | | |------------' '------------' '--------------' | | | tq_cmd | tq_cmd .------------. | | | | | lib_logger | | | .-------------. .-------------. '------------' | | | wire_client | | wire_server | .-----------. | | '-------------' '-------------' | lib_utils | | | | | '-----------' | | '---------------------------' .------------. | | local TCP socket | lib_config | | | .----------. '------------' | | | lib_wire | | | '----------' | '---------------------------------------------------------------------------'
On the server side, task_queue runs in the main thread, and telegram_queue and wire_server are in daemon threads.
models contains class definition.