Importing mbox files into hyperkitty since date
What is the syntax for the data in the --since argument to hyperkitty_import>
--since SINCE
SINCE is not very informative. :-)
Guessing, using '1/1/1970' does not seem to achieve anything, and gives no error.
Well, reading the hyperkitty command source code, looks like it uses dateutil.parser, which shoudl read pretty much any date format (?).
This is what happens:
$ django-admin hyperkitty_import -v 2 -l jackrail@list.jackrail.org --since "2010-01-01 00:00Z" /tmp/jackrail@list.jackrail.org-2019-07.mbox
CommandError: No such file: 00:00Z
Regardless of whether Z for UTC is present or not.
Alrighty. It only accepts the YYYY-MM-DD. Not HH:MM or TZ.
I'd submit that as a bit of feedback to the developer.
Andrew
On 6/20/19 3:08 AM, andrew.bernard@gmail.com wrote:
Well, reading the hyperkitty command source code, looks like it uses dateutil.parser, which shoudl read pretty much any date format (?).
This is what happens:
$ django-admin hyperkitty_import -v 2 -l jackrail@list.jackrail.org --since "2010-01-01 00:00Z" /tmp/jackrail@list.jackrail.org-2019-07.mbox
CommandError: No such file: 00:00Z
This appears to be a bug in Django's BaseCommand class which somehow separates '--since "2010-01-01 00:00Z"' into '--since 2010-01-01' and '00:00Z' despite the quotes.
As a workaround, you can use '--since "2010-01-01/00:00Z"' which doesn't contain the problematic whitespace and which is acceptable to dateutil.parser.parse().
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
andrew.bernard@gmail.com
-
Mark Sapiro