Hello everyone,
I recently learned how to edit a wiki and wikipedia article
It is very easy to edit any given article, but what is more fascinating is that you can also compare between the various versions of the article between edits
The wiki software highlights where the differences are, so it is much easier to see which part has been changed. What I want to know is whether there is some software that allows me to do this offline with different versions of source code, showing all the syntax highlight, as well as allowing to compare between edits easily
I think something like that would be very helpful. Any ideas anyone?
thanks
offline Wiki?
there is also tkdiff
and Xdiff these have more features but I like DragNdrop better
something simple and light is just use diff
this is what I use all the time to view differences in code
its one of my many homemade tools
Joe
and Xdiff these have more features but I like DragNdrop better
something simple and light is just use diff
this is what I use all the time to view differences in code
its one of my many homemade tools
Joe
Code: Select all
#!/bin/sh
# version 2 changed to *.patch
# just a simple diff tool for the lazy
# there are better but this is easy :D
# Joe Arose
# call this dnd_diff
# patched are auto made for you
DIALOG=Xdialog
$DIALOG --title "The original for DIFF " \
--inputbox "Type in a value or Drag N drop.
enter first file to diff now
the name will be given from the this file.patch
and placed in root\n
" 0 0 2> /tmp/one.txt
retval=$?
input=`cat /tmp/one.txt`
case $retval in
0)
echo "Input string is '$input'";;
1)
echo "Cancel pressed."
exit;;
255)
echo "Box closed."
exit;;
esac
#----------------------------------
$DIALOG --title "The edited file for DIFF " \
--inputbox "Type in a value or Drag N drop.
you enter second file to diff now\n
" 0 0 2>/tmp/two.txt
retval=$?
input2=`cat /tmp/two.txt`
case $retval in
0)
echo "Input string is '$input2'";;
1)
echo "Cancel pressed."
exit;;
255)
echo "Box closed."
exit;;
esac
diff -pruN $input $input2 >/root/`basename $input`.patch
#or you could do this if you have another editor installed
$DEFAULTTEXTEDITOR /root/`basename $input`.patch
#geany is the default editor change this if you have another editor
#geany /root/`basename $input`.patch
rm -f /tmp/two.txt
rm -f /tmp/one.txt
Using a wiki to write/edit source code would be a bad idea because of the syntax restraints -you'd have to write pages of code which are not really code, but made to llok like code when displayed on the wiki page.
The real main program for comparing code is 'diff' -tkdiff and many other GUI diff programs usually rely on diff itself to do the work. Using diff allows you to directly edit the real code (as written for the compiler/interpretor) without having to make any cosmetic changes.
If you are intending to write and maintain a project, then what you really want is called a Version Control System -like CVS, SVN/subversion or 'git'. There are many others, but git it probably the best and most commonly used. The linux kernel (which contains thousands of files and millions of lines of code) is maintained using 'git'.
The real main program for comparing code is 'diff' -tkdiff and many other GUI diff programs usually rely on diff itself to do the work. Using diff allows you to directly edit the real code (as written for the compiler/interpretor) without having to make any cosmetic changes.
If you are intending to write and maintain a project, then what you really want is called a Version Control System -like CVS, SVN/subversion or 'git'. There are many others, but git it probably the best and most commonly used. The linux kernel (which contains thousands of files and millions of lines of code) is maintained using 'git'.
Thank you for your replies
I am using TortoiseHg for my work in my Windows 7 machine
I am still learning about all it's features, but it seems to provide features for much of what I need to do
However I will also need something similar for Puppy Linux 5.2.8 later on so I'm searching for some ideas
As you suggested I have acquired a version control system called TortoiseHg and I am trying out it's features right now
I am using TortoiseHg for my work in my Windows 7 machine
I am still learning about all it's features, but it seems to provide features for much of what I need to do
However I will also need something similar for Puppy Linux 5.2.8 later on so I'm searching for some ideas
I am not actually storing it in a wiki, I was just trying to describe what kind of feature I was looking foramigo wrote:Using a wiki to write/edit source code would be a bad idea because of the syntax restraints -you'd have to write pages of code which are not really code, but made to llok like code when displayed on the wiki page.
...
If you are intending to write and maintain a project, then what you really want is called a Version Control System -like CVS, SVN/subversion or 'git'. There are many others, but git it probably the best and most commonly used. The linux kernel (which contains thousands of files and millions of lines of code) is maintained using 'git'.
As you suggested I have acquired a version control system called TortoiseHg and I am trying out it's features right now
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
there are quite a few hg/mercurial frontends for pretty much every OS imaginable, but if you aren't already familiar with it, I would also recommend fossil as it is quite easy to learn (Barry is now using it for woof)
hg/git/svn are still better for larger projects with many developers, but for basic operations (and some things the others dont have, like bug tracking, wiki, self-hosting web server... in a much smaller package even) its really nice.
hg/git/svn are still better for larger projects with many developers, but for basic operations (and some things the others dont have, like bug tracking, wiki, self-hosting web server... in a much smaller package even) its really nice.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].