Linux installation notes (tested under Ubuntu 12.04LTS), assuming VirtualBox is installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
from os.path import exists | |
def loopJsonFiles(): | |
directory = os.fsencode('data') | |
for file in os.listdir(directory): | |
filename = os.fsdecode(file) | |
if filename.endswith(".json"): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Ingest script to import all the data in the complete directory into solr | |
*/ | |
include('ingest.php'); | |
class Import_all_data_to_solr { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Transform the json data to solr xml | |
* clean the data | |
* ingest into solr | |
*/ | |
class Ingest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For more options and information see | |
# http://www.raspberrypi.org/documentat... | |
# Some settings may impact device functionality. See link above for details | |
# uncomment if you get no picture on HDMI for a default "safe" mode | |
#hdmi_safe=1 | |
# uncomment this if your display has a black border of unused pixels visible | |
# and your display can output without overscan | |
disable_overscan=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+------------------------------------------------------------------+--------------------+ | |
| Publisher | Number of articles | | |
+------------------------------------------------------------------+--------------------+ | |
| Evening Express | 3343 | | |
| Weekly Mail | 286 | | |
| The Cardiff Times | 193 | | |
| Flintshire Observer Mining Journal... | 141 | | |
| South Wales Daily News | 131 | | |
| Rhyl Record and Advertiser | 111 | | |
| The Aberystwith Observer | 107 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+------------------------------------------------------------------+--------------------+ | |
| Publisher | Number of articles | | |
+------------------------------------------------------------------+--------------------+ | |
| Evening Express | 3343 | | |
| Weekly Mail | 286 | | |
| The Cardiff Times | 193 | | |
| Flintshire Observer Mining Journal... | 141 | | |
| South Wales Daily News | 131 | | |
| Rhyl Record and Advertiser | 111 | | |
| The Aberystwith Observer | 107 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ls | while read -r FILE | |
do | |
mv -v "$FILE" `echo $FILE | tr ' ' '_' | tr -d '[{}(),\!]' | tr -d "\'" | tr '[A-Z]' '[a-z]' | sed 's/_-_/_/g'` | |
done |