As promised, Kerm, here's what would be needed to get Cemetech, Sandpaper, and calcpkg all working with each other.
First, we'd need a script that will produce something like ticalc.org's master.index, perhaps run whenever a file is uploaded. Something like the Python script below would get all the files (with paths). I don't know how you store file info, though, so getting the actual name of an upload might be more difficult.
Code:
Then, I would just need to to build the cemetech index files using this index, but I can just reuse the ticalc.org code so this wouldnm't take long at all.
After that, I think everything should Just Work- though maybe we'd also need more code to turn the calcpkg output into something Sandpaper can understand?
That's all that's actually needed, but it would also be nice to have a "File Size" listed on the Cemetech archive pages, like the one on ticalc.org archive pages, here's an example. This would just allow the "calcpkg info" command to give more information about Cemetech files.
I think that's everything.
First, we'd need a script that will produce something like ticalc.org's master.index, perhaps run whenever a file is uploaded. Something like the Python script below would get all the files (with paths). I don't know how you store file info, though, so getting the actual name of an upload might be more difficult.
Code:
#!/usr/bin/env python
import os
names = []
filenames = []
archives = "/path/to/the/archives/"
for root, dirs, files in os.walk(archives):
for file in files:
if file[0] == ".":
continue
dirpath = root[root.find(archives) + len(archives):]
filenames.append(dirpath + "/" + file)
#Do something to get the name as well
Then, I would just need to to build the cemetech index files using this index, but I can just reuse the ticalc.org code so this wouldnm't take long at all.
After that, I think everything should Just Work- though maybe we'd also need more code to turn the calcpkg output into something Sandpaper can understand?
That's all that's actually needed, but it would also be nice to have a "File Size" listed on the Cemetech archive pages, like the one on ticalc.org archive pages, here's an example. This would just allow the "calcpkg info" command to give more information about Cemetech files.
I think that's everything.