Send Netdot-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-users
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-users digest..."
Today's Topics:
1. Re: Import ipblock information with comments ("info" field on
ipblock table) (Nico)
----------------------------------------------------------------------
Message: 1
Date: Tue, 5 Aug 2014 08:47:52 +0200
From: Nico <[email protected]>
Subject: Re: [Netdot-users] Import ipblock information with comments
("info" field on ipblock table)
To: "[email protected]" <[email protected]>
Message-ID:
<cakxqfmsaqc_zgronybnys8ayg9uagezrfceqiap5i55cikw...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hello again,
I've opted to substitute (before importing) commas with ### and my new
line characters with @@@ (strings that are not likely part of any
licit comment or description for an ip) after the importation i run on
the mysql db:
update ipblock SET info = REPLACE(info, '###',',');
update ipblock SET info = REPLACE(info, '@@@',CHAR(13 using utf8));
Dirty but works, and I don't plan on doing more big importations after
this one. And i can use commas on the description field.
Thanks!
Nico
2014-08-04 14:35 GMT+02:00 Patrick Landry <[email protected]>:
>
>
> ________________________________
>
> Hello,
>
> I wish to import into Netdot a lot of IP information, but not only
> with description but also the info field (shown as "comment" on the
> web interface).
> So far, i've modified the import/import_ip_bulk.pl file adding another
> field wich will contain the info field, and it works.
> But i don't know if there is an easy way to enter newline and ,
> (comma) characters into this field, i've tried with \n and \, with no
> luck :-/.
>
>
> When I wrote my perl importer I was able to get line breaks in the info
> field by embedding a carriage return character (ASCII 13, HEX 0D) in the
> literal string.
>
> $rrdata->{'info'} = $rrdata->{'info'} . '^MDEPT: '
>
> The '^M' you see there should be a single character. Unfortunately that is
> not returned to you when you subsequently fetch that field.
>
> --
> patrick
>
> Patrick Landry
> University of Louisiana at Lafayette
> Director, University Computer Support Services
>
--
Nico
------------------------------
_______________________________________________
Netdot-users mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-users
End of Netdot-users Digest, Vol 69, Issue 2
*******************************************