How to add New Companies in "Protoborsa"

Asked by Navin Talati

Sir,
I installed the "PROTOBORSA" in my system. I am from India.
I want to add some more companies excellently performing.
and also wants to incorporate currency in Rupees and not in
dollors. How it could be added to protoborsa?
Please guide and help me.
Navin Talati / 7-9-2012

Question information

Language:
English Edit question
Status:
Needs information
For:
protoborsa Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
arochester (arochester) said :
#1

You might look at: "No support for countries other than USA" - https://bugs.launchpad.net/protoborsa/+bug/1040191

Revision history for this message
Navin Talati (n-m-talati) said :
#2

Is there not any method/way out to add Indian Companies into the base-list of PROTOBORSA ? I referred the above link for BUG and could little understand that it may be possible to creat some link in the concerned link directory. Technically I do not know - being it my limitation.
If some way is there, please let me know the step-by-step procedure to add it.
Navin Talati / 05-11-2012

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

Based on information in the bug report, and a quick searck in the source code, I think the following might work:

Install sqlite, in case you do not have it on your system yet (sudo apt-get install sqlite)

open a command prompt and issue the command
sqlite ~/.protoborsa/stocksymbols.db
This should open your current stock symbol database

inside sqlite enter this command:

insert into "Symbols" values ('BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.');

(add more symbols as you like, changing the values as you need; do not forget the semicolon at the end of the line!)

close sqlite with the command
.exit

If my assumption is correct, you should then be able to see BHEL.BO inside the program.
(Disclaimer: I do not have protoborsa installed on my own system, I have not tried that myself, I have composed thses instructions based on theoretical knowledge.)
If this procedure does not work, or if you receive error messages please post the details.
There is also the possibility to do a mass upload of data to sqlite with the .import command, please see the sqlite documentation for details.

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Sorry, first error detected: the package and the command must be sqlite3 instead of sqlite

Revision history for this message
Navin Talati (n-m-talati) said :
#5

friends'
I tried followingt way:-
------------------------------------------------------------------------------------------------------------------------
Following packages were existing pertaining to “sqlite” as per SPM:

libdbd-sqlite3-perl 1.37-1
libsqlite3-0 3.7.13-1
libsqlite0 2.8.17-7fakesync1build1
python-sqlite 1.0.1-9
libqt4-sql-sqlite 4:4.8.3+dfsg-0ubuntu3

On applying stuff “sudo apt-get install sqlite” in the Terminas one more added:

sqlite 2.8.17-7fakesync1build1

Opened a Terminal and applied

sqlite ~/.protoborsa/stocksymbols.db

navin@navin:~$ sqlite ~/.protoborsa/stocksymbols.db
Unable to open database "/home/navin/.protoborsa/stocksymbols.db": file is encrypted or is not a database

then correction for “sqlite3” was made:

navin@navin:~$ sqlite3 ~/.protoborsa/stocksymbols.db
The program 'sqlite3' is currently not installed. You can install it by typing:
sudo apt-get install sqlite3

The concerned programme was installed as under:

navin@navin:~$ sudo apt-get install sqlite3
[sudo] password for navin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  dkms linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-pae
Use 'apt-get autoremove' to remove them.
Suggested packages:
  sqlite3-doc
The following NEW packages will be installed:
  sqlite3
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 28.2 kB of archives.
After this operation, 183 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ quantal/main sqlite3 i386 3.7.13-1 [28.2 kB]
Fetched 28.2 kB in 0s (38.8 kB/s)
Selecting previously unselected package sqlite3.
(Reading database ... 403997 files and directories currently installed.)
Unpacking sqlite3 (from .../sqlite3_3.7.13-1_i386.deb) ...
Processing triggers for man-db ...
Setting up sqlite3 (3.7.13-1) ...
navin@navin:~$ sqlite3 ~/.protoborsa/stocksymbols.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> ('BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.');
Error: near "(": syntax error

Correction was made as under and syntex errors were removed as under:

sqlite> 'BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.'
   ...>
   ...> exit

Here the process stops. Nothing was proceeding despite of keeping the terminus open for a pretty long time.
-------------------------------------------------------------------------------------------------------------------

Please guide further. Am I making any mistake/error?
Thanks
navin Talati /09-11-2012

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

The command that you have to give inside sqlite3 at the "sqlite>" prompt is the following one:

insert into "Symbols" values ('BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.');

Please try again and report the outcome.

Revision history for this message
Navin Talati (n-m-talati) said :
#7

Sir, Sqliteman is installed. I can launch it. It opens but there is nothing like "Symbol" in it. Secondly all icons are inactive in the window, mso I am getting confused ! Would you please once again guide me stepwise -what to do and how to proceed in entering the data and link it with Protoborsa jus by giving actual examples of 2-3 indian companies ?
Navin Talati / 16-11-2012

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

You have to give the complete line as one command inside sqlite3, starting with the words "insert into" and ending with the semicolon character!

step by step:

make sure you have this text visible somewhere on your screen.

Open a terminal (by simultaneously pressing ctlt-alt-t)

inside the terminal window enter the command
sqlite3 ~/.protoborsa/stocksymbols.db

This will reply with some details about sqlite and then change the prompt to "sqlite>"

switch back to this text and mark with your mouse the following text snippet (that it is shown in reverse colour):

insert into "Symbols" values ('BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.');

switch back to the window with sqlite
point with your mouse to the "sqlite>" prompt and press the middle mouse button
(this should insert the complete command line into sqlite)

press enter

If you are still at the "sqlite>" prompt enter the command
.exit
(with a dot at the beginning!)

this should return to the command prompt.

After that please select all output (from the menu use "edit - select all"), copy everything (edit - copy) and paste into a new message of this question thread.

Revision history for this message
Navin Talati (n-m-talati) said :
#9

Thank you sir for a very simplified instruction.
The all output required by you is as under:
----------------------OUTPUT------------------------------------------------------------------------------------------------------------
navin@navin:~$ sqlite3 ~/.protoborsa/stocksymbols.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> insert into "Symbols" values ('BHEL.BO','Bharat Heavy Electricals Ltd.','bharat heavy electricals ltd.');
sqlite> .exit
----------------------------------------------------------------------------------------------------------------------------------------------
Please guide further.
Navin Talati /16-11-2012

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

Finally you have created a new entry in the database of protoborsa for the BHEL company.
When you now start protoborsa, can you select BHEL.BO?

Revision history for this message
Navin Talati (n-m-talati) said :
#11

On launchning Protoborsa, it shows some THREE companies' option by default. There is no BHEL.BO in it. Clicking "ADD" button, it allows us for adding optional companies. There is a list in this popup with symbol and company name. there is space to enter our desired comapany. On entering BHEL.BO in the given entering space, no such company appears in the list. So the BHEL.BO does not appear in the selection list.
On clicking "RELOAD" button it says:
Unable to connect to Yahoo Finance
Check your internet connection and press reload
.... and remains as such on the screen.
Please advise further.
Navin Talati /19-11-2012

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

I think in the search dialogue you have to search for the full name, not the symbol.
If you search for 'Bharat', can you add that company to your list and display its data?

Can you help with this problem?

Provide an answer of your own, or ask Navin Talati for more information if necessary.

To post a message you must log in.