Political Memory Software : Différence entre versions

De La Quadrature du Net
Aller à la navigationAller à la recherche
 
(5 révisions intermédiaires par 2 utilisateurs non affichées)
Ligne 2 : Ligne 2 :
 
<div class="LanguageLinks"><table width="100%"><tr valign="top" style="background: #EEF3E2"><td style="width: 25px; padding-left: 0.5em;">[[Image:Geographylogo.png|25px|Languages]]</td><td style="padding: 1px 1em 0; background: #F6F9ED;">'''[[Political_Memory_Software|English]]''' - '''[[Memoire_politique_infrastructure_informatique|Français]]'''</td></tr></table></div>
 
<div class="LanguageLinks"><table width="100%"><tr valign="top" style="background: #EEF3E2"><td style="width: 25px; padding-left: 0.5em;">[[Image:Geographylogo.png|25px|Languages]]</td><td style="padding: 1px 1em 0; background: #F6F9ED;">'''[[Political_Memory_Software|English]]''' - '''[[Memoire_politique_infrastructure_informatique|Français]]'''</td></tr></table></div>
  
==[[Political_Memory|Political Memory]] : Implemented Software Framework==
+
==This is the old version of the Political Memory, we don't use it anymore, the source of the new version are here: https://gitorious.org/memopol2-0 the instance here: https://memopol.lqdn.fr/ and the bug tracker system here: https://projets.lqdn.fr/projects/mempol==
  
Pages on this wiki related to [[Political_Memory|Political Memory]] are based upon a Berkeley DB XML database (BDB XML). Some Perl scripts are run to create this database, to extract informations from this database in order to crate wiki pages, or to update this database from updates made on the wiki pages. Hence these wiki pages can be viewed as a ''frontend'' to this database. However there is no real time synchonizations between the database and the wiki pages. Updates of the wiki from the database, and conversely, are frequently made in a semi-automatic way.
+
'''<span style="color:red">WE DON'T USE THIS VERSION OF MEMOPOL ANYMORE</span>'''
  
The [[:media:Skeleton_memoire_politique.tgz|directory tree]], and [[:media:Scripts_memoire_politique.tgz|Perl scripts]] can be downloaded freely, as well as the following dumps of BDB XML 'containers'':
+
==[[Political_Memory|Political Memory]]: Implemented Software Framework==
* [[:media:En_meps_dump_memoire_politique.tgz|''container'' for MEPs]]
+
 
* [[:media:En_votes_dump_memoire_politique.tgz|''container'' for the votes]]
+
Pages on this wiki related to [[:Category:Political_Memory|Political Memory]] are based upon a Berkeley DB XML database (BDB XML). Some Perl scripts are run to create this database, to extract informations from this database in order to create wiki pages, or to update this database from updates made on the wiki pages. Hence these wiki pages can be viewed as a ''frontend'' to this database. However there is no real time synchronizations between the database and the wiki pages. Updates of the wiki from the database, and conversely, are frequently made in a semi-automatic way.
 +
 
 +
The [http://www.sedrati-dinet.net/tmp/skeleton_memoire_politique.tgz directory tree], and [http://www.sedrati-dinet.net/tmp/scripts_memoire_politique.tgz Perl scripts] can be downloaded freely, as well as the following dumps of BDB XML 'containers'':
 +
* [http://www.sedrati-dinet.net/tmp/en_meps_dump_memoire_politique.tgz ''container'' for MEPs]
 +
* [http://www.sedrati-dinet.net/tmp/en_votes_dump_memoire_politique.tgz ''container'' for the votes]
  
 
'''All scripts are licensed under [http://www.gnu.org/licenses/gpl.html GNU General Public License version 3 or higher].'''
 
'''All scripts are licensed under [http://www.gnu.org/licenses/gpl.html GNU General Public License version 3 or higher].'''
Ligne 17 : Ligne 21 :
 
* [http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html Download Berkeley DB XML].
 
* [http://www.oracle.com/technology/software/products/berkeley-db/xml/index.html Download Berkeley DB XML].
 
* [http://www.oracle.com/technology/documentation/berkeley-db/xml/ref_xml/xml_unix/intro.html Install BDB XML] with Perl support (<code>sudo sh buildall.sh --enable-perl</code>)
 
* [http://www.oracle.com/technology/documentation/berkeley-db/xml/ref_xml/xml_unix/intro.html Install BDB XML] with Perl support (<code>sudo sh buildall.sh --enable-perl</code>)
* Untar dump of the database (<code>tar zxvf dumps_memoire_politique.tgz</code>)
+
* Untar dumps of the database:
 +
** <code>tar zxvf en_meps_dump_memoire_politique.tgz</code>
 +
** <code>tar zxvf en_votes_dump_memoire_politique.tgz</code>
 
* Load the following ''containers'' from this tarball:
 
* Load the following ''containers'' from this tarball:
 
** ''container'' for MEPs: <code>dbxml_load -h <target_directory> -f dumps/en_meps.dump en_meps.dbxml</code>
 
** ''container'' for MEPs: <code>dbxml_load -h <target_directory> -f dumps/en_meps.dump en_meps.dbxml</code>
Ligne 38 : Ligne 44 :
  
 
* <code>load_xml2dbxml.pl</code>: Load XML files passed as arguments into a BDB XML container.
 
* <code>load_xml2dbxml.pl</code>: Load XML files passed as arguments into a BDB XML container.
* <code>en_update_opinions.pl</code>: Update a MEP's opinions from her wiki page into a BDB XML container.
+
* <code>update_opinions.pl</code>: Update a MEP's opinions from her wiki page into a BDB XML container.
 
* <code>vote_update_meps.pl</code>: update MEPs' voting results into a BDB XML container.
 
* <code>vote_update_meps.pl</code>: update MEPs' voting results into a BDB XML container.
  
Ligne 57 : Ligne 63 :
 
====Wiki Pages Update====
 
====Wiki Pages Update====
  
* <code>en_upload_mediawiki.pl</code>: upload wiki pages passed as arguments.
+
* <code>upload_mediawiki.pl</code>: upload wiki pages passed as arguments.
 
* <code>upload_img.pl</code>: upload pictures passed as arguments.
 
* <code>upload_img.pl</code>: upload pictures passed as arguments.
 +
[[Category:Political_Memory]]

Version actuelle datée du 1 octobre 2012 à 22:16

This is the old version of the Political Memory, we don't use it anymore, the source of the new version are here: https://gitorious.org/memopol2-0 the instance here: https://memopol.lqdn.fr/ and the bug tracker system here: https://projets.lqdn.fr/projects/mempol

WE DON'T USE THIS VERSION OF MEMOPOL ANYMORE

Political Memory: Implemented Software Framework

Pages on this wiki related to Political Memory are based upon a Berkeley DB XML database (BDB XML). Some Perl scripts are run to create this database, to extract informations from this database in order to create wiki pages, or to update this database from updates made on the wiki pages. Hence these wiki pages can be viewed as a frontend to this database. However there is no real time synchronizations between the database and the wiki pages. Updates of the wiki from the database, and conversely, are frequently made in a semi-automatic way.

The directory tree, and Perl scripts can be downloaded freely, as well as the following dumps of BDB XML 'containers:

All scripts are licensed under GNU General Public License version 3 or higher.

Database Setup

  • Untar directory tree tarball (tar zxvf skeleton_memoire_politique.tgz)
  • Download Berkeley DB XML.
  • Install BDB XML with Perl support (sudo sh buildall.sh --enable-perl)
  • Untar dumps of the database:
    • tar zxvf en_meps_dump_memoire_politique.tgz
    • tar zxvf en_votes_dump_memoire_politique.tgz
  • Load the following containers from this tarball:
    • container for MEPs: dbxml_load -h <target_directory> -f dumps/en_meps.dump en_meps.dbxml
    • container for the votes : dbxml_load -h <target_directory> -f dumps/en_votes.dump en_votes.dbxml

You can access to this database with shell (dbxml) provided by BDB XML (see tutorial) or by writing your own programs in C++, Java, Perl, Python, PHP or Tcl. Of course, the Perl scripts described below can be use as examples.

Scripts Descriptions

Informations about command line arguments and options of each script are described by simply passing the option ./<script> --help (or ./<script> -h).

Les scripts Perl sont simplement installés en décompressant leur archive (tar zxvf scripts_memoire_politique.tgz)

Database Initialization

  • en_fetch_mep_infos2xml.pl: Fetch all MEPs' informations from the European Parliament website. Every MEP's informations are saved into an XML file, MEPs' pictures are also downloaded.
  • en_rollcall2xml.pl: From a text file produced with a copy/paste from the PDF file listing rollcall votes at the European Parliament, produce the corresponding XML file. The XML file should then be completed by hand to add some descriptions of amendments, voting recommendations, etc.

Database Update

  • load_xml2dbxml.pl: Load XML files passed as arguments into a BDB XML container.
  • update_opinions.pl: Update a MEP's opinions from her wiki page into a BDB XML container.
  • vote_update_meps.pl: update MEPs' voting results into a BDB XML container.

Wiki Pages Extraction

  • en_all_meps_xmldb2mediawiki.pl: Create wiki pages for all MEPs from a BDB XML container.
  • en_mep_xmldb2mediawiki.pl: Create the wiki page for a MEP from a BDB XML container.
  • en_vote_xmldb2mediawiki.pl: Create wiki pages related to a vote from a BDB XML container.

Searching Wiki Pages Creation

  • en_meps_by_name.pl: Create wiki page listing MEPs by alphabetical order from an XQuery query.
  • en_meps_by_country.pl: Create wiki page listing MEPs by country from an XQuery query.
  • en_meps_by_group.pl: Create wiki page listing MEPs by political group from an XQuery query.
  • en_meps_by_committee.pl: Create wiki page listing MEPs by committee from an XQuery query.
  • en_meps_by_office.pl: Create wiki page listing MEPs by office from an XQuery query.

Wiki Pages Update

  • upload_mediawiki.pl: upload wiki pages passed as arguments.
  • upload_img.pl: upload pictures passed as arguments.