Log In  

I wanted to download an older version of one of my carts and didnt save the cart number or add it to my cart thread. I couldn't find a good way to navigate the BBS to find my old carts. So I downloaded them all (AFAIK) up to 7/22/18.
Here's a link to them all: Download

Let me know if I missed any.

P#54381 2018-07-24 11:26 ( Edited 2018-10-15 15:37)

P#54393 2018-07-24 20:58 ( Edited 2018-07-25 00:58)

That file wasn't as big as I expected, given the current cart ID.

Do some of them simply not exist?

Or am I wrong in assuming you downloaded everything by writing something like this:

for i=1,#carts do
  download(i)
end
P#54394 2018-07-24 21:01 ( Edited 2018-07-25 01:01)
2

Cart #54407 | 2018-07-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2


(use the pause menu to get the cart number and/or try another one)

P#54408 2018-07-25 02:34 ( Edited 2018-07-25 19:35)

I used c# webclient and went through the web. And yes some of them just dont exist.

https://www.lexaloffle.com/bbs/cposts/{x}/{cart_number}.p8.png

I didnt even think of using pico-8! (duh!)

P#54423 2018-07-25 12:34 ( Edited 2018-07-25 16:35)

@spencifier: AFAIK you couldn't do this with pico-8 anyway. load() also runs the cart so you couldn't save it with code. Felice's post was pseudo-code for what you actually did and the cart I posted was just a semi-related random thought :)

P#54425 2018-07-25 15:23 ( Edited 2018-07-25 19:23)

iirc there was a big jump in cart IDs at least once. I stopped maintaining my own crawl shortly after. Glad to have an updated archive for testing purposes! :)

P#54429 2018-07-25 17:54 ( Edited 2018-07-25 21:54)

I'm entirely certain there's some garbage collection going on for carts which don't exist in posts/threads anymore. If you want to keep your old versions accessible, you need to stuff them in a post somewhere, Presumably the bottom of your main thread post in a little hidden spoiler area would be ideal? I think that having multiple carts in the same post keeps all but the first one from showing up in splore, anyway.

P#57969 2018-10-15 07:40 ( Edited 2018-10-15 11:40)
1

I'd be curious to see an EXE that does download every single PICO-8 cartridge to put into a backup directory. I know we rely on SPLORE, but when if and when it goes down ?

P#57975 2018-10-15 11:37 ( Edited 2018-10-15 15:37)

So, uh, has this been updated with new carts? I'm building my retropie pico8 box and I'd love it to work offline.

P#70048 2019-11-19 23:07

Time to revisit this. I started using tac08 on my rg350 and wanted to download a few carts. So...I made a small python program that will find and download all carts. As of writing this, there are 8,478 carts (150MB)

Credit and details on how to do this is here: https://www.ebartsoft.com/pico8

python3

import requests
import os, sys, time
from os.path import exists
from PIL import Image
from io import BytesIO

CART_DOWNLOAD_DIR = os.path.dirname(__file__) + "\carts"
PAGES = 5320
DOWNLOAD_URL = "https://www.lexaloffle.com/bbs/get_cart.php?cat=7&play_src=2&lid="

def save_cart(cart_info, data):
    # Remove invalid filepath characters
    filename = "".join(x for x in cart_info[1] if x.isalnum())

    # If two carts have the same title add on the carts unique name.
    if exists(CART_DOWNLOAD_DIR + "\\" + filename + ".p8.png"):
        filename += "." + cart_info[3]

    # Write cart data to file
    with open(CART_DOWNLOAD_DIR + "\\" + filename + ".p8.png","wb") as cd:
        cd.write(data)

def get_cart_listing(sub, start_index):
    # Search cart listings 32 at a time.
        print("Searching carts " + str(32*start_index) + " to " + str((32*start_index)+31) + "...")
        r = requests.get("https://www.lexaloffle.com/bbs/cpost_lister3.php?max=32&start_index=" + str(32*start_index) + "&cat=7&sub=" + str(sub) + "&version=000202cw&cfil=0")
        return r.content

def parse_cart_info(pixels):
    # Cart listing image is 32 carts in a 4 x 8 grid
    # Metadata about each cart is in the 8 pixel rows under each cart, RGB encoded
    cart_info = []
    for row in range (1, 5):
        for col in range (0, 8):
            cart_data = []
            for y in range (128*row + (8*(row-1)), (128*row) + 8 + (8*(row-1))):
                line = ""
                for x in range (128*col, (128*col) + 128):
                    rgba = pixels[x,y]
                    line += chr(rgba) # decrypt pixel RGB to a character
                cart_data.append(line.replace("\x00","")) # Clean-up empty characters
            cart_info.append(cart_data)
    return cart_info

def download_cart(cart_info):
    dc = requests.get(DOWNLOAD_URL + cart_info[3])
    save_cart(cart_info, dc.content)

def main():
    # Make download directory for all the carts if it doesn't exist
    if not os.path.isdir(CART_DOWNLOAD_DIR):
        os.mkdir(CART_DOWNLOAD_DIR)
    for sub in [2,3,4,8]:
        print("Sub: " + str(sub))
        for p in range(0, PAGES):
            print("Page: " + str(p+1) + " of " + str(PAGES))
            cart_listing_bytes = get_cart_listing(sub, p)
            if len(cart_listing_bytes) <= 1064:
                break
            cart_listing_image = Image.open(BytesIO(cart_listing_bytes))
            cart_pixels = cart_listing_image.load()
            cart_listing_info = parse_cart_info(cart_pixels)
            for i in range(len(cart_listing_info)):
                if cart_listing_info[i][3]:
                    print("Downloading cart "  + str(32*p+i) + "..." + cart_listing_info[i][1])
                    download_cart(cart_listing_info[i])
            print("Waiting 2 secs...")
            time.sleep(2) # Trying not to kill the BBS
    print("Cart downloads complete.")

if __name__ == "__main__":
    main()
P#97518 2021-09-19 02:20 ( Edited 2021-09-19 02:21)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 07:45:43 | 0.044s | Q:32