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:
#!/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.
Can't wait to see this working with online file archives Very Happy
Deep Thought wrote:
Can't wait to see this working with online file archives Very Happy
The released Sandpaper 0.8 beta actually already works with the ticalc.org archives via globalCALCnet! You can browse through the archives, although sadly I didn't implement downloading files yet.
How did I miss that? I'll have to try it when I get home today!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 6 of 6
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement