473,417 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

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 2018
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*******@hotmail.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*******@hotmail.com (Chris) wrote in message news:<cf**************************@posting.google. 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*******@hotmail.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.borland.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)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #5

In article <cf**************************@posting.google.com >, ch*******@hotmail.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.programming 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*******@hotmail.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>Programming</title>
<bookmark icon="favicons/www.research.att.com"
href="http://www.research.att.com/%7Ebs/3rd.html" >
<title>Stroustrup: The C++ Programming Language (Third Edition)</title>
<info>
<metadata>
<time_added>1094248724</time_added>
<time_visited>1094248724</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>Introduction to Object-Oriented Programming Using C++</title>
<info>
<metadata>
<time_added>1093059412</time_added>
<time_visited>1094170600</time_visited>
<visit_count>20</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://tclspice.sourceforge.net/" >
<title>TclSpice</title>
<info>
<metadata>
<time_added>1092269494</time_added>
<time_visited>1092269520</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>1091760970</time_added>
<time_visited>1091762280</time_visited>
<visit_count>3</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://www.cplusplus.com/doc/tutorial/" >
<title>C++ language tutorial</title>
<info>
<metadata>
<time_added>1091654777</time_added>
<time_visited>1093321685</time_visited>
<visit_count>16</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://doc.trolltech.com/2.3/index.html" >
<title>Qt Reference Documentation</title>
<info>
<metadata>
<time_added>1092345307</time_added>
<time_visited>1092345308</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>1091402413</time_added>
<time_visited>1093294333</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>Preface</title>
<info>
<metadata>
<time_added>1094298549</time_added>
<time_visited>1094298981</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>1090805190</time_added>
<time_visited>1094440062</time_visited>
<visit_count>311</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.jibjab.com_jibjab"
href="http://www.jibjab.com/" >
<title>JibJab</title>
<info>
<metadata>
<time_added>1091141454</time_added>
<time_visited>1091141501</time_visited>
<visit_count>3</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="www" href="http://www.linuxguruz.com/iptables/" >
<title>LinuxGuruz Netfilter IPTABLES Firewall Page</title>
<info>
<metadata>
<time_added>1091495417</time_added>
<time_visited>1091495419</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?file=/chronicle/archive/2004/01/04/INGPQ40MB81.DTL" <title>Quarantining dissent / How the Secret Service protects Bush from
free speech</title>
<info>
<metadata>
<time_added>1091141144</time_added>
<time_visited>1091978818</time_visited>
<visit_count>4</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.dogstar.dantimax.dk_tubestuf_favicon"
href="http://www.dogstar.dantimax.dk/tubestuf/dzindex.htm" >
<title>Introducing DOGZILLA</title>
</bookmark>
<bookmark icon="favicons/www.brainbashers.com"
href="http://www.brainbashers.com/" >
<title>Brain Teasers and Puzzles: BrainBashers [TM]</title>
<info>
<metadata>
<time_added>1092384689</time_added>
<time_visited>1092384801</time_visited>
<visit_count>17</visit_count>
</metadata>
</info>
</bookmark>
<bookmark icon="favicons/www.tripod.lycos.com"
href="http://www.tripod.lycos.com/" >
<title>Tripod</title>
<info>
<metadata>
<time_added>1091760147</time_added>
<time_visited>1091760234</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.downeysavings.com/" >
<title>Downey Savings SignOn Frameset</title>
<info>
<metadata>
<time_added>1092790174</time_added>
<time_visited>1094234821</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.linux.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=ShockwaveFlash"

<title>Macromedia Flash Player Download Center</title>
</bookmark>
<bookmark icon="www" href="http://www.ntia.doc.gov/osmhome/allochrt.pdf" >
<title>http://www.ntia.doc.gov/osmhome/allochrt.pdf</title>
</bookmark>
<bookmark icon="favicons/www.edafe.org_ico_favicon"
href="http://www.edafe.org/slack.html" >
<title>edafe.org: 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.com/thinkpad_t30.html" >
<title>Slackware 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
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...
12
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. ...
1
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...
2
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 = "...
2
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...
2
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...
0
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...
4
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...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.