FOSS Projects

Suneha: SMS service at GNDEC

Get presentation and report. Project hosted at Sarovar.Org. Entry on FreshMeat.Net.

Office Automation

Get presentation and report. Project hosted at Sarovar.Org. Entry on FreshMeat.Net.

Automated CAD

Get presentation and report. Project hosted at Sarovar.Org. Entry on FreshMeat.Net.

General Search

Get presentation and report.

Open Street Map @ GNDEC

Get presentation, report, and source of presentation.

Unified Documentation

Get presentation, report, report and source of files in LaTeX.

More

Get presentation and report.

OSV: RoR

apt-get update
apt-get install ruby-full build-essential joe git gem rake rails

sudo gem install -v=2.3.4 rails
sudo rake gems:install

sudo gem install -v=2.3.5 rails
sudo rake gems:install

joe config/database.yml

git clone https://github.com/johnmckerrell/OpenStreetView.git
git clone git://github.com/johnmckerrell/OpenStreetView.git

sudo aptitude build-dep git-coresudo aptitude build-dep git-core
wget http://kernel.org/pub/software/scm/git/git-1.7.1.tar.gz
tar xvzf git-1.7.1.tar.gz
cd git-1.7.1
./configure
make
make install
git –version
cd ..
rm -rf git-1.7.1*

SUP: Text based ultimate mail client

SUP: What’s up?
Home Page, Under Ubuntu, there is package sup-mail, install it. Configure it using:

sup-config

Answer all question, if you are using gmail, then consult gmail’s help page. This process results in configuration file /home/UserName/.sup/config.yaml

I used editor “joe”, you may use editor of your choice like Vim, Emacs or Pico.

Mine file is ( /home/hsrai is Home folder):


---
:thread_by_subject: false
:confirm_no_attachments: true
:accounts:
:default:
:signature: /home/hsrai/.signature
:email: falseEmail.Org.Com@gmail.com
:alternates: []

:name: HSRai
:sendmail: msmtp --account=DotOrgDotCom -t
:edit_signature: true
:editor: /usr/bin/joe
:confirm_top_posting: true
:ask_for_to: true
:discard_snippets_from_encrypted_messages: false
:ask_for_cc: true
:default_attachment_save_dir: ""
:ask_for_bcc: false
:poll_interval: 300
:ask_for_subject: true
:sent_source: sup://sent

Install msmtp, and configure it. Mine configuration file (/home/hsrai/.msmtprc) is:


#Set default values for all following accounts.
defaults
logfile ~/Mail/.msmtp.log

# My SMTP
account DotOrgDotCom
host smtp.gmail.com
port 587
from falseEmail.Org.Com@googlemail.com
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user falseEmail.Org.Com@googlemail.com
password k*e*e*p*I*T*s*e*c*r*e*t*

# Set a default account
account default : DotOrgDotCom

Change permissions:
chmod 600 ~/.msmtprc

Manage certificates.

Make a file named test.mail, with content

To: second@gne.com
From: first@gne.com
Subject: Test from command line

Hello, this is a test. Don't forget to change email ID in To and From above. These may be your two email IDs

and test email delivery by:
msmtp --account=foobar -t < test.mail

User Guide, replace “sup” with “sup-mail” in second line, helpful link1, SUP wiki, Mutt + GMail, more about certificates, SUP ReadMe, FAQs

GRASS: Making contours

Launch GRASS.

========================
osm@cedHOD:~/Downloads/OSM$ pwd
/home/osm/Downloads/OSM
========================

Define new location with “Projection Value”, location: golf, esc, enter, y, y, a, enter, Description, enter, 3000, 1500, 1500, 3000, 1, enter, 1, enter, esc, enter …

Batch file (run as: sh filename_batchFile):

v.in.ascii -z x=2 y=1 z=3 –overwrite input=golf2.csv output=fieldData
v.build –overwrite map=fieldData
#g.region vect=fieldData
v.surf.rst –overwrite input=fieldData layer=0 elev=DTM1
r.contour –overwrite input=DTM1 output=contourVec1 step=1 cut=0
r.contour –overwrite input=DTM1 output=contourVec2 step=.5 cut=0
d.mon x0
d.rast map=DTM1
d.vect map=contourVec1 display=shape,zcoor
d.vect map=contourVec2 display=shape
#v.in.ascii -z x=2 y=1 z=3 –overwrite input=BhartiBoundry5.csv output=plot
v.out.dxf input=vectorFile output=autocadFile.dxf

Data file:

2667.400|2384.480|102.830
2639.870|2341.590|103.810
2601.640|2407.550|100.520
2436.360|2540.180|100.200
2565.740|2468.540|100.170
2571.860|2455.370|99.640
2511.100|2519.570|100.170

Downloading GPS tracks

On Ubuntu powered PC:

gpsbabel -i garmin -f usb: -o gpx -F blah.gpx
sudo gpsbabel -i garmin -f usb: -o gpx -F blah.gpx
sudo gpsbabel -t -i garmin -f usb: -o gpx -F blahTracks.gpx
sudo gpsbabel -w -t -i garmin -f /dev/ttyUSB0 -o gpx -F geekoBothRamGrahMarriage.gpx
sudo gpsbabel -w -t -i garmin -f usb: -o gpx -F ggpsMap76csxBothRamGrahMarriage.gpx

pdf Merge

Bash script:

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=$1.pdf -dBATCH $2 $3 $4 $5

Example:

pdfmerge nameOfCombinedFileWithoutExtention fileOne.pdf fileTwo.pdf
pdfmerge aPlusB a.pdf b.pdf [will produce aPlusB.pdf]

Required software may be installed using:

sudo apt-get install gs pdftk

Setting OSM server

http://weait.com/content/build-your-own-openstreetmap-server

http://weait.com/content/make-your-first-map

http://www.perrygeo.net/wordpress/?p=49

http://wiki.openstreetmap.org/wiki/Creating_your_own_tiles

http://openlayers.org/doc/

http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example

http://codebrainz.ca/index.php/2009/09/27/installing-mapnik-and-friends-on-ubuntu-904/

http://trac.mapnik.org/wiki/UbuntuInstallation

sudo apt-get update
sudo apt-get upgrade

Packages are available in the ‘universe’ repositories so make sure your /etc/apt/sources.list has the below lines:

deb http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe

sudo apt-get install python-cairo libmapnik0.6 mapnik-utils python-mapnik

Install postgres 8.3 and postgis or latest (for latest apt-get will not help, do it manually).

Install Postgres 8.4 + PostGIS 1.4 (see below)

postgis package is not available for postgres-8.4, so install it from source…
wget http://postgis.refractions.net/download/postgis-1.4.0.tar.gz
tar xzf postgis-1.4.0.tar.gz
cd postgis-1.4.0
./configure && make && sudo make install

To test mapnik:

$ Python
>>> import mapnik
>>>

* No output is good. If you get errors about missing libs make sure ‘usr/local/lib’ is in /etc/ld.so.conf: