Can I make an auto-increment thingie in Notepad++?

I’m trying to do this DAISY talking book thing, and instead of using Dolphin Publisher’s HTML thingie (which is hideous), I thought I’d play with doing it without the GUI, in notepad++, since I know basic HTML.

So I need to surround each sentence with

<span class="sentence" id="aiw_0002"> text of sentence </span> 

And of course that ID number needs to increment. Is there a magic way I can make a keystroke/macro that would do that? Basically paste </span><span class="sentence" id="something_xxxx"> where X goes up 1 each time?

My non-fancy way of doing it to copy the span statement (stopping before final-quote-mark-and-greater-than-sign), into Excel2016, doing a second one (0003) to establish the pattern, and do the click-drag thing to autopopulate. I just have to add in the last tip of the tag (if I don’t end with a numeral, there’s no auto-increment thingie).

I can’t install anything – government computer, things are pretty locked. And no one else in my area uses Dolphin or knows web stuff at all.

Script problem using Notepad ++.exe

Hi I prepared script copied from biostar handbook. The file is saved in Unix mode LF and saved as sh file. Here it is

Accession number for the reference genome

ACC=AF086833

SRA run number.

SRR=SRR1972739

How many reads to extract from the dataset.

N=10000

The reference genome in three different formats: GenBank, FASTA and GFF

GB=refs/$ ACC.gb FA=refs/$ ACC.fa GFF=refs/$ ACC.gff

Make the reference directory.

mkdir -p refs

Get a genbank file.

efetch -db nucleotide -format=gb -id=$ ACC > $ GB

Convert the GenBank file into GFF3.

cat $ GB | seqret -filter -feature -osformat gff3 > $ GFF

Convert the GenBank file into FASTA.

cat $ GB | seqret -filter -feature -osformat fasta > $ FA

Create an index of the FASTA file

samtools faidx $ FA

Obtain the dataset.

fastq-dump -X $ N –split-files $ SRR

Index reference with bwa.

bwa index $ FA

Index the reference with samtools.

samtools faidx $ FA

Shortcuts to read names

R1=$ {SRR}_1.fastq R2=$ {SRR}_2.fastq

Align with bwa mem.

bwa mem $ FA $ R1 $ R2 | samtools sort > $ SRR.bwa.bam

Index the BAM file generated with bwa.

samtools index $ SRR.bwa.bam

Index reference with bowtie2.

bowtie2-build $ FA $ FA

Align the same data with bowtie2.

bowtie2 -x $ FA -1 $ R1 -2 $ R2 | samtools sort > $ SRR.bowtie.bam

Index the BAM file produced with bowtie2.

samtools index $ SRR.bowtie.bam

These all commands work in ubuntu with copy and paste but when I tried to open the myscript.sh file through ubuntu using command cat myscript.sh I got error permission denied Then I used command line se) asifa86@DESKTOP-012ORAQ ~ $ conda activate bioinfo (bioinfo) asifa86@DESKTOP-012ORAQ ~ $ cat myscript.sh cat: myscript.sh: Permission denied (bioinfo) asifa86@DESKTOP-012ORAQ ~ $ sudo cat myscript.sh [sudo] password for asifa86:

Accession number for the reference genome

ACC=AF086833

SRA run number.

SRR=SRR1972739

How many reads to extract from the dataset.

N=10000

The reference genome in three different formats: GenBank, FASTA and GFF

GB=refs/$ ACC.gb FA=refs/$ ACC.fa GFF=refs/$ ACC.gff

Make the reference directory.

mkdir -p refs

Get a genbank file.

efetch -db nucleotide -format=gb -id=$ ACC > $ GB

Convert the GenBank file into GFF3.

cat $ GB | seqret -filter -feature -osformat gff3 > $ GFF

Convert the GenBank file into FASTA.

cat $ GB | seqret -filter -feature -osformat fasta > $ FA

Create an index of the FASTA file

samtools faidx $ FA

Obtain the dataset.

fastq-dump -X $ N –split-files $ SRR

Index reference with bwa.

bwa index $ FA

Index the reference with samtools.

samtools faidx $ FA

Shortcuts to read names

R1=$ {SRR}_1.fastq R2=$ {SRR}_2.fastq

Align with bwa mem.

bwa mem $ FA $ R1 $ R2 | samtools sort > $ SRR.bwa.bam

Index the BAM file generated with bwa.

samtools index $ SRR.bwa.bam

Index reference with bowtie2.

bowtie2-build $ FA $ FA

Align the same data with bowtie2.

bowtie2 -x $ FA -1 $ R1 -2 $ R2 | samtools sort > $ SRR.bowtie.bam

Index the BAM file produced with bowtie2.

samtools index $ SRR.bowtie.bam(bioinfo) asifa86@DESKTOP-012ORAQ ~ $ sudo bash myscript.sh myscript.sh: line 14: efetch: command not found myscript.sh: line 16: seqret: command not found myscript.sh: line 18: seqret: command not found myscript.sh: line 20: samtools: command not found myscript.sh: line 22: fastq-dump: command not found myscript.sh: line 24: bwa: command not found myscript.sh: line 26: samtools: command not found myscript.sh: line 31: bwa: command not found myscript.sh: line 31: samtools: command not found myscript.sh: line 33: samtools: command not found myscript.sh: line 35: bowtie2-build: command not found myscript.sh: line 37: bowtie2: command not found myscript.sh: line 37: samtools: command not found myscript.sh: line 39: samtools: command not found (bioinfo)

These commands work individually but with bash ubuntu script is not working. The problem is I have to complete the work if any body can guide me how to solve this situation I shall be thankful to you

Microsoft products Link to open in notepad not default

Is it possible to create a link in any Microsoft product (specifically OneNote, but I would assume that it would be the same for all Microsoft products) so that the item I want to open will open in a different program other than the default that Windows is set to open it in?

Example: A .bat file needs to be edited so in my OneNote documentation I say: “Please modify THIS file to add your blah blah blah”. I highlight “THIS” right click, Link… and if this was a txt file I would just put in the address “file:////[file path]”, but I want to open a .bat file, which, if I just put file://// would execute the .bat in a new command window. This is NOT what I want.

I have tried to create another .bat file with “start notepad %1” and the address in my OneNote “file:////[path]\start_with_notepad.bat some.bat” but OneNote doesnt like parameters like that, AND I get a warning “.bat files are unsafe, blah blah” when it tries to run. I don’t want warnings.

Notepad++ merging different lines with duplicate words

I have some tough work to do let me explain as best as i can. Merge the duplicate words on different lines.

Example:

i like 33 big black cars122

cars122 notfree

The result i want:

i like 33 big black cars122 cars122 notfree

there is like 200k lines and some don’t even have duplicate words, i want only duplicates to merge. I’ve been thinking about it for a week now and my brain is not powerful enough to come with solution

How can I get Notepad to show white margins on the top and sides, like in Windows Vista/7?

everyone! I recently got a Windows 10 computer that I’ve been customizing to visually resemble my previously-owned Windows Vista & 7 computers. I’m making great progress towards finalizing my customization, but I’ve hit a bit of a roadblock. I want Notepad to show those little white margins at the top & sides of the program window, like it used to do on Windows Vista & Windows 7. The problem is, I’ve tried numerous searches on Google about dealing with this issue, only to get hardly any results! Surely, there must be something that can be done to get those margins back–a registry tweak, a third-party program, anything at all! Can anyone please help me out?

Экранировать символы замена в Notepad++ Регулярные выражения

Требуется между кодом удалить текст и заменить на пусто. Это код между которым нужно удалить текст:

<content:encoded><![CDATA[ЗДЕСЬ ТЕКСТ УДАЛИТЬ]]></content:encoded> 

Применяю рег. выражение:

^<content:encoded><!\[CDATA\[(.*)\]\]></content:encoded>$    ^<content:encoded><!\[CDATA\[(.*?)\]\]></content:encoded>$   

Оба рег. выражения, ни чего не находит и соответственно не меняют. Подскажите что не так ?