Clipman (1.6.5) (Actions) How do you return the REGEX results from 'Clipman Actions' back to the clipboard via a 'Clipman Command'?
I can't get this to work so, I'm not sure if this posting is:
- a) a bug report
- b) a programming error (I'm not doing it correctly, so it won't work)
- c) a feature request
- Distro: Linux Mint 20.3 Una
- Desktop: Xfce 4.16.0
- Gtk 3.24.20
- Kernel: 5.4.0-169-generic x86_64 bits
- Clipman 1.6.5
I have various text manipulation needs:
EXAMPLES: (I can't get any of these to work)
MOVE The: 'The selected text' } 'selected text, The'
CONVERT
The National School Computer Literacy Project
into
National School Computer Literacy Project, The
defined Clipman Action
Action:
Name: MOVE
Pattern: The (.+)
Command:
Name: , The
Command: xclip -selection clipboard "\1, The"
The National Schools Computer Literacy Project
(text highlighted (+CTRL key), then (, The) selected from Clipmans pop-up menu)
which should write
National Schools Computer Literacy Project, The
into Clipman's history, but it fails, nothing happens, nothing added to Clipman's history and no error
NOTE: xclip -selection clipboard "test string" (from terminal or a bash script), successfully places "test string" into Clipman's history
REPLACE SPC with UNDERSCORE in selected text
defined Clipman Action
Action:
Name: REPLACE
Pattern: (.+)
Command:
Name: SPC } Underscore
Command: printf "\0" | sed "s/ /_/g"| xclip -selection clipboard
The National School Computer Literacy Project
into
The_National_School_Computer_Literacy_Project
REPLACE UNDERSCORE with SPC: selected text } selected_text
defined Clipman Action
Action:
Name: REPLACE
Pattern: (.+)
Command:
Name: Underscore } SPC
Command: printf "\0" | sed "s/_/ /g"| xclip -selection clipboard
The_National_School_Computer_Literacy_Project
into
The National School Computer Literacy Project
ADD () selected text } (selected text)
defined Clipman Action
Action:
Name: REPLACE
Pattern: (.+)
Command:
Name: (selected text)
Command: xclip -selection clipboard "(\0)"
The National School Computer Literacy Project
into
(The National School Computer Literacy Project)
REMOVE () (selected text) } selected text
defined Clipman Action
Action:
Name: REMOVE
Pattern: \((.+)\)
Command:
Name: selected text
Command: xclip -selection clipboard "\1"
(The National School Computer Literacy Project)
into
The National School Computer Literacy Project
ADD , The: selected text } selected text, The
defined Clipman Action
Action:
Name: ADD
Pattern: (.+)
Command:
Name: , The
Command: xclip -selection clipboard "\0, The"
National School Computer Literacy Project
into
National School Computer Literacy Project, The
ADD The: selected text } The selected text
defined Clipman Action
Action:
Name: ADD
Pattern: (.+)
Command:
Name: The
Command: xclip -selection clipboard "The \0"
National School Computer Literacy Project
into
The National School Computer Literacy Project