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

0 Members and 2 Guests are viewing this topic.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #45 on: December 20, 2010, 06:00:45 am »
Well, what I was thinking is if you know at least one file in the latest files list, then you can get all of the unknown files from that list (I believe) and update your local database to reflect that.
Omnimaga Admin

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #46 on: January 08, 2011, 08:29:09 pm »
Making Assemblex taught me TONS of wxPython and I may give this another try sometime.

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 #47 on: January 08, 2011, 08:32:50 pm »
Cool to hear :D

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #48 on: January 25, 2011, 06:30:07 pm »
So... I know I haven't worked on any of my projects for ages: you can thank a certain game called Minecraft for that. :P

I've been thinking about Netham's idea of using the RSS to update, though. What I could do is add a "check" command which will read the RSS feed on the site. If the last file on the RSS feed is known (is found in the index), it will then go through the RSS, find all new files and add them to the local database.

The downside of doing this? I'd need to add a dependency- the feedparser module. It's a third-party Python library for RSS manipulation, and I'd need it to look at the entries in the feed. And I know dependencies can be annoying...

As for other things to add, one idea could be something with automatic extraction. Perhaps an opt to unzip all archive files it downloads? Or maybe even a search op to let you specify the file extension (search only for .zip and not, say, .tar.gz for Linux software, or only for Linux software).

The only reason I use ticalc.org rather than this sometimes is when I want to look at reviews- something this program doesn't show you. I'd want to add an "info" command to post a link to the file info page... unfortunately I'm not sure what the best way to get the file info page would be- the index file only has the direct link to the file. Any ideas?
« Last Edit: January 25, 2011, 06:30:14 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 #49 on: January 28, 2011, 09:44:34 pm »
Hmm good question... I wish ticalc index file included file info pages...

As for the other features they seem interesting. I'M glad to see you around again too.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #50 on: February 05, 2011, 10:18:55 pm »
Well, since apparently the ticalc.org RSS system is a little screwy (according to Travis on Cemetech), I've decided to release 0.8 now. The full changelog:

-Added a fake "install" command that does the same thing as "get"

-Added an option to search by file extensions (like .zip or .tar.gz)

-Added an option to extract all .zip archives on download, named like:

   "83plus-asm-games-generate-zip"

-Added an option to only print the version and then exit

-Clean command will now remove files created by the extraction option

-Fixed a bug when using the get command with search options where it downloaded as if the opts weren't specified

It's currently attached to the first post of this thread; when it gets through the Cemetech/ticalc.org download queues you will be able to get it there.



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 #51 on: February 06, 2011, 02:27:07 am »
Hmm I see. Sorry to hear about their RSS issues. X.x

Anyway nice features addition :D

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #52 on: February 18, 2011, 10:00:49 am »
Well, not sure if you're still working on this, but what about unzipping the programs we choose to download?

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 #53 on: February 22, 2011, 07:50:29 am »
-Added an option to extract all .zip archives on download, named like:

   "83plus-asm-games-generate-zip"
Support's here for .zip, it seems, Scout ;) However, that doesn't mean there's .tar.gz support yet, I'd assume.
"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 Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #54 on: February 23, 2011, 10:01:42 am »
-Added an option to extract all .zip archives on download, named like:

   "83plus-asm-games-generate-zip"
Support's here for .zip, it seems, Scout ;) However, that doesn't mean there's .tar.gz support yet, I'd assume.

Oh thanks calcdude, I didn't notice it :P

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 #55 on: February 25, 2011, 12:43:39 am »
That would be a good addition, since there are such files on ticalc.org.  That's the main Linux zipping format, right?

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #56 on: February 25, 2011, 12:47:47 am »
Yes, but its not exactly painful for us linux lovers to use zips, or pretty much anything :P when I see tar.gz I think of a source file, since most things I dl come in zips.


EDIT: seriously though, I can compress and extract install EXEs for their contents. ;) Zips are nothing.
« Last Edit: February 25, 2011, 12:48:57 am by willrandship »

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 #57 on: February 28, 2011, 02:03:21 am »
Ah ok. Personally i like zip and rar, but I use zip more because most computers can open zip files by default.

Offline TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #58 on: August 26, 2011, 12:31:17 pm »
So, I finally remembered that tev suggested parsing the file's category page to get the info page for a file.

So, this morning, I wrote code to do just that, modelling the output on yum's info command. Here's some sample output. I didn't feel like making a screenshot, so I copy-pasted my terminal output into a code tag.

Code: [Select]
$ ./calcpkg.py info "Wacky Fun Random Numbar Generator Operating System"
 
Name          : Wacky Fun Random Numbar Generator Operating System
Author        : Michael Vincent ([email protected])
Category      : DOS Utilities
Date Uploaded : Tue Aug 10 15:23:59 2004
File Size     : 17,780 bytes
Documentation : Yes
Source Code   : Yes
Description   : The fun of Wacky Fun Random Numbar Generator returns with this complete operating system, handwritten in x86 assembly. This is the epitome of must-download files.

$ ./calcpkg.py info -g -c 83plus "Wacky Fun Random Numbar Generator"
 
Name          : Wacky Fun Random Numbar Generator v1.00000069
Author        : Nick Disabato ([email protected])
Category      : TI-83/84 Plus Assembly Games
Date Uploaded : Mon Aug  9 01:59:46 2004
File Size     : 2,736 bytes
Documentation : No
Source Code   : Yes
Description   : DOOOOOD THIS PROGRAM IS THE GREATEST L@@K MUST DOWNLOAD!!! A-1 SUPER!! YESSSSS! RUN WITH ASM() AT HOMESCREEN!!!!

Name          : Wacky Fun Random Numbar Generator v1.00000069
Author        : Nick Disabato ([email protected])
Category      : TI-83/84 Plus BASIC Games (Chance/Guessing)
Date Uploaded : Wed Jul 26 03:50:32 2000
File Size     : 1,835 bytes
Documentation : Yes
Source Code   :
Description   : DOOOOOD THIS PROGRAM IS THE GREATEST L@@K MUST DOWNLOAD!!! A-1 SUPER!! YESSSSS!


As you can see, "info" takes all the same arguments as get/install and search/list.

The one thing I haven't done is make it handle multiple authors (which is why I'm not releasing right now). And because it does HTML parsing (whereas most of the other commands use the local index files), if you ask for info on multiple files at once it will be slow.

Also, before, the file's line encoding was Windows, which meant that you couldn't run './calcpkg.py', you needed to run 'python calcpkg.py'. Now, the output is Unix and both invocations work fine.


And also, I finally read the above posts (:P), and I'll look at adding auto-un-tar support too.
« Last Edit: August 26, 2011, 12:33:36 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 TC01

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 344
  • Rating: +9/-0
    • View Profile
Re: ticalc.org "Package Manager"
« Reply #59 on: August 26, 2011, 09:40:23 pm »
About nine hours later... I've released version 1.0!

It's available from ticalc.org here for Windows and here for Linux.

As part of this release, I completely restructured the program. Before, it was a little clunky- there was one Python script, you had to have it in the same directory as the index files and where things were downloaded to. After doing the above, I rewrote the script so there was a script (calcpkg) and a Python package (ticalcDotOrg).

So what does that mean? Well, for one, you don't need to worry about where the index files are anymore. And the system now automatically downloads to your home downloads folder- so on Windows that would be C:\Users\username\Downloads, and on Linux that's /home/username/Downloads.

It also means you don't need to type "python calcpkg.py" anymore, you can just type "calcpkg.py". (On Linux, I removed the ".py" suffix, so you didn't have to type "calcpkg.py" and could just type "calcpkg". However, Windows apparently didn't like that, so for Windows it's still called calcpkg.py.)

And I did get the install command to automatically extract tar-compressed files too.

To install calcpkg, you have a large number of options. On Windows, you can run either of the executables (one is for win32, one is for amd-win64, or 64-bit), or you can extract the zip archive and run "python setup.py install". On Linux, I've provided an RPM package for Fedora, OpenSUSE, Mandriva, etc. users. Python can actually automatically make rpm packages, which is a nice feature (especially since I use Fedora :) ). Unfortunately, there is no such support for making .deb packages (at least, not in the official distutils). So users of other Linux systems will have to extract the .tar.gz file and run "python setup.py install".



The userbars in my sig are links embedded links.

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