Author Topic: ticalc.org "Package Manager"  (Read 52481 times)

0 Members and 1 Guest are viewing this topic.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
ticalc.org "Package Manager"
« on: November 24, 2010, 09:04:44 pm »
This project is my longstanding attempt to create a command line utility and Python library for accessing, searching, and downloading projects from ticalc.org (and other sites).

Current version is 1.1; 2.0 has been in development for a while but is hopefully nearing a release with possible support for downloading programs from Cemetech and Omnimaga as well.

Development is generally happening at github- you can clone a snapshot from there. Or, you can download the latest version from ticalc.org for Windows or Linux. (Downloads are also hosted on Cemetech for Windows and Linux). Once it's downloaded, extract the archive and run "python setup.py install". Note that if you're on Linux, this command will probably require root access (su or sudo); no matter what platform you are on you will need Python 2.x to run it.

After installing it, you can run it on the command line using:

python calcpkg.py [command] [filename]

Note that if you're on Linux and using 2.0 or higher (or the 2.0 snapshots from github), you should instead be using:
calcpkg [command] [filename]

The first command you run should run is "update"- this will create a local copy of the master.index file from ticalc.org that calcpkg knows how to use for searching and so on. Then you can run "calcpkg search" and "calcpkg install", which will list and download programs. For a full list of all possible options, run "calcpkg -h" (or possibly refer to the README).

Here is a rather old screenshot:
« Last Edit: November 20, 2012, 09:47:03 pm by TC01 »



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #1 on: November 24, 2010, 09:06:02 pm »
Cool :D
Can't wait for more features! :)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: ticalc.org "Package Manager"
« Reply #2 on: November 24, 2010, 10:18:58 pm »
Sweet! Can't wait to play around with this!

EDIT: Err, when I try to run this on my linux partition, it fails on all version of python I have installed (python, python2, python2.7, python3, python3.1)
« Last Edit: November 24, 2010, 10:22:55 pm by Eeems »
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ticalc.org "Package Manager"
« Reply #3 on: November 24, 2010, 10:25:45 pm »
Nice, will this work on Windows 7 x64?

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6266
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: ticalc.org "Package Manager"
« Reply #4 on: November 24, 2010, 10:37:34 pm »
Nice, will this work on Windows 7 x64?
I'm guessing that if you can get the right version of Python installed that it should work
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ticalc.org "Package Manager"
« Reply #5 on: November 24, 2010, 10:41:47 pm »
Ah ok, I was wondering because I often have troubles running command prompt stuff. Often I get missing DLL errors.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #6 on: November 24, 2010, 10:55:10 pm »
It will work on x64- I coded it on Windows 7 x64. And it doesn't require any other Python libraries.

Eeems:

Hrm, not sure why. Does it give Python exceptions?

If it does, can you post them?

I haven't had a chance to run it on my Fedora partition. On Windows 7, I have a Python 2.6.6 installation, where it works fine. I'm booting into Fedora now to find out, though.

EDIT: Booted into Fedora; it works fine. Try this command:

python calcpkg.py get "Wacky Fun Random Numbar Generator"

That should download all 12 WFRNGs from ticalc.org. Please post whatever it outputs.
« Last Edit: November 24, 2010, 11:02:11 pm by TC01 »



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ticalc.org "Package Manager"
« Reply #7 on: November 24, 2010, 11:15:17 pm »
Ah good to hear it will work on 7. I should try this and install python when I get some time. :)

I worry about what will happen if I type quadratic solver, though... I'll get about half of the quadratic solvers on ticalc.org (the other half not being spelled correctly)

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #8 on: November 25, 2010, 12:10:29 am »
Ah good to hear it will work on 7. I should try this and install python when I get some time. :)

I worry about what will happen if I type quadratic solver, though... I'll get about half of the quadratic solvers on ticalc.org (the other half not being spelled correctly)

True. quicklist "Quadratic Solver" gives me 157 results:

Spoiler For Spoiler:
Code: [Select]
C:\Python27\Dev>python calcpkg.py quicklist "Quadratic Solver"

Search for 'Quadratic Solver' returned 157 result(s)

File Name                                                              Category (excluded in quick search)
=======================================================================================================================
Quadratic Solver
23+ Advanced Solvers
25 Advanced Solvers
Quadrat 80 v1.0 Quadratic formula solver
Comprehensive Quadratic Equation Solver
Comprehensive Quadratic Equation Solver
Quadratic Formula Solver
Quadratic Solver
Quadratic Solver
QuadOreh 1.0 - Quadratic Formula Solver
Quadratic Equation Solver
Quadratic Solver v2.5
Quadratic Equation Solver
Quadratic Formula Solver
Aquations
Aquations
Quadrat 81 v1.0 Quadratic formula solver
Quadratic equation and vertex solver program 1.0
AP Tools 5.1
Quadratic Equation Solver
Ultra-Small Quadratic Equation Solver
DCSQuad Solver v1.0
Grayscale Quadratic Equation Solver
Erik Huelsebusch's Quadratic Equation Solver
ABC-Formula 3.1
ABC-Formula 3.1
Class Aid v2.0
Final Fantasy Quadratic Solver
All In One v1.5
Quadratic Equation Solver
Completing the Square Quadratic Solver
Multi-Display Quadratic Solver
Basic Quadratic Solver
QuadForm-92 6.4
AlgQuad - the ultimate quadratic equation solver!
Quadratics Solver
Quadra Solver v0.5a
Quadratic Solver v.1
Simple Quadratic Solver
Math99
QuadFACT Quadratic Equation Solver
Quadratic Formula
Quadratic Formula
Quadratic Multi-variable Solver
Quadratic Formula Solver
Quadratic Formula Solver
Advanced Quadratic Formula Program
Exact Quadratic
QForm 0.1
Exact Quadratic Solver
Quadratic Equation Solver
Quadratic Equation Solver
Quadratic Equation Solver
Quadratic Solver
N00B C4K3 Quadratic Solver
Equation Solvers
Quadratic Quarto
TI-Source Math Suite 2000, Second Series
TI-Source Math Suite 2000, Second Series
Quadratic Quarto
Quadratic Equation Solver v2.1
HGG's Math Program v2.0 for TI83
HGG's Math Program v2.o
TrigPrgm by Kyle
Quadratic Equation Solver
Quadratic Equation Solver
All About Quadratics
All About Quadratics
A Quadratic Solver!
Quadratic Equation Solver
Quadratics Equation Solver
AcT 2.0
Quad Solver v1.0
Quadratic Solver That Shows The Work
Geometry Formulas Plus
Quadratic Formula Solver
MATHMATX  Version 4.3
QFORM2
Reapex's Quadratic Formula Solver
Cheater v2.0
TI Tools v1.0
Quad 2001 v3.0
Quadform
Quad GS v1.1
Quadratic Equation Solver
Quadratic Solver
Pythag86 v1.0.5
Quadratic Solver
ABC-formula v2.0
MATH B formulas
pythagorean therom solver
QFormula
Quadform
Quad4Mula
CHS Math Utilities
Airwack v2.0
Quadratic Solver
83Quad v2.5.2
Nice Ice v3.5
Quadremy
Quadsolve
Quadratic equation solver
ZQuadrat v1.2
Quad GS v1.1
ZQuadrat v1.3
Some Cool Programs
Math Master 4
Quadrad89
Mathematical Solvers v1.0
Quad GS v1.1
Quad GS v1.1
Math OS
ZQuadrat v1.3
Ultimate Quadratic Solver
Tiny Quadratic Equation Solver
Math Programs v1.09
Equation Solver
Six Useful Math Tools
Nice Ice v3.01
qform( )
TriQuad2
Quadratic Equation Solver
ZQuadrat v1.3
MathPack v2.0
Cheater v3.0
AndyMath 1.0
Yet Another Quadractic Solver
The Everything Program
Equation Solver
FormsPro v1.46: Math Class Just Got A Whole Lot Easier!
TI-Source Math Suite 2000, Second Series SR2
Math Help
Mathh version 5.00
Tisthammerw’s Algebra Toolkit v1.3
blueNote lite
Math super solver
Algebra II Toolbox v6.89
Formula Solver
Function Solver
Equation Solver
Algebra Solver v2.1
Algebra Solver v2.1
Algebra Solver v2.6
Algebra Solver v2.6
Chromium 1.1
Xion OS v.4.0 Beta Shell
~Garrett's Toolbox
The Ultimate Algebra II and Geometry Collection!!
2nd Degree Polynomial Solver
The Ultimate Algebra II and Geometry Collection!!
Ultimate Math Program 2
The ultimate solver
The New Equation Solver
Esolve 4
Unique Equation Solver v1.01 with engine
Algebra I/Geometry/Trigonometry
Superior 1.2

If there was a ticalc.org repository set up in the same way as, say, a Linux repository, it would be much easier. I'm forced to use "Search" to get files.

All I'll say is: there's a reason "get" prompts you before it downloads something...

Also, you can use CTRL + C to interrupt the current process.
« Last Edit: November 25, 2010, 12:12:27 am by TC01 »



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ticalc.org "Package Manager"
« Reply #9 on: November 25, 2010, 01:02:42 am »
I bet if you include all possible misspellings it jumps to 8000 ;D

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #10 on: November 25, 2010, 01:17:48 am »
 
Quote
Grayscale Quadratic Equation Solver

:o
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ticalc.org "Package Manager"
« Reply #11 on: November 25, 2010, 01:43:44 am »
That was a parody of all quadratic solvers on ticalc.org. Back then they even stopped allowing them in, but they allowed that one (quite ironically, it was the 100th one uploaded as well). There was a fake news on Omni about it and a fake forum called Quadratic Solvers Liberation Front was started. ;D

It was kinda like a sequel to my grayscale number guessing game, except the quadratic solver was made by Radical Pi (AKA Nyrax). :P

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #12 on: November 28, 2010, 05:27:26 pm »
Update!

I've completely changed the way this works.

Instead of searching ticalc.org using the websearch, it uses cached package lists (files.index and names.index). These cached files (which are why the download is larger) simply contain parsed forms of the master.index (each line of files.index has a path/filename on ticalc.org, each line of names.index has the name corresponding with the file on the same line in files.index). This means that for searches and counts (I added a "count" command), the script doesn't need the Internet. Searches are now pretty fast.

To download, obviously you need the Internet, but the script can pull the cached paths out of files.index, so no searching is involved.

Then, when you want to update the index files, you use the new "update" command- which parses master.index and recreates the names.index and files.index files. It will take some time to run, though.

The index files must be in the same directory as the script when you run it.

Also, I've uploaded this version to the Cemetech and ticalc.org archives (Omni doesn't have a folder for comp utilities).



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #13 on: November 29, 2010, 03:38:55 pm »
Odd.

I tried running this on my Fedora partition. At first, the output from running "calcpkg.py list" was screwy, but it still worked (it was still able to download packages fine when I ran "calcpkg.py get").

Then I ran an update to rewrite the package index files and the output looked normal.

So all I can say is, run a "calcpkg.py update" before anything else when trying it on Linux.



The userbars in my sig are links embedded links.

And in addition to calculator (and Python!) stuff, I mod Civilization 4 (frequently with Python).

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ticalc.org "Package Manager"
« Reply #14 on: November 29, 2010, 11:58:51 pm »
I like the update, hopefully this should put less load on the server. Also I saw this was uploaded and approved on ticalc.org so I guess they're now fine. I guess it's because they're on a better server now.