Thank you for the feedback Stéphane, wee_import --no-prompt will be included in the 4.3.0 release.
Gary On Saturday, 19 December 2020 at 21:36:25 UTC+10 sc.lep...@gmail.com wrote: > Hello back Gary ! > > I try it and its good ! > > My script is working with no prompt ! > > > root@raspberrypi:/home/pi/Froggit# ./recup_wu.sh > Using WeeWX configuration file /home/weewx/FROGGIT.conf > Starting wee_import... > Observation history for Weather Underground station 'IPONTS4' will be > imported. > Using database binding 'wx_binding', which is bound to database > 'weewx-FROGGIT.sdb' > Destination table 'archive' unit system is '0x01' (US). > Missing derived observations will be calculated. > Observations timestamped after 2020-12-18 00:00:00 CET (1608246000) and up > to and > including 2020-12-19 00:00:00 CET (1608332400) will be imported. > Starting import ... > Records covering multiple periods have been identified for import. > Period 1 ... > Unique records processed: 271; Last timestamp: 2020-12-18 22:34:52 CET > (1608327292) > Period 2 ... > Period 2 - no records identified for import. > Calculating missing derived observations ... > Processing record: 271; Last record: 2020-12-19 00:00:00 CET (1608332400) > Recalculating daily summaries... > > Finished recalculating daily summaries > Finished calculating missing derived observations > Finished import > 271 records were processed and 271 unique records imported in 9.11 seconds. > Those records with a timestamp already in the archive will not have been > imported. Confirm successful import in the WeeWX log file. > > > Just a little detail your versionning : > > root@raspberrypi:/home/pi# /home/pi/weewx-4.2.0/bin/wee_import --version > Using WeeWX configuration file /home/pi/weewx-4.2.0/weewx.conf > wee_import version: 0.5 > root@raspberrypi:/home/pi# > > (you can see it here : > https://meteo-pontscorff.fr/station-froggit-template-belchertown/ ) > > > Thanks a lot ! > Best regards > Stéphane > > > > Le samedi 19 décembre 2020 à 12:04:35 UTC+1, sc.lep...@gmail.com a écrit : > >> Hello Gary, >> Sorry for my non answer ! I dont see it , >> I m trying this as soon as possible and will give a feed back >> Thanks a lot for this ! >> Best regards >> stéphane >> >> >> Le dimanche 22 novembre 2020 à 02:36:44 UTC+1, gjr80 a écrit : >> >>> Stephane, >>> >>> I have implemented a --no-prompt command line option for wee_import. >>> --no-prompt will cause 'y' to be automatically accepted for all y/n >>> prompts. To use it you just add it to your existing command line, eg: >>> >>> $ /home/weewx/bin/wee_import --import-config=/var/tmp/wu.conf >>> --date=2020-11-15 --no-prompt >>> >>> Since you are using WeeWX v4.2.0 you can try out the --no-prompt >>> capable wee_import as follows (the following assumes you have WeeWX >>> installed in the directory /home/pi/weewx-4.2.0): >>> >>> 1. move aside your existing wee_import and weeimport.py: >>> $ cp /home/pi/weewx-4.2.0/bin/wee_import >>> /home/pi/weewx-4.2.0/bin/wee_import_orig >>> $ cp /home/pi/weewx-4.2.0/bin/weeimport/weeimport.py >>> /home/pi/weewx-4.2.0/bin/weeimport/weeimport_orig.py >>> >>> 2. download the updated wee_import and weeimport.py from github: >>> $ wget -P /home/pi/weewx-4.2.0/bin >>> https://raw.githubusercontent.com/weewx/weewx/wee_import_no_prompt/bin/wee_import >>> $ wget -P /home/pi/weewx-4.2.0/bin/weeimport >>> https://raw.githubusercontent.com/weewx/weewx/wee_import_no_prompt/bin/weeimport/weeimport.py >>> >>> 3. run wee_import with the --help action to see the revised usage: >>> $ /home/pi/weewx-4.2.0/bin/wee_import --help >>> >>> 4. run wee_import with --no-prompt, I suggest you try running wee_import >>> with --no-prompt interactively from the command line before setting >>> your cron script to use it. >>> >>> Please let me know how you go, if successful I will arrange for >>> --no-prompt to be included in the 4.3.0 release. >>> >>> Gary >>> >>> On Friday, 20 November 2020 at 02:54:44 UTC+10 sc.lep...@gmail.com >>> wrote: >>> >>>> Hi Gary, Thanks a lot for your answer ... >>>> there is option - - dry-run so if you can implemente - - no-prompt it >>>> will be very good >>>> Stephane >>>> >>>> Le mardi 17 novembre 2020 à 08:37:56 UTC+1, gjr80 a écrit : >>>> >>>>> Hi, >>>>> >>>>> There is presently no support in wee_import for >>>>> suppressing/bypassing/automatically answering the y/n prompt in >>>>> wee_import, we never envisioned wee_import being used in that manner. >>>>> Implementing something like the --no-prompt command line option in >>>>> wee_config should be possible and fairly straightforward to add. Let >>>>> me do some homework. >>>>> >>>>> Gary >>>>> On Monday, 16 November 2020 at 01:11:16 UTC+10 sc.lep...@gmail.com >>>>> wrote: >>>>> >>>>>> For the first question I ve my own answer : >>>>>> 2 scripts bash >>>>>> >>>>>> *For night and morning : * >>>>>> #!/bin/bash >>>>>> date_debut_jour_heure=`date +"%Y-%m-%dT00:00"` ; >>>>>> date_fin_jour_heure=`date +"%Y-%m-%dT12:00"` ; >>>>>> >>>>>> echo $date_debut_jour_heure; >>>>>> echo $date_fin_jour_heure; >>>>>> >>>>>> /home/pi/weewx-4.2.0/bin/wee_import --config=/home/weewx/FROGGIT.conf >>>>>> --import-config=/home/weewx/wu-FROGGIT.conf >>>>>> --from=$date_debut_jour_heure >>>>>> --to=$date_fin_jour_heure --dry-run >>>>>> >>>>>> >>>>>> *For afternoon and evening : * >>>>>> >>>>>> #!/bin/bash >>>>>> date_debut_jour_heure=`date +"%Y-%m-%dT12:00"` ; >>>>>> date_fin_jour_heure=`date +"%Y-%m-%dT23:59"` ; >>>>>> >>>>>> echo $date_debut_jour_heure; >>>>>> echo $date_fin_jour_heure; >>>>>> >>>>>> /home/pi/weewx-4.2.0/bin/wee_import --config=/home/weewx/FROGGIT.conf >>>>>> --import-config=/home/weewx/wu-FROGGIT.conf >>>>>> --from=$date_debut_jour_heure >>>>>> --to=$date_fin_jour_heure --dry-run >>>>>> >>>>>> >>>>>> >>>>>> But how to suppress Y/N answer ? >>>>>> >>>>>> thanks >>>>>> >>>>>> Le dimanche 15 novembre 2020 à 15:08:24 UTC+1, sc.lep...@gmail.com a >>>>>> écrit : >>>>>> >>>>>>> Hello >>>>>>> I want to import twice a day ( for example 12h00 and 00h00) my data >>>>>>> from Weather Underground. >>>>>>> >>>>>>> I want to write a script shell to put it in a crontab. >>>>>>> >>>>>>> first question : >>>>>>> I use this : >>>>>>> wee_import --config=/home/weewx/FROGGIT.conf >>>>>>> --import-config=/home/weewx/wu-FROGGIT.conf --date=2020-11-14 >>>>>>> >>>>>>> For midday : ..... - -date is it possible to put - - date >>>>>>> =2020-11-14T12:00 ? >>>>>>> For midnight : ..... - - from=2020-11-14T12:00 - >>>>>>> -to=2020-11-14:23:59 >>>>>>> >>>>>>> >>>>>>> Snd question : I must answer by "y" to proceed import , is is >>>>>>> possible to overwrite this ? >>>>>>> >>>>>>> And if you want to see results , it 's here : >>>>>>> https://meteo-pontscorff.fr/station-froggit-template-belchertown/ >>>>>>> >>>>>>> Thanks a lot , best regards >>>>>>> Stephane >>>>>>> >>>>>>> -- 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/898fc1e8-35ed-4b6b-b66c-fd5c0a8b621cn%40googlegroups.com.