You are not logged in.

#1 2006-02-01 20:30:46

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,848

Which prog language / coding environment for this program ?

For an online game i'm playing, i am keeping/posting stats. making those stats is a lot of manual work, so i am thinking of writing a program to automate the task as much as possible.
I have programming experience with assembly, Basic, Quickbasic (compiler version), Forth and Delphi, but all that was long ago.

The program should be able to do these things :

- run as a daily job under a specific normal user

- check if X is running, if not use startx to get X up

- create a subfolder named statsxxx in home/LoL-Stats
    xxx is to be replaced by a number

- fetch 9 internet pages with Firefox and save the pages as text files in that subfolder
   Due to limitations on the game site this will probably have to be done by feeding keystrokes to firefox

- extract table data from the text files and store it in csv format in the same subfolder

- import the csv files in an openoffice 2 ODS spreadsheet

- increase xxx for the next run

What prog language/ coding environment available for AL would be suitable ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#2 2006-02-01 21:21:30

copernikus
Member
From: Philadelphia, PA
Registered: 2005-12-09
Posts: 16

Re: Which prog language / coding environment for this program ?

Lone_Wolf wrote:

The program should be able to do these things :

- fetch 9 internet pages with Firefox and save the pages as text files in that subfolder
   Due to limitations on the game site this will probably have to be done by feeding keystrokes to firefox


What prog language/ coding environment available for AL would be suitable ?

Umm, pretty much any program language should handle a majority of the things you need.

I would look into perl and use some of the www modules on cpan for getting the information off a web page (avoiding the use of starting X and firefox).

But, Java, C/C++, Python could easily handle the list you want to accomplish as well.

Basically, comes down to what you want to learn.

Offline

#3 2006-02-01 21:49:07

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,848

Re: Which prog language / coding environment for this program ?

I prefer a program language that allows to make easily understandable code, structured programming and flexibility.
The main functions/structure of a program should be understandable in a short time, regardless of who wrote it.

Delphi 2 & 3 with the OOP pascal and RAD gui was  great, but they changed from an general purpose language to a Database centered approach.

from what i have seen of C/C++ code, it is not very readable.

Perl modules on CPAN seem to lack a decent structure, the categories there are far too general.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2006-02-02 10:13:15

postlogic
Member
Registered: 2005-02-24
Posts: 410
Website

Re: Which prog language / coding environment for this program ?

I'd go for Python on this one. This is purely my opinion, however.

Data formatting and handling in Python is awesome, and it's a very structural language.

Offline

#5 2006-02-02 10:42:29

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Which prog language / coding environment for this program ?

No way, this is quite simply a bash script waiting to be written.

Run as a cronjob.

Use of pgrep to check if X is running, then start X.

mkdir for the folders, number can be loaded from a file.

if possible, fetch the pages with wget instead of firefox.


then maybe use python to convert the text to CSV if it isnt already.

then back to the shell script to open the newly generated csv files in OOo.

shell script takes current number, increases and writes it to the file to be loaded next run.

these are in direct response to the above actions listed. Good luck smile

iphitus

Offline

#6 2006-02-02 15:59:32

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Which prog language / coding environment for this program ?

iphitus wrote:

No way, this is quite simply a bash script waiting to be written.

True, perhaps, but in my experience, bash scripts are scripts waiting to be rewritten in Python. Right Penguin?

Dusty

Offline

#7 2006-02-02 20:56:22

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,848

Re: Which prog language / coding environment for this program ?

I checked out python.org and liked what i saw.

Since i would like to make pkgbuilds in the future, i'll try to combine bash and python.

Thanks for the help.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB