Glenn,

Have you had a chance to try the revised wee_import? I am working on a 
number of other changes to the same piece of wee_import code and I would 
prefer to do them all at once if possible.

Gary 

On Saturday, 22 January 2022 at 16:08:27 UTC+10 Glenn McKechnie wrote:

> Thanks Gary,
>
> I'll give it a test drive as soon as I get a moment or three.
>
> On a related note (ie:- related to using TEXT fields in the database)
> I went and checked out wee_database and found that it baulked at the
> TEXT field in the database.
>
> Details are in the attached file, which should keep the formatting sane.
>
> Let me know if you want it raised as a seperate issue and I'll do that 
> instead.
>
> On 22/01/2022, gjr80 <gjrod...@gmail.com> wrote:
> > Glenn,
> >
> > I have created a new branch wee_import_text off development for this and
> > have modified the wee_import code to import text to a WeeWX TEXT field.
> > There are a dew conditions:
> >
> > 1. text import only works with CSV imports
> >
> > 2. import source fields that are to be imported as text must use 'text' 
> as
> > the WeeWX units specifier in the field map in the import config file, eg:
> > [[FieldMap]]
> > ....
> > aComment = import_text_field, text
> >
> > 3. the destination text field has been added to the WeeWX database and
> > WeeWX configured as per the Storing text in the database
> > <https://github.com/weewx/weewx/wiki/Storing-text-in-the-database> wiki
> > page
> >
> > I have only done basic testing of the code so there may be some corner
> > cases I have not covered, but you should be right to give it a go if you
> > want. As I said I have taken a branch off development, since there has 
> been
> >
> > quite a few changes in development since the last release the most 
> reliable
> >
> > option is for you to clone and install wee_import_text. However, the
> > wee_import code does not change often so you could probably get away with
> > running v4.5.1 and just downloading and installing the modified
> > weeimport.py
> > .
> >
> > To use the new wee_import:
> >
> > 1. Either clone and install from the wee_import_text branch or if using
> > v4.5.1 (or any other recent version at your own peril) replace
> > BIN/weeimport/weeimport.py with weeimport.py from the wee_import_text
> > branch. You can download weeimport.py from the wee_import_text branch
> > directly using wget as follows:
> >
> > $ wget
> > 
> https://raw.githubusercontent.com/weewx/weewx/wee_import_text/bin/weeimport/weeimport.py
> >
> > 2. edit your import config file and add your text field import to the 
> field
> >
> > map as outlined above
> >
> > 3. stop WeeWX and run your import using --dry-run and then without
> > --dry-run
> >
> > Let me know if you have any issues.
> >
> > Gary
> >
>
>
> -- 
>
>
> Cheers
> Glenn
>
> rorpi - read only raspberry pi & various weewx addons
> https://github.com/glennmckechnie
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/12aa9df9-5638-4413-9580-0bf23369f09an%40googlegroups.com.

Reply via email to