Page 2 of 2

Re: simultaneous editing of program files

Posted: Fri Aug 12, 2016 11:28 am
by EViews Jason
You could use

Code: Select all

run <mygoogledrive>:\testsave


but this assumes the file is named testsave.prg. Unfortunately you cannot use

Code: Select all

run <mygoogledrive>:\testsave.txt


I would look into getting google docs to open text files that do not have *.txt extensions (ie get google docs to open prg files by default).

Re: simultaneous editing of program files

Posted: Fri Aug 12, 2016 9:56 pm
by tvonbrasch
perfect, thanks again!
Thomas

Re: simultaneous editing of program files

Posted: Tue Sep 06, 2016 4:37 am
by tvonbrasch
After the last update, it works perfect! Being able to work on program files in Google Docs is great!

gdoc and eviews.JPG
gdoc and eviews.JPG (186.75 KiB) Viewed 9401 times

Re: simultaneous editing of program files

Posted: Tue Jul 17, 2018 8:22 am
by tvonbrasch
Hi Jason

in 2016 you stated that "2) We are still working on this one.".

any progress yet?
Thomas

Re: simultaneous editing of program files

Posted: Wed Jul 18, 2018 6:30 am
by tvonbrasch
Hi

Figured out an alternative way to execute Google Docs as EViews programs. Given a Google Document, such as,
google docs.PNG
google docs.PNG (31.99 KiB) Viewed 8268 times


use the FILE ID and insert it in the following program

Code: Select all

%fileid= "1-T-3yjhYNJbwk3-8z_zf1afdGVo63iYLBM7TNeZybXY"
call googledocs(%fileid) 'executes the Google Doc as EViews program


'-------------------------------------------------------------------------------
subroutine googledocs(string %fileid)
   %filename   = "googledocs_may_be_deleted.txt" 'will be saved in @runpath folder
   %dir=@runpath

   'downloading google doc as txt file
   %code1="wget https://docs.google.com/document/d/"
   %code2="/export?format=txt -OutFile "
   %code=%code1+%fileid+%code2+%dir+%filename
   shell powershell -command {%code}  'downloading google doc file

   'create txt file to execute program
   %t=@getnextname("_t") 'txt file
   text {%t} 'create text file
   {%t}.append(file) {%dir}\{%filename}
   {%t}.save {%dir}\googledocrunprogram.prg 'save text file as program
   exec {%dir}\googledocrunprogram 'execute new program file
   close {%t}
endsub


This way of doing it is a bit faster (takes 2,5 seconds instead of about 7 seconds when using the cloud connector in EViews) and Eviews will not unexpectedly shut down (viewtopic.php?f=9&t=19330)
Thomas