Hello after last upgrade of Fedora23 => Fedora24 I lost my knote note, I had only one note but full of precious notes I have an old version: /home/maumar/.kde/share/apps/knotes/notes.ics but it is full of \n is there a perl line for converting \n into cr? perl, python, sed ...whatsover...
This way I can get my note back; old, but better than nothing :) Thanks in advance -m
On Thu, 2016-07-21 at 13:44 +0200, Maurizio Marini wrote:
Hello after last upgrade of Fedora23 => Fedora24 I lost my knote note, I had only one note but full of precious notes I have an old version: /home/maumar/.kde/share/apps/knotes/notes.ics but it is full of \n is there a perl line for converting \n into cr? perl, python, sed ...whatsover...
This way I can get my note back; old, but better than nothing :) Thanks in advance
tr '\n' '\r' < input > output
poc
On Thu, Jul 21, 2016 at 01:20:37PM +0100, Patrick O'Callaghan wrote:
On Thu, 2016-07-21 at 13:44 +0200, Maurizio Marini wrote:
Hello after last upgrade of Fedora23 => Fedora24 I lost my knote note, I had only one note but full of precious notes I have an old version: /home/maumar/.kde/share/apps/knotes/notes.ics but it is full of \n is there a perl line for converting \n into cr? perl, python, sed ...whatsover...
This way I can get my note back; old, but better than nothing :) Thanks in advance
tr '\n' '\r' < input > output
That could result in double spaced "output" If so, try:
tr -d '\n' < input > output2
jon
On Thu, 2016-07-21 at 11:12 -0400, Jon LaBadie wrote:
On Thu, Jul 21, 2016 at 01:20:37PM +0100, Patrick O'Callaghan wrote:
On Thu, 2016-07-21 at 13:44 +0200, Maurizio Marini wrote:
Hello after last upgrade of Fedora23 => Fedora24 I lost my knote note, I had only one note but full of precious notes I have an old version: /home/maumar/.kde/share/apps/knotes/notes.ics but it is full of \n is there a perl line for converting \n into cr? perl, python, sed ...whatsover...
This way I can get my note back; old, but better than nothing :) Thanks in advance
tr '\n' '\r' < input > output
That could result in double spaced "output" If so, try:
tr -d '\n' < input > output2
The OP asked about converting NL to CR, not CRNL to CR. I've no idea if that's what he meant of course.
poc
Hello Patrick
If you have fedora kde, I think you have a notes.ics somewhere
before kde 4.3, it was here ~/.kde/share/apps/knotes/notes.ics
It is full of \n like this excerpt
" <mime-type>\n</IfModule>\n\n\n\n\n\n\n\npush "route 10.0.0.0"
I wuold easily convert \n in real carriage return to have a text file not cluttered with \n
thnx -m
On 07/21/2016 12:59 PM, Maurizio Marini wrote:
Hello Patrick
If you have fedora kde, I think you have a notes.ics somewhere
before kde 4.3, it was here ~/.kde/share/apps/knotes/notes.ics
It is full of \n like this excerpt
" <mime-type>\n</IfModule>\n\n\n\n\n\n\n\npush "route 10.0.0.0"
I wuold easily convert \n in real carriage return to have a text file not cluttered with \n
The standard end-of-line marker in Linux/Unix is a newline or "\n" and any Linux text editor would have no problem with it.
Windows' the end-of-line marker is a CRLF or "\r\n" and there are tools to convert it, such as "unix2dos" (part of the dos2unix RPM). ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - ----------------------------------------------------------------------
Hello Rick
The standard end-of-line marker in Linux/Unix is a newline or "\n" and any Linux text editor would have no problem with it.
that are not newline chr(10) that are chr(92) followed by chr(110)
hexdump -C notes.ics
0000a910 65 63 20 72 65 77 72 69 74 65 20 73 73 6c 20 61 |ec rewrite ssl a| 0000a920 63 74 69 6f 6e 73 20 69 6e 63 6c 75 64 65 5c 6e |ctions include\n| 0000a930 5c 6e 5c 6e 5c 6e 5c 6e 20 20 20 5c 6e 20 20 20 |\n\n\n\n \n | 0000a940 5c 6e 20 20 20 5c 6e 20 20 20 5c 6e 20 20 20 5c |\n \n \n | 0000a950 6e 20 20 20 0d 0a 20 5c 6e 0d 0a 53 55 4d 4d 41 |n .. \n..SUMMA|
as you can see, that are sequence of 5c 6e 5c 6e 5c 6e 5c 6e but in last line you find 6e 20 20 20 0d 0a
what I need is something like: search 0x5c followed by 0x6e replace them with 0x10
many thnx
-m
forgive me..
but i came across a perl article that was created for helping to solve this issue.. you're not the only one..
posting it here if you haven't seen it as it might shed light on the issue. been way too long for my perl fu to be of any use.
http://techblog.babyl.ca/entry/knotes-migration
use 5.20.0; use experimental 'postderef'; use warnings; use Data::ICal;use Path::Tiny;use Email::Simple;
path( $ENV{HOME}, '.local/share/notes/new' ) ->child( $_->property('uid')->[0]->value ) ->spew( Email::Simple->create( header => [ From => 'old kde ', Subject => $_->property('summary')->[0]->value, ], body => $_->property('description')->[0]->value )->as_string ) for Data::ICal->new( # Data::ICal doesn't like the PRIORITY property data => path( $ENV{HOME}, '.kde/share/apps/knotes/notes.ics') ->slurp =~ s/^PRIORITY:\d+\r\n//mr )->entries->@*;
On Thu, Jul 21, 2016 at 5:58 PM, Maurizio Marini maumar@datalogica.com wrote:
Hello Rick
The standard end-of-line marker in Linux/Unix is a newline or "\n" and any Linux text editor would have no problem with it.
that are not newline chr(10) that are chr(92) followed by chr(110)
hexdump -C notes.ics
0000a910 65 63 20 72 65 77 72 69 74 65 20 73 73 6c 20 61 |ec rewrite ssl a| 0000a920 63 74 69 6f 6e 73 20 69 6e 63 6c 75 64 65 5c 6e |ctions include\n| 0000a930 5c 6e 5c 6e 5c 6e 5c 6e 20 20 20 5c 6e 20 20 20 |\n\n\n\n \n | 0000a940 5c 6e 20 20 20 5c 6e 20 20 20 5c 6e 20 20 20 5c |\n \n \n | 0000a950 6e 20 20 20 0d 0a 20 5c 6e 0d 0a 53 55 4d 4d 41 |n .. \n..SUMMA|
as you can see, that are sequence of 5c 6e 5c 6e 5c 6e 5c 6e but in last line you find 6e 20 20 20 0d 0a
what I need is something like: search 0x5c followed by 0x6e replace them with 0x10
many thnx
-m
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 07/21/2016 03:37 PM, bruce wrote:
forgive me..
but i came across a perl article that was created for helping to solve this issue.. you're not the only one..
posting it here if you haven't seen it as it might shed light on the issue. been way too long for my perl fu to be of any use.
http://techblog.babyl.ca/entry/knotes-migration
|use 5.20.0; use experimental 'postderef'; use warnings; use Data::ICal; use Path::Tiny; use Email::Simple; path( $ENV{HOME}, '.local/share/notes/new' ) ->child( $_->property('uid')->[0]->value ) ->spew( Email::Simple->create( header => [ From => 'old kde ', Subject => $_->property('summary')->[0]->value, ], body => $_->property('description')->[0]->value )->as_string ) for Data::ICal->new( # Data::ICal doesn't like the PRIORITY property data => path( $ENV{HOME}, '.kde/share/apps/knotes/notes.ics') ->slurp =~ s/^PRIORITY:\d+\r\n//mr )->entries->@*;|
On Thu, Jul 21, 2016 at 5:58 PM, Maurizio Marini <maumar@datalogica.com mailto:maumar@datalogica.com> wrote:
Hello Rick > The standard end-of-line marker in Linux/Unix is a newline or "\n" and > any Linux text editor would have no problem with it. that are not newline chr(10) that are chr(92) followed by chr(110) hexdump -C notes.ics 0000a910 65 63 20 72 65 77 72 69 74 65 20 73 73 6c 20 61 |ec rewrite ssl a| 0000a920 63 74 69 6f 6e 73 20 69 6e 63 6c 75 64 65 5c 6e |ctions include\n| 0000a930 5c 6e 5c 6e 5c 6e 5c 6e 20 20 20 5c 6e 20 20 20 |\n\n\n\n \n | 0000a940 5c 6e 20 20 20 5c 6e 20 20 20 5c 6e 20 20 20 5c |\n \n \n \| 0000a950 6e 20 20 20 0d 0a 20 5c 6e 0d 0a 53 55 4d 4d 41 |n .. \n..SUMMA| as you can see, that are sequence of 5c 6e 5c 6e 5c 6e 5c 6e but in last line you find 6e 20 20 20 0d 0a what I need is something like: search 0x5c followed by 0x6e replace them with 0x10
Oh! Literal backslashes and literal "ens"! What the devil?
Well, you could edit it with "vi" and use
:g/\n/s//(CTRL-V)(ENTER)/g ^^^^^^^^^^^^^^^
For the underlined part, actually press "CTRL-V", and then the ENTER key (it'll echo like "^M"). The "CTRL-V" means "interpret the next key literally--don't act on it like a command".
That is a global find and replace that will look for the two character sequence "backslash-en" and replace each occurance of it with a single newline character. This text:
each\nof\nthese\nshould\nbe\non\na\nseparate\nline\n
would look like:
each of these should be on a separate line
using that command. I think that's what you want. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - Time: Nature's way of keeping everything from happening at once. - ----------------------------------------------------------------------
Well, you could edit it with "vi" and use
:g/\n/s//(CTRL-V)(ENTER)/g ^^^^^^^^^^^^^^^ using that command. I think that's what you want.
exactly that one :)
http://techblog.babyl.ca/entry/knotes-migration is very interesting too many thnx :)
for who is having my issue, I confirm that this one:
solved entirely my issue and that after last upgrades the ics was here ~/.local/share/akonadi/file_db_data/32/32_r0
where 32 is only the # number of note, so change it to what you have into ~/.local/share/akonadi/file_db_data/
very interesting, I found there all the release of the notes, old stuff that can come back useful one day
as always, you guys are very helpful and fantastic :) this community is great :)
-m
Hey.
Good to know the link was helpful. For others with this issue, could you detail the steps you used to resolve the prob?
Was it running the perl script? Was it simply looking for the "dir" with the content, and doing a physical change of a few files to match the ID of a given file?
As you've seen, some issue are frustrating, even though the soln is simple once you know it. So, being able to find some soln to a prob that someone has solved is always cool!
Good Luck/Thanks!
On Fri, Jul 22, 2016 at 4:10 AM, Maurizio Marini maumar@datalogica.com wrote:
for who is having my issue, I confirm that this one:
solved entirely my issue and that after last upgrades the ics was here ~/.local/share/akonadi/file_db_data/32/32_r0
where 32 is only the # number of note, so change it to what you have into ~/.local/share/akonadi/file_db_data/
very interesting, I found there all the release of the notes, old stuff that can come back useful one day
as always, you guys are very helpful and fantastic :) this community is great :)
-m
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On Thu, 2016-07-21 at 21:59 +0200, Maurizio Marini wrote:
If you have fedora kde, I think you have a notes.ics somewhere
I use KDE but don't use any of the PIM apps so I don't have that file.
before kde 4.3, it was here ~/.kde/share/apps/knotes/notes.ics
It is full of \n like this excerpt
" <mime-type>\n</IfModule>\n\n\n\n\n\n\n\npush "route 10.0.0.0"
As Rick has said, it wasn't clear you meant a literal \ n (i.e. a '' and an 'n') rather than the '\n' (ASCII 012) which is the standard Unix/Linux end-of-line character, but so be it.
poc
Allegedly, on or about 22 July 2016, Patrick O'Callaghan sent:
As Rick has said, it wasn't clear you meant a literal \ n (i.e. a '' and an 'n') rather than the '\n' (ASCII 012) which is the standard Unix/Linux end-of-line character, but so be it.
I had wondered about the original poster, too. But... If you're going to do representations of Control + N, etc., for those low-numbered ASCII control codes, then traditionally its with a carat symbol: ^N
e.g. As displayed by applications giving you an interpretation of a file contents, such as some hexdump programs. And on-line terminals over modems, etc.
The slash N representation is more a case of Linux code escaping, entered using the terminal into some type of editor, more than what's normally found *in* a text file. Not that /that/ stops any editor from using such a sequence, if it's also going to be used to interpret the file when it shows it back to you, particularly file meant to be special rather than plain text.
On Thu, 2016-07-21 at 21:59 +0200, Maurizio Marini wrote:
If you have fedora kde, I think you have a notes.ics somewhere
I use KDE but don't use any of the PIM apps so I don't have that file.
before kde 4.3, it was here ~/.kde/share/apps/knotes/notes.ics
It is full of \n like this excerpt
" <mime-type>\n</IfModule>\n\n\n\n\n\n\n\npush "route 10.0.0.0"
As Rick has said, it wasn't clear you meant a literal \ n (i.e. a '' and an 'n') rather than the '\n' (ASCII 012) which is the standard Unix/Linux end-of-line character, but so be it.
poc