Scan Multiple Pages from linux HP kubuntu kde


you got a hp-photosmart  that can scan from the top -multiple pages-? ok there are 2 ways or use my service menu or just follow below here

SERVICE MENU FOR DOLPHIN

0e3d75614b8d4a8208385af6a59f93878ba5

service menu  DOWNLOAD IT HERE then untar and just run the installer with ./install

homepage of the project

MANUAL WAY

ok you can use this

hp-scan --adf -o /tmp/mymultipages.pdf

you NEED TO USE PDF TO USE THIS!!

and of course put your pages here

photosmart

if you have not an hp well you can try this shit

scanimage -b --batch-count=n --source ADF

In my hp photosmart it will not care of n parameter and it runs until it has pages with this last message

scanimage: sane_start: Document feeder out of documents

it will create out-n.pnm file which is a photo format that you can covert into a pdf if needed just with this

convert *.pnm outfile.pdf

Rotate pdf

Rotate of 90 degrees clockwise just pages 9 and 10

pdftk INPUT.pdf cat 9-10east output out4.pdf

rotate of 90 degrees anti-clockwise pages 1 to 11 less 9 and 10

pdftk INPUT.pdf cat 1-11~9-10west output out3.pdf

                Page Range Examples without Handles:
1-endeast – rotate entire document 90 degrees
5 11 20 – take single pages from input PDF
5-25oddwest – take odd pages in range, rotate 90 degrees
6-1 – reverse pages in range from input PDF
1-20~5-6 – equal to 1-4 7-20 or 1-20~5~6
~5 – all pages except page 5. Depending on your shell, you need to quote this because of the ~ at the beginning.

Merge pdf

pdftk  1.pdf 2.pdf 3.pdf  cat output finale.pdf

Convert Multiple pdf pages into images

it will create automatically several images jpg from your silly pdf file called hello-1.jpg hello-2.jpg etc etc

convert file.pdf hello.jpg

Git my own cheatsheet


#create a new local git repo
git clone https://github.com/nowardev/testagain.git
#create a new file 
echo hello> file1.txt
#add a file to a commit 
git add file1.txt
#do the first commit 
git commit -a -m 'my first commit'
#push the commit to master remote (github for example)
git push origin master
#create a new branch
git checkout -b mynewbranch
#do some work in some file
echo hellobranch >file2.txt
#add the file2.txt to a commit
git add file2.txt
#do the commit locally 
git commit -a -m 'my commit locally'
#push the commit to remote branch 
git push origin mynewbranch
#print the branch 
git branch
#back to master locally
git checkout master
#merge the branch wit master
git merge mynewbranch
#now push the merge on remote
git push origin master 
#delete the branch cuz you have merged it
git branch -d mynewbranch 
#delete the branch on remote 
git push origin --delete mynewbranch

kate Vim mode and back to normal


stuck on vi mode? just go on menu==>edit =>input mode=>normal

Now this LINK will teach you about vi mode on kate : i will just copy and paste for my own usage here :

Supported Commands

Supported normal/visual mode commands

a Enter Insert Mode and append
A Enter Insert Mode and append to EOL
i Enter Insert Mode
I Insert before first non-blank char in line
v Enter Visual Mode
V Enter Visual Line Mode
Enter Visual Block Mode
gv Re-select Visual
o Open new line under
O Open new line over
J Join lines
c Change
C Change to EOL
cc Change line
s Substitute char
S Substitute line
dd Delete line
d Delete
D Delete to EOL
x Delete char
X Delete char backward
gu Make lowercase
guu Make lowercase line
gU Make uppercase
gUU Make uppercase line
y Yank
yy Yank line
Y Yank to EOL
p Paste
P Paste before
r. Replace character
R Enter replace mode
: Switch to command line
/ Search
u Undo
Redo
U Redo
m. Set mark
>> Indent line
<< Unindent line
> Indent lines
< Unindent lines
Scroll page down
Scroll page down
Scroll page up
Scroll page up
Scroll half page up
Scroll half page down
zz Centre view on cursor
ga Print character code
. Repeat last change
== Align line
= Align lines
~ Change case
Add to number
Subtract from number
Go to prev jump
Go to next jump
h Switch to left view
Switch to left view
Switch to left view
j Switch to down view
Switch to down view
Switch to down view
k Switch to up view
Switch to up view
Switch to up view
l Switch to right view
Switch to right view
Switch to right view
w Switch to next view
Switch to next view
s Split horizontally
S Split horizontally
Split horizontally
v Split vertically
Split vertically
gt Switch to next tab
gT Switch to prev tab
gqq Format line
gq Format lines
q. / q Begin/ finish recording macro using the named macro register.

Supported motions

h Left
Left
Left
j Down
Down
Down to first non blank
k Up
Up
Up to first non blank
l Right
Right
Right
$ To EOL
To EOL
0 To 0 column
To 0 column
^ To first character of line
f. Find char
F. Find char backward
t. To char
T. To char backward
; Repeat last t. or f. command
, Repeat last t. or f. command
n Find next
N Find prev
gg To first line
G To last line
w Word forward
W WORD forward
b Word backward
B WORD backward
e To end of word
E To end of WORD
ge To end of prev word
gE To end of prev WORD
| To screen column
% To matching item
`[a-zA-Z><] To mark
‘[a-zA-Z><] To mark line
[[ To previous brace block start
]] To next brace block start
[] To previous brace block end
][ To next brace block end
* To next occurrence of word under cursor
# To prev occurrence of word under cursor
H To first line of window
M To middle line of window
L To last line of window
gj To next visual line
gk To prev visual line

Supported text objects

iw Inner word
aw A word
iW Inner WORD
aW A WORD
i” Inner double quote
a” A double quote
i’ Inner single quote
a’ A single quote
i` Inner back quote
a` A back quote
ib Inner paren
i) Inner paren
i( Inner paren
ab A paren
a) A paren
a( A paren
iB Inner curly bracket
o} Inner curly bracket
i{ Inner curly bracket
aB A curly bracket
a} A curly bracket
a{ A curly bracket
i< Inner inequality sign
i> Inner inequality sign
a< A inequality sign
a> A inequality sign
i[ Inner bracket
I] Inner bracket
a[ A bracket
a] A bracket
i, Inner comma
a, A comma

Supported insert mode commands

Unindent
Indent
Insert from below
Insert from above
Delete word
. Insert content of register
Switch to normal mode for one command
Increase number under cursor
Decrease number under cursor

The Comma Text Object

This is something that I have been missing in Vim. The comma text object makes it easy to modify parameter lists in C-like languages and other comma separated lists. It is basically the area between two commas or between a comma and a bracket. In the line shown in the illustration to the right, the three ranges this text object can span are highlighted in red.


Comma text object ranges. If the cursor is over, say, “arg2”, pressing c i , (“change inner comma”) would delete “double arg2” and place the cursor between the two commas in insert mode. A very convenient way to change a function’s parameters.

Emulated Vim Command Bar

Kate 4.11 introduced a hidden config option that make “/”, “?” and “:” bring up a new search/ command in place of the usual Kate Find/ Replace / Command-line bar. The bar is intended to intended to replicate many of the features of Vim’s command bar, and also to fix many of the issues with Kate Vim mode’s interaction with Kate’s Find/ Replace bar (interactive replace not working; incremental search not positioning the cursor correctly; not usable in mappings/ macros; etc).

The following shortcuts are provided by the emulated command bar; as with Vim, these can be remapped with cmap, cnoremap, etc:

. insert contents of register.
Insert word under the (document) cursor.
Invoke context-specific completion (see below)/ move back/ up in the completion list.
Move forward/ down in the completion list.
Kate Vim Extension. Auto-complete word from document.
Kate Vim Extension. In a sed-replace expression (i.e. one of the form s/find/replace/[g][c][i]), clear the “find” term and place the cursor there.
Kate Vim Extension. In a sed-replace expression (i.e. one of the form s/find/replace/[g][c][i]), clear the “replace” term and place the cursor there.
. Kate Vim Extension. As with ., insert the content of the named register, but escape it in such a way that when used with a search, we search for the literal content of the register; not the content of the register interpreted as a regex.

The “context-specific completion” is decided as follows:

  • In a search bar (“/” or “?”), auto-complete from search history (which includes searches initiated via “*” and “#”; searches done in sed-replace expressions; etc.)
  • In an empty command bar (“:”), auto-complete from command history (NB: auto-completion of command names is invoked automatically when you begin typing).
  • In a command-bar containing a sed-replace expression (e.g. “‘s/find/replace/gc”), if the cursor is positioned over “find”, auto-complete from the “search” history; if over the “replace”, auto-complete from the history of “replace” terms.

When executing a sed-replace expression in the command bar with the “c” flag (e.g. s/find/replace/gc), a Vim-style interactive search/replace expression will be initiated.

Some example usages of the emulated command bar, with GIF animations, are given in this blog. In 4.11, the emulated command bar can be enabled by setting the hidden config option “Vi Input Mode Emulate Command Bar” to “true”. in your katerc/ kwriterc/ kdeveloprc.

Missing Features

    As stated earlier, the goal of Kate’s VI Mode is not to support 100% of Vim’s features, however, there are some features which are sorely missed
  • Visual block mode – especially the ability to prepend/append text to the visual block selection.
  • Having ex commands available in other programs than the Kate application.
  • The search code needs improvement and the * and # commands should just be regular searches.

If you miss other features or want to help on the ones mentioned above, feel free to contact me or send patches! 🙂

  • t and made some formatting fixes