Skip to content

369px/How-to-implement-automatic-updates-in-your-Picotron-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

How to implement automatic updates in your Picotron cart

Watch the video tutorial: https://www.youtube.com/watch?v=88nRTLXdAGs

--define a cart_id_number int where you store your current bbs ID version,
--you can find it in your bbs post like this [cart-5]

function isLatestVersion() --true if latest, else false

  cartName = "YOUR-CART-NAME-ID"
  --change cartName to your cart's name ID without the number

  cartURL = "https://www.lexaloffle.com/bbs/cart_info.php?cid="..cartName.."-"
  local newV = fetch(cartURL..cart_id_number + 1 ) -- +1 cause we want the next one 
  local strToFind = "missing cart_id" 
	
  if not newV then return true
  --if no page is fecthed... return true cause we don't need to update 
  else return string.find(newV, strToFind) ~= nil  end
  --elsif next version's page (fecthed in newV) contains strTofind, there is no new version!

end
function loadUpdate()
  --depending on your case, you may need to back-up what's in ram and load it back in later
  backupUserCart() --just a cp("/ram/cart","/ram/compost/user_cart.p64")
  run_terminal_command("load #phone") --include "terminal.lua" to run this!

  for i=1,39 do 
    flip()
    notify("Loading new update "..i.."/39")
  end 
		
  notify("Update loaded!")
		
  --then you can do whatever you want, install it or just run it
end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages