Skip to content

PlanetHunt/nasaeol

Repository files navigation

NasaEOL

This is an experimental bot that downloads NASA EOL images and uploads them back to Wikimedia Commons. It is written mainly in Python and uses Pywikibot to upload data to MediWiki.

Requirements

sqlalchemy

To install Sqlalchemy on Ubuntu/Debian machine you need pip.
to install pip on Ubuntu/Debian use the following command:
sudo apt-get install python-pip
for other distros use the this link.
After installing pip use this command to install sqlalchemy.
sudo pip install sqlalchemy

pywikibot (as submodule included)

you have to update the submodule and one-time set-up of the pywikibot with your username.

BeautifulSoup and lxml

To parse the html pages on Nasa website, the application uses lxml and BS4
sudo apt-get install python-bs4 python-lxml

uwfraw

This is needed to convert "NEF" files to "jpeg" as Wikimedia Commons dose not accept NEF files.
sudo apt-get install ufwraw

pycurl

To Download files pycurl is extensively used in this application.
sudo apt-get install python-pycurl

pymsql

To manage database mysql back-end for sqlalchemy has been used.
To have sqlalchemy working with mysql you need to install pymsql.
sudo apt-get install python-mysql.connector python-mysqldb

mysql-server

A working mysql-server with a database is needed with this application. The work progress is saved in the database.

#Config The application reads .config file in the main folder as configuration.
It should be json file with following parameters.

{
  "db_setting": {
    "host": "localhost",
    "db": "test",
    "user": "eol",
    "pass": "pass"
  },
  "image_folder": "images",
  "progress_folder": "progress"
}

#Run python Eol.py

#TODO So there is a lot to do. This project just works but need a lot of work.

  • Writing test-case
  • System-wide Configuration
  • Removing Duplicate codes (It exists)
  • Replacing BeautifulSoup with lxml for the whole code.
  • Better logging
  • regex for pywikibot Uploader

#License CC-BY-SA

Releases

No releases published

Packages

No packages published

Languages