webOS Nation Forums >  Homebrew >  WebOS Internals > Save/Restore Community Development
Save/Restore Community Development

  Reply
Like Tree5Likes

 
LinkBack Thread Tools Display Modes
Old 08/18/2010, 03:44 PM   #1001 (permalink)
Member
 
Join Date: Feb 2009
Location: michigan
Posts: 1,609
Likes Received: 3
Thanks: 20
Thanked 204 Times in 149 Posts
Default

I confirmed as per discussion previously about trying to get a working script for virtualboy advance that it is indeed failing on files with spaces. How can we remedy this so that it can backup and restore files with spaces. I thought about the idea of putting if statements in the script for if save and if restore and putting a zip command line for the folder as worse case. However this is an issue that could crop up in more apps down the road and should be addressed on the level that is causing it to fail on files with spaces. But I have no idea where to look to even consider making these modifications.
__________________
As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
http://install.preware.org/ for easy to get up and running for patches and apps.
StoneRyno is offline   Reply With Quote
Old 08/18/2010, 03:47 PM   #1002 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Quote:
Originally Posted by StoneRyno View Post
I confirmed as per discussion previously about trying to get a working script for virtualboy advance that it is indeed failing on files with spaces. How can we remedy this so that it can backup and restore files with spaces. I thought about the idea of putting if statements in the script for if save and if restore and putting a zip command line for the folder as worse case. However this is an issue that could crop up in more apps down the road and should be addressed on the level that is causing it to fail on files with spaces. But I have no idea where to look to even consider making these modifications.
I talked to Rod about this...we have to do a similar solution as to what we did with Database names with spaces. We know about it and will see what we can do to fix it!

Adam
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/18/2010, 04:20 PM   #1003 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

I took a shot at updating the srf.app.files file to allow for spaces in filenames... all you need to do is load this into the /var/svc/org.webosinternals/saverestore directory like any other script. test it out and let me know if it works and i will update the file in the app

Rod -- i already updated this file on git...let me know what you think
Attached Files
File Type: zip srf.app.files.zip (760 Bytes, 2 views) Email Attachment
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/18/2010, 06:59 PM   #1004 (permalink)
Member
 
Join Date: Feb 2009
Location: michigan
Posts: 1,609
Likes Received: 3
Thanks: 20
Thanked 204 Times in 149 Posts
Default

Quote:
Originally Posted by Audemars02 View Post
I took a shot at updating the srf.app.files file to allow for spaces in filenames... all you need to do is load this into the /var/svc/org.webosinternals/saverestore directory like any other script. test it out and let me know if it works and i will update the file in the app

Rod -- i already updated this file on git...let me know what you think
Cool beans I'll test it out in a couple hours give or take. I got a few things I need to take care of first. Thanks much for looking into it. When I didn't hear from anyone I was concerned that we hit a road block or something.
__________________
As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
http://install.preware.org/ for easy to get up and running for patches and apps.
StoneRyno is offline   Reply With Quote
Old 08/18/2010, 07:10 PM   #1005 (permalink)
Developer
 
rwhitby's Avatar
 
Join Date: Apr 2003
Location: Adelaide, Australia - follow @webosinternals on Twitter visit www.webos-internals.org and www.facebook.com/webosinternals
Posts: 10,220
Likes Received: 546
Thanks: 90
Thanked 8,534 Times in 2,806 Posts
Default

Quote:
Originally Posted by StoneRyno View Post
Cool beans I'll test it out in a couple hours give or take. I got a few things I need to take care of first. Thanks much for looking into it. When I didn't hear from anyone I was concerned that we hit a road block or something.
These things take time to bubble to the top of the priority list ...

-- Rod
__________________
WebOS Internals and Preware Founder and Developer
You may wish to donate by Paypal to donations @ webos-internals.org if you find our work useful.
All donations go back into development.
www.webos-internals.org twitter.com/webosinternals facebook.com/webosinternals
rwhitby is offline   Reply With Quote
Old 08/18/2010, 08:09 PM   #1006 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Save/Restore 1.0.3 should be in the testing feed shortly (can take some time before it shows up, possibly even a few hours!).

Update includes:
- Added support for filenames with spaces
- Added backup script to save and restore the AutoReplace Dictionary (courtesy of Audemars02)
- Applications updated: wIRC (courtesy of Audemars02)
- Applications: pReader, Photo Safe, YouTube (all courtesy of Audemars02);
- Applications: Fliq Tasks, Sorting Thoughts, bit.ly (all courtesy of djgardn2)
- Applications: SiDiary Exporter (courtesy of Taurec), My Pets (courtesy of rgisraelsen)

- There is also another set of Easter Eggs in this release. I will write up another post tomorrow with directions on how to access them! :-)

Please test the above scripts and let us know what you find. There was a bounty set for Photo Safe. If this works to your satisfaction, please send the $3 bounty to the link included in my signature

NOTE 1: Anyone interested in getting access to the testing feed, follow the instructions here: Testing Feeds - WebOS Internals ... Please be sure to add the "-all" testing feed and the feed the relates to your device (pre/pixi/emulator)

NOTE 2: Don't see an app supported in Save/Restore? Request them here! Remember the bounty system that is referenced on the first post. For any paid applications, the "standard rate" is to offer 2x the value of the App.
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/18/2010, 09:02 PM   #1007 (permalink)
Member
 
Join Date: Feb 2009
Location: michigan
Posts: 1,609
Likes Received: 3
Thanks: 20
Thanked 204 Times in 149 Posts
Default

I tested the srf.app.files in post #1006. Worked just fine, it backed up the directory this time with it containing the files I had previously list. Here is the script for virtualboy advance.
Attached Files
File Type: zip org.webosinternals.visualboyadvance.zip (298 Bytes, 5 views) Email Attachment
__________________
As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
http://install.preware.org/ for easy to get up and running for patches and apps.
StoneRyno is offline   Reply With Quote
Old 08/18/2010, 10:34 PM   #1008 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Save/Restore 1.0.3 is now in the feeds.... I didn't want to announce the Easter Eggs yet, but I realized that there was something I did that could affect your scripts if you manually copied in the "Misc OS Files" script I posted a few weeks ago. basically, here is what I did:

As I mention, I now have the AutoReplace Dictionary as a backup script. To get this to run, I used the backup app (com.palm.app.backup) as the App ID, which is the same app I used for my "Misc OS Files", which included the AutoReplace but also a lot more. So, but using the Backup app in the official scripts, I would be overwriting your larger "Misc OS Files" script. but fear not, because this is where the Easter Eggs come in:

I now have the "Misc OS Files" script and the "ZIP the entire Save/Restore Folder" script loaded in the app, but not in the scripts directory. All you need to do is move those over to the right directory and you have the scripts back to normal. The scripts are housed in /media/cryptofs/apps/usr/palm/applications/org.webosinternals.saverestore/contrib , and there There are 2 ways to get them were you need to

1) Run the following to commands via Command Line.
Code:
chmod ugo+x /media/cryptofs/apps/usr/palm/applications/org.webos
internals.saverestore/contrib/*
cp /media/cryptofs/apps/usr/palm/applications/org.webosinternals.saverestore/contrib/* /var/svc/org.webosinternals.saverestore
2) using Internals:
  • Go to /media/cryptofs/apps/usr/palm/applications/org.webosinternals.saverestore/contrib/
  • Select each script you want and click Info
  • Select "Linux Permissions" and enable the "+X" for all three areas (See attached screenshot) and hit OK then backswipe back to the file list.
  • select each script and select "copy" to /var/svc/org.webosinternals.saverestore

Going forward, I may look to change the AutoReplace app ID to something else, so that it won't overwrite it every time there is an update. But for now, you have access to the Misc OS Backup and the ZIP script on your device!

Let me know if you have any questions
Adam
Attached Images
File Type: png LinuxPermissions.png (53.6 KB, 5 views) Email Attachment
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:

Last edited by Audemars02; 08/19/2010 at 08:17 AM.
Audemars02 is offline   Reply With Quote
Old 08/18/2010, 10:54 PM   #1009 (permalink)
Homebrew Developer
 
Join Date: Nov 2009
Posts: 338
Likes Received: 23
Thanks: 48
Thanked 128 Times in 81 Posts
Default

I've attached the following Zip's :

TechTray - works to save any newly entered feeds

GPS Trip Panel- works to save any saved trips

EasyList- works saves anything entered

What's for dinner? Lite- works to save recipes and shopping list


I tried to play around figuring out the free app called "SmartRunner" but I seemed to run into a funny problem when it came to restoring the Database(error message)? If anyone would like to take a look at that it would be great to save/restore any Recorded History logs saved.

Have a good one....


Reply to Audemars02

Very Nice Work, Looking foward to checking it out...
djgardn2 is offline   Reply With Quote
Old 08/19/2010, 02:17 AM   #1010 (permalink)
Member
 
Taurec's Avatar
 
Join Date: Oct 2009
Location: Germany
Posts: 443
Likes Received: 28
Thanks: 49
Thanked 88 Times in 46 Posts
Default

Quote:
Originally Posted by Audemars02 View Post
Thanks..will take a look...a few questions:
1) When you say "Please include my free App too.", what is that app? Is it the same script, just a different App ID? If so, what is that app ID?
It is the App from the Script. Sorry if this was confusing.

Quote:
Originally Posted by Audemars02 View Post
2) You first line that says
APPID=`com.larshendrichs.sidiary $0`
should be replaced with
APPID=`basename $0`
Otherwise, looks good.
Ah ok.. i thought this was a VARIABLE I had to change with my AppID.

Thanks for including my App into this. I apreciate it a lot!

Thanks

Lars
__________________
My Apps: SiDiary Exporter,SiDiary Exporter 2 Geocaching Toolbox
My Patches: Lastpass TouchPad, jVault TouchPad, DirectTV TouchPad, SplashID TouchPad, Flixster TouchPad
Follow me on Twitter
Taurec is offline   Reply With Quote
Old 08/19/2010, 03:06 AM   #1011 (permalink)
Member
 
Join Date: Feb 2009
Location: michigan
Posts: 1,609
Likes Received: 3
Thanks: 20
Thanked 204 Times in 149 Posts
Default

I feel silly as I forgot to change the app name for some of the scripts I wrote. I did copy and paste for ease of quickly making all of the scripts. Pandora and DZ tanks are visually named feeds when looking at the list inside the app but have the proper app id below. I guess I should have triple checked before zipping them up. Sorry
__________________
As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
http://install.preware.org/ for easy to get up and running for patches and apps.
StoneRyno is offline   Reply With Quote
Old 08/19/2010, 05:38 AM   #1012 (permalink)
Member
 
Join Date: Aug 2010
Posts: 40
Likes Received: 0
Thanks: 12
Thanked 2 Times in 2 Posts
Default

Hi all,

I would like to test this app but i cant find it!
I have use preware with ll feeds below...

Target Device: ALL
Name: webos-testing-all
URL: Index of /feeds/webos-internals/testing/all/

Target Device: Pre/Pre+
Name: webos-testing-armv7
URL: Index of /feeds/webos-internals/testing/armv7/

Target Device: Pixi/Pixi+
Name: webos-testing-armv6
URL: Index of /feeds/webos-internals/testing/armv6/

Target Device: Palm SDK Emulator
Name: webos-testing-i686
URL: Index of /feeds/webos-internals/testing/i686/

I am using a Pre Plus.
Any help is appreciated...

many thanks!
geovass is offline   Reply With Quote
Old 08/19/2010, 07:12 AM   #1013 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Quote:
Originally Posted by StoneRyno View Post
I feel silly as I forgot to change the app name for some of the scripts I wrote. I did copy and paste for ease of quickly making all of the scripts. Pandora and DZ tanks are visually named feeds when looking at the list inside the app but have the proper app id below. I guess I should have triple checked before zipping them up. Sorry
d'oh. and i usually double check them as well. I will update those scripts in the next version (will try to get out today)
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/19/2010, 08:34 AM   #1014 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Quote:
Originally Posted by djgardn2 View Post
I tried to play around figuring out the free app called "SmartRunner" but I seemed to run into a funny problem when it came to restoring the Database(error message)?
Can you give more details or a screenshot of the error message? can you post the script you wrote to debug?
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/19/2010, 10:36 AM   #1015 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

FOUND ISSUE WITH SAVE/RESTORE 1.0.3. In my attempt to allow Filenames with spaces, this has caused an issue with our existing scripts. basically, if we have scripts that saved multiple files by identifying:
Code:
FILES="file1 file2 file3"
now, instead of saving the 3 files, it thinks this is just one file named "file1 file2 file3"

I am going to push out a new update to save/restore with the older version of the filenames script. I will reach out to the team to figure out how we get around this

To fix this in the meantime, you can edit the srf.app.files script and remove the following lines:

OIFS=$IFS
IFS='$\n'
.
.
.
IFS=$OIFS
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:

Last edited by Audemars02; 08/19/2010 at 10:44 AM.
Audemars02 is offline   Reply With Quote
Old 08/19/2010, 11:01 AM   #1016 (permalink)
Homebrew Developer
 
Join Date: Nov 2009
Posts: 338
Likes Received: 23
Thanks: 48
Thanked 128 Times in 81 Posts
Default

Reply to Audemars02

I will post the Non-working "SmartRunner" Script in a little for you to see. Also I will try a screenshot of the actual error message also.

My geuss is it ties the info online somehow and doesn't like to be replaced. When I replace databases it says something like "waiting for workers when inside the app" then I have to unistall the app and reinstall the app to get it to work again...

Also just a thought on reading through the saving files that include spaces, I'm not sure how you read though the files but if you put something to check if what you've read includes a peroid inside that way once a peroid is read tell it to make that a file when it reaches the very next space or the end of the list. I have just noticed that they use a period only once in almost all cases.
djgardn2 is offline   Reply With Quote
Old 08/19/2010, 11:25 AM   #1017 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Save/Restore 1.0.4 should be in the testing feed shortly (can take some time before it shows up, possibly even a few hours!).

Update includes:
- Fixed issue where multiple files were beings saved (this was caused by the update to allow spaces in filenames). Until Rod can look over my work and suggest a better solution, any script that will be used for filenames with spaces needs to add the following line right before you call "source `dirname $0`/srf.app.files"
Code:
NEWIFS=$'/n'
- Also, we have changed the permissions of the scripts in the "contrib" directory so you don't need to set the LINUX permissions for them. You just need to copy those files to the saverestore scripts directory. I have added a "readme.txt" file in /media/cryptofs/apps/usr/palm/applications/org.webosinternals.saverestore/contrib that explains the process
- Remember, if you use the full "Misc OS Files" script (and not just for AutoReplace dictionary), you need to copy that back from the contrib directory above back to the main scripts directory.

NOTE 1: Anyone interested in getting access to the testing feed, follow the instructions here: Testing Feeds - WebOS Internals ... Please be sure to add the "-all" testing feed and the feed the relates to your device (pre/pixi/emulator)

NOTE 2: Don't see an app supported in Save/Restore? Request them here! Remember the bounty system that is referenced on the first post. For any paid applications, the "standard rate" is to offer 2x the value of the App.
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/19/2010, 11:30 AM   #1018 (permalink)
Homebrew Developer
 
Join Date: Nov 2009
Posts: 338
Likes Received: 23
Thanks: 48
Thanked 128 Times in 81 Posts
Default

Here is "SmartRunner" script but it is Not working and still needs to be worked on....

I will edit and post a screen shot of the error message in about 10mins I need to load the script back on...


Edit : ScreenShot Error message Added
Attached Images
File Type: png saverestore_2010-19-08_124232.png (67.0 KB, 7 views) Email Attachment
Attached Files
File Type: zip com.smartrunner.app.zip (241 Bytes, 3 views) Email Attachment

Last edited by djgardn2; 08/19/2010 at 11:48 AM.
djgardn2 is offline   Reply With Quote
Old 08/19/2010, 12:55 PM   #1019 (permalink)
Member
 
Audemars02's Avatar
 
Join Date: May 2009
Posts: 1,487
Likes Received: 13
Thanks: 252
Thanked 405 Times in 238 Posts
Default

Quote:
Originally Posted by djgardn2 View Post
Here is "SmartRunner" script but it is Not working and still needs to be worked on....

I will edit and post a screen shot of the error message in about 10mins I need to load the script back on...


Edit : ScreenShot Error message Added
Ok.. i THINK i know whats happening.
  • It looks like there are 2 databases that this app uses (see screenshot below): smartrunner & ext:Smartrunner
  • The "ext:" means that that database is held on media\internal\.app-storage instead of /var/palm/data
  • So, from a database view, the only difference between the two names is that one has an "s" (lowercase) and that other has an "S" (CAPS).
  • I wonder if the seemingly duplicate names are causing problems.

Rod -- I have attached 2 screenshots from Terminal that shows exactly what is happening when you run the script from the command line. Any thoughts?
Attached Images
File Type: png SmartRunner DBs.png (36.0 KB, 4 views) Email Attachment
File Type: png Smartrunning script1.png (28.1 KB, 8 views) Email Attachment
File Type: png Smartrunning script2.png (210.7 KB, 6 views) Email Attachment
__________________
I am the creator of the PalmSpot entry “webOS Does, and Does, and Does Some More”, writes Save/Restore scripts and helps manage the script feed, and now writes PreCentral's Tip of the Day

Got a good tip for PreCentral's Tip of the Day? Please send me a PM or use the Contact Us form and select "Suggest a tip"

Like any of my work:
Audemars02 is offline   Reply With Quote
Old 08/19/2010, 02:16 PM   #1020 (permalink)
Member
 
Join Date: Feb 2009
Location: michigan
Posts: 1,609
Likes Received: 3
Thanks: 20
Thanked 204 Times in 149 Posts
Default

Quote:
Originally Posted by Audemars02 View Post
any script that will be used for filenames with spaces needs to add the following line right before you call "source `dirname $0`/srf.app.files"
Code:
NEWIFS=$'/n'
Sounds like a good solution. A short one line added to a script that has file names with spaces. I'll test that out with the VBA script. The only other solution I could think of would have been to make the scripts that specify file name comma delineated instead of space delineated but that is much more work than adding this line to new scripts that will be backing up and restoring names with spaces.

EDIT: Tested by copying open source information.pdf to the VBA save directory and get error bi not found. Not sure why since there is only this one file in there and bi is not even a sub string of the file name.
__________________
As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
http://install.preware.org/ for easy to get up and running for patches and apps.

Last edited by StoneRyno; 08/19/2010 at 02:25 PM.
StoneRyno is offline   Reply With Quote
Reply

 

Tags
angry birds, save restore

Thread Tools
Display Modes


LinkBacks (?)
LinkBack to this Thread: http://forums.webosnation.com/webos-internals/237558-save-restore-community-development.html
Posted By For Type Date
Save/Restore: 'holy grail of homebrew' nears 1.0 This thread Refback 09/15/2010 02:31 PM
Save/Restore: 'holy grail of homebrew' nears 1.0 This thread Refback 05/23/2010 03:50 PM
WebOS Internals (webosinternals) on Twitter This thread Refback 05/20/2010 05:22 PM


 


Content Relevant URLs by vBSEO 3.6.0