You are not logged in.
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.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
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 firefoxWhat 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
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.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
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
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
iphitus
Offline
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
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.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline