473,597 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

webpage bookmark program in C

I have been learning C and want to write a program and need someone to
point me in the write direction.
I want to write a program to store all my webpage bookmarks in
possibly one file. I want it to be a GUI. The webpage addresses will
be viewed in a tree-like structure eg.
Search Engines
- Google
- Yahoo
News
- BBC
- CNN
So it will be a small database of a few fields. I can add and remove
webpage addresses easily and the topics as well eg Search Engines,
News.
Can I have it as one .exe file storing the code and data together?
That way it is very portable.
Should I use linked list indexes? How should I store the data? I know
i can connect it to a backend database but I want to avoid this. And I
want to do it only in C.
I just need to be pointed in the right direction. I have a copy of
Borland C++.
Can anyone give me an idea of how to start this?

Thanks,
Chris
Nov 14 '05 #1
6 2033
Chris wrote:

I have been learning C and want to write a program and need
someone to point me in the write direction.
I want to write a program to store all my webpage bookmarks
in possibly one file. I want it to be a GUI. The webpage
addresses will be viewed in a tree-like structure eg.

.... snip ...

Very simple. Use Netscape (or Mozilla). Bookmarks are kept in an
html file. However the subject is Off Topic on c.l.c.

--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

Nov 14 '05 #2
ch*******@hotma il.com (Chris) wrote:
# I have been learning C and want to write a program and need someone to
# point me in the write direction.
# I want to write a program to store all my webpage bookmarks in
# possibly one file. I want it to be a GUI. The webpage addresses will
# be viewed in a tree-like structure eg.

I would suggest not using C. There are other languages like Tcl/Tk which
can do this far easier and far more portably than C.

# Can I have it as one .exe file storing the code and data together?
# That way it is very portable.

That would be using something like a Macintosh resource fork. Not every
operating system provides such beasts, and those that do are very system
specific. To actually modify the relocatable itself is perilous and
requires detailed knowledge of the executable format.

Again, with script languages like Tcl or Perl the executable is text file,
and it is easier and safer to modify these text files.

# Should I use linked list indexes? How should I store the data? I know
# i can connect it to a backend database but I want to avoid this. And I
# want to do it only in C.

In most scripting languages, you have associative arrays (similar to
hash tables) built into the language, and you can use these as a database.

# I just need to be pointed in the right direction. I have a copy of
# Borland C++.

If you want an didactic exercise, you can restrict yourself particular
GUI framework on a particular machine. You might also check with a c++
group, because I think c++ has an extensive library of data structures
including hash table, search trees, and methods to input and output
them.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
The whole world's against us.
Nov 14 '05 #3
ch*******@hotma il.com (Chris) wrote in message news:<cf******* *************** ****@posting.go ogle.com>...
I have been learning C and want to write a program and need someone to
point me in the write direction.
I want to write a program to store all my webpage bookmarks in
possibly one file. I want it to be a GUI. The webpage addresses will
be viewed in a tree-like structure eg.
Search Engines
- Google
- Yahoo
News
- BBC
- CNN
So it will be a small database of a few fields. I can add and remove
webpage addresses easily and the topics as well eg Search Engines,
News.
Can I have it as one .exe file storing the code and data together?
That way it is very portable.
Should I use linked list indexes? How should I store the data? I know
i can connect it to a backend database but I want to avoid this. And I
want to do it only in C.
I just need to be pointed in the right direction. I have a copy of
Borland C++.
Can anyone give me an idea of how to start this?

Thanks,
Chris


Anyone else got any thoughts on this? I beleive it can be done and it
will be done in C. I just need to be pointed in the right direction.
Maybe I will have to make a sacrifice eg the data and the executable
are 2 seperate files.

Thanks,
Chris
Nov 14 '05 #4
Chris <ch*******@hotm ail.com> spoke thus:
Anyone else got any thoughts on this? I beleive it can be done and it
will be done in C. I just need to be pointed in the right direction.
Maybe I will have to make a sacrifice eg the data and the executable
are 2 seperate files.


These links will help you understand why it cannot be done in standard
C, the subject of this newsgroup:

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

In particular, you will have to go elsewhere for any discussion of the
GUI whatsoever. You have a Borland compiler; newsgroups.borl and.com
has several groups that can help you. It's a C++ compiler; you can
make your life easier by using the additional capabilities of C++,
which you can find out more about by reading the FAQ for comp.lang.c++:

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

Of course, should you choose C, some parts of your project may be
topical here (parsing a bookmark file, for example).

I don't see why you'd want the data to be bound up in the executable;
if you came up with a good file format, you could edit your bookmarks
with a simple text editor without recompiling the executable.

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #5

In article <cf************ **************@ posting.google. com>, ch*******@hotma il.com (Chris) writes:
I have been learning C and want to write a program and need someone to
point me in the write direction.
Many people feel designing your program before you begin to write
it is a good idea.
I want to write a program to store all my webpage bookmarks in
possibly one file. I want it to be a GUI.
Note that the C language does not include a GUI. There are many
GUI APIs which can be used from C, but you'll have to go elsewhere
for advice on that. (I recommend figuring out on what platform your
program will be implemented, then asking in the group for that
platform; they should be able to offer recommendations . Many GUI
APIs have their own groups as well.)
Can I have it as one .exe file storing the code and data together?
This is a platform-specific question - the C language says nothing
about how translated programs are stored - but most of the hosted C
implementations I'm familiar with do not directly and conveniently
support storing data and program together.
Should I use linked list indexes?
Not a C question. comp.programmin g would be more appropriate, but
your question is so vague I'm not sure how anyone could give you a
useful answer.
How should I store the data? I know
i can connect it to a backend database but I want to avoid this. And I
want to do it only in C.
C itself provides only one mechanism for the persistent storage of
data: files. The library functions fopen, fclose, fread, fwrite,
fprintf, fscanf, etc are C's data storage mechanism. Anything else
is implementation-specific.
I just need to be pointed in the right direction. I have a copy of
Borland C++.


C++ is not C. C++ implementations can handle most C code in a manner
roughly equivalent to a C implementation, provide the code avoids
the additional keywords and reserved identifiers of C++, makes some
casts that are unnecessary in C, and so forth. Whether this is a
good thing is a matter of contention.

If you actually want to write good C code, I recommend using a C
implementation. There are free ones available for most platforms.

To be honest, though, it sounds like you might be tackling this
project prematurely. I recommend deciding what language you're
really going to use (C or C++), deciding what platform-specific
APIs you'll use (GUI toolkit and so forth), putting together the
appropriate development environment, then working through some
simpler programs first. A tutorial on writing GUI applications
for your target platform, in your target language, would probably
be a good idea.

--
Michael Wojcik mi************@ microfocus.com

Even though there may be some misguided critics of what we're trying
to do, I think we're on the wrong path. -- Reagan
Nov 14 '05 #6
Christopher Benson-Manica wrote:
Chris <ch*******@hotm ail.com> spoke thus: .... http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/

Of course, should you choose C, some parts of your project may be
topical here (parsing a bookmark file, for example).

I don't see why you'd want the data to be bound up in the executable;
if you came up with a good file format, you could edit your bookmarks
with a simple text editor without recompiling the executable.
A bookmark file? Nothin' to it:
-----------------------------------------
rich@entheos:~/.kde/share/apps/konqueror
$ cat bookmarks.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel folded="no" >
<folder folded="no" icon="bookmark_ folder" >
<title>Programm ing</title>
<bookmark icon="favicons/www.research.at t.com"
href="http://www.research.at t.com/%7Ebs/3rd.html" >
<title>Stroustr up: The C++ Programming Language (Third Edition)</title>
<info>
<metadata>
<time_added>109 4248724</time_added>
<time_visited>1 094248724</time_visited>
<visit_count> 2</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www"
href="http://www.zib.de/Visual/people/mueller/Course/Tutorial/tutorial.html" <title>Introduc tion to Object-Oriented Programming Using C++</title>
<info>
<metadata>
<time_added>109 3059412</time_added>
<time_visited>1 094170600</time_visited>
<visit_count>20 </visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://tclspice.source forge.net/" >
<title>TclSpice </title>
<info>
<metadata>
<time_added>109 2269494</time_added>
<time_visited>1 092269520</time_visited>
<visit_count> 3</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.cgi101.com"
href="http://www.cgi101.com/book/ch1/text.html" >
<title>CGI Programming 101: Chapter 1: Getting Started</title>
<info>
<metadata>
<time_added>109 1760970</time_added>
<time_visited>1 091762280</time_visited>
<visit_count> 3</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://www.cplusplus.c om/doc/tutorial/" >
<title>C++ language tutorial</title>
<info>
<metadata>
<time_added>109 1654777</time_added>
<time_visited>1 093321685</time_visited>
<visit_count>16 </visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://doc.trolltech.c om/2.3/index.html" >
<title>Qt Reference Documentation</title>
<info>
<metadata>
<time_added>109 2345307</time_added>
<time_visited>1 092345308</time_visited>
<visit_count> 2</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="html"
href="file:/usr/doc/qt-3.3.2/html/designer-manual.html" >
<title>Qt Designer Manual</title>
<info>
<metadata>
<time_added>109 1402413</time_added>
<time_visited>1 093294333</time_visited>
<visit_count>35 </visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="html"
href="file:/home/rich/Programming/C%2B%2B/Books/Preface.html" >
<title>Prefac e</title>
<info>
<metadata>
<time_added>109 4298549</time_added>
<time_visited>1 094298981</time_visited>
<visit_count> 6</visit_count>
</metadata>
</info>
</bookmark>
</folder>
<bookmark icon="favicons/my.yahoo.com" href="http://my.yahoo.com/" >
<title>My Yahoo!</title>
<info>
<metadata>
<time_added>109 0805190</time_added>
<time_visited>1 094440062</time_visited>
<visit_count>31 1</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.jibjab.com_ jibjab"
href="http://www.jibjab.com/" >
<title>JibJab </title>
<info>
<metadata>
<time_added>109 1141454</time_added>
<time_visited>1 091141501</time_visited>
<visit_count> 3</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://www.linuxguruz. com/iptables/" >
<title>LinuxGur uz Netfilter IPTABLES Firewall Page</title>
<info>
<metadata>
<time_added>109 1495417</time_added>
<time_visited>1 091495419</time_visited>
<visit_count> 3</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.sfgate.com"
href="http://www.sfgate.com/cgi-bin/article.cgi?fil e=/chronicle/archive/2004/01/04/INGPQ40MB81.DTL " <title>Quaranti ning dissent / How the Secret Service protects Bush from
free speech</title>
<info>
<metadata>
<time_added>109 1141144</time_added>
<time_visited>1 091978818</time_visited>
<visit_count> 4</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.dogstar.dan timax.dk_tubest uf_favicon"
href="http://www.dogstar.dan timax.dk/tubestuf/dzindex.htm" >
<title>Introduc ing DOGZILLA</title>
</bookmark>
<bookmark icon="favicons/www.brainbasher s.com"
href="http://www.brainbasher s.com/" >
<title>Brain Teasers and Puzzles: BrainBashers [TM]</title>
<info>
<metadata>
<time_added>109 2384689</time_added>
<time_visited>1 092384801</time_visited>
<visit_count>17 </visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.tripod.lyco s.com"
href="http://www.tripod.lyco s.com/" >
<title>Tripod </title>
<info>
<metadata>
<time_added>109 1760147</time_added>
<time_visited>1 091760234</time_visited>
<visit_count> 4</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www"
href="http://www.clearlight. com/%7Emhieb/WVFossils/ice_ages.html" >
<title>Global Warming:A Chilling Perspective</title>
</bookmark>
<bookmark icon="www" href="https://onlinebanking.d owneysavings.co m/" >
<title>Downey Savings SignOn Frameset</title>
<info>
<metadata>
<time_added>109 2790174</time_added>
<time_visited>1 094234821</time_visited>
<visit_count>16 </visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www"
href="http://wombat.san-francisco.ca.us/faqomatic/cache/74.html" >
<title>alt.os.l inux.slackware FAQ: THE BOZO MINI-HOWTO VERSION 0.2</title>
</bookmark>
<bookmark icon="favicons/www.tech-edv.co.at"
href="http://www.tech-edv.co.at/lunix/CAD.html" >
<title>LUnIx . . . CAD &amp; Linux</title>
</bookmark>
<bookmark icon="favicons/www.macromedia. com"
href="http://www.macromedia. com/shockwave/download/download.cgi?P1 _Prod_Version=S hockwaveFlash"

<title>Macromed ia Flash Player Download Center</title>
</bookmark>
<bookmark icon="www" href="http://www.ntia.doc.go v/osmhome/allochrt.pdf" >
<title>http://www.ntia.doc.go v/osmhome/allochrt.pdf</title>
</bookmark>
<bookmark icon="favicons/www.edafe.org_i co_favicon"
href="http://www.edafe.org/slack.html" >
<title>edafe.or g: slackware</title>
</bookmark>
<bookmark icon="favicons/www.hpl.hp.com"
href="http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/" >
<title>Linux &amp; Wireless LANs</title>
</bookmark>
<bookmark icon="www" href="http://www.packetpro.c om/thinkpad_t30.ht ml" >
<title>Slackwar e Linux 9.0 on a IBM ThinkPad T30</title>
</bookmark>
</xbel>
rich@entheos:~/.kde/share/apps/konqueror
$
--------------------

Cheers!
Rich

Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2983
by: Bookmark | last post by:
I have a form that does a few things, such as collect data and than using cdonts emails this data to a place to be parsed. I need to add a bookmark command to this form. I have a javascript one, but i would like to keep entire page asp. Do you know where i can find an asp program i can add to my form so i can do this, or am i stuck with using javascript?
12
2700
by: David Walker | last post by:
Hi I have a program which I need to interface with a webpage - the webpage will accept an input (probably a 'post' string from the program) and then will process it and needs to return a value. Is there an easy way to interface the program to do this? I have two questions: How can I call a webpage as simply as possible in c / c++ (preferably not using MFC etc) and pass a 'post' string to the page? How can I retrieve an array of values...
1
3087
by: ChrisR | last post by:
Hi everyone I have a 2002 Access MDB, which uses a HTML page with bookmarks in it, as a Help File. The problem is not accessing the help file, but opening it to the proper bookmark. I use this code in a Help Command Button on all the Forms to open the html:
2
2573
by: Thelma Lubkin | last post by:
With Me!PERSONSLIST.Form.RecordsetClone .FindFirst strID If .NoMatch Then Debug.Print "key " & Key & " nomatch" Exit Sub Else If Me.Dirty Then Me.Dirty = False Debug.Print "A_LOAD bookmark = " & .Bookmark Debug.Print "A_LOAD cloneKey = " & .Fields("PrimKey") ' Me.Bookmark = .Bookmark
2
4209
by: fordesky | last post by:
Gday, I have a set of Access 2000 tables that I would like to export into a MS Word 2000 template at specific bookmark locations that I've set up. Would anyone know the code to achieve something like this? I've heard about using the OutPutTo method, but I'm not sure if it can output to a specific bookmark location. Any thoughts?
2
9489
by: Alan T | last post by:
How do I make use of the Bookmarks property so that I can write a text at/below the position of a particular bookmark or the first bookmark ? private Microsoft.Office.Interop.Word.Document myWordDoc = new Document(); myWordDoc.Bookmarks
0
1928
by: Alan T | last post by:
My code can select the content of a Word document between 2 bookmarks: if (bookmarks.Exists("first bookmark") & bookmarks.Exists("second bookmark")) { object oFirstBookmark = ("first bookmark") ; Interop.Word.Range rngBeginBookmark = _stdWordDoc.Bookmarks.get_Item(ref oFirstBookmark).Range;
4
1503
by: zzapper | last post by:
Hi, I use an internal bookmark <form method="post" action="${form_action}#mark1"> to return to the correct place in the page. In case of an error I would wish to return to the top of the screen can I overrule the bookmark "mark1" in my PHP code?
0
4054
by: JosAH | last post by:
Greetings, Introduction At this moment we have a TextProcessor, a LibraryBuilder as well as the Library itself. As you read last week a Library is capable of producing pieces of text in a simple way. We also briefly mentioned the BookMark which represents a single paragraph of text. We haven't seen it's implementation yet. This is the topic of this week's article part.
0
7965
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7885
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8031
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8258
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5426
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2399
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1493
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.