Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
0b427a5
revert commits 6724664..f4af13a , except commits 6724664 (Updated lic…
sergiomb2 Dec 24, 2020
8619e43
Use the github page for the kodos project page url
Aug 9, 2012
f76d70d
Remove the check_for_updates functionality
Aug 9, 2012
3bea2b8
Remove the reportbug functionality and send the user to github instead
Aug 9, 2012
954151a
Remove the email server config item and the associated code
Aug 13, 2012
c8bfce5
Fix the layout of the preferences window
Aug 13, 2012
5f54559
Remove the web browser and mail server paragraphs from the help
Aug 13, 2012
877d446
Split the kodos file into a small launcher and modules.main
Aug 13, 2012
519891c
Move kodos loader script to bin directory
Aug 17, 2012
0932b66
Use subprocess.check_call instead of os.system
Aug 17, 2012
2f0d6c3
Execute `make` in the build_py rather than in the install phase
Aug 17, 2012
bc30c45
Remove commented out code and superfluous comments
Aug 17, 2012
8114707
Rename the `modules` directory to `kodos`
Aug 17, 2012
0492b53
Remove the now superfluous extension of sys.path
Aug 17, 2012
69b5b45
Do not install the .ui files
Aug 18, 2012
098ec59
Use optparse instead of getopt
Aug 18, 2012
75c45e8
Remove all debug related code from util.py
Aug 19, 2012
ceeba25
Remove the unused debug module
Aug 19, 2012
0432bf3
Use the logging framework instead of conditional prints
Aug 19, 2012
c2b562a
Use the logging framework instead of unconditional prints
Aug 19, 2012
1bf3cc6
Hand the qApp object to the main `Kodos` class
Aug 19, 2012
b2efe70
Use relative imports and avoid * imports
Aug 19, 2012
4bc909a
Remove unused imports
Aug 19, 2012
5f2a208
Remove RecentFiles.move(..)
Aug 19, 2012
38704c6
Remove superfluous import of os.path
Aug 19, 2012
e10a8b6
Use package relative imports
Aug 19, 2012
1192ad6
Use True and False instead of TRUE and FALSE
Aug 19, 2012
24e0711
Revert "Clean translations/*.ts"
sergiomb2 Dec 25, 2020
5801e30
bdist_rpm has been removed from Distutils !?
sergiomb2 Dec 25, 2020
cf30768
Remove removed ui files resultsBA.ui and reportBugBA
sergiomb2 Dec 25, 2020
c297cda
Fix NameError: global name 'URLDialogBA' is not defined
sergiomb2 Dec 25, 2020
e83b231
update PKG-INFO and .gitignore
sergiomb2 Dec 25, 2020
0d5f756
Migrate to Python3
sergiomb2 Dec 26, 2020
988596b
Update PKG-INFO, CHANGELOG.txt and version.py
sergiomb2 Dec 26, 2020
3ab9f52
Add kodos.spec to packaging directory
sergiomb2 Dec 26, 2020
7c83578
Remove kodos/__init__.py and fix file mode of help.py
sergiomb2 Dec 26, 2020
7f10e7b
Fix Makefiles
sergiomb2 Dec 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
*.pyc
*.pyo
*~
*.rej
*.orig
/.pc/
/build/
/debian/
/dist/
/MANIFEST
/modules/*BA.py
/modules/kodos_rc.py
*BA.py
kodos_rc.py
/translations/*.qm
/translations/*.ts
8 changes: 8 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Kodos ChangeLog

2.5.2
=====
*) First Python3 version , still using PyQt4, python3-PyQt4 is now required

2.5.1
=====
*) Migrated to PyQt4 completed using teythoon repo

2.4.9
=====
*) Fixed help window (corrects problem related to tooltip api changes)
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ include screenshots/*.png
include MANIFEST.in
include LICENSE.txt
include README.txt
include modules/*.ui
include modules/*.py
include kodos/*.ui
include kodos/*.py
include windows/build.bat
include windows/installer.iss
include CHANGELOG.txt
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
all: modules/kodos_rc.py
$(MAKE) -C modules
all: kodos/kodos_rc.py
$(MAKE) -C kodos
pylupdate4 kodos.pro
$(MAKE) -C translations

clean:
$(RM) -fv modules/kodos_rc.py
$(MAKE) clean -C modules
$(RM) -fv kodos/kodos_rc.py
$(MAKE) clean -C kodos

modules/kodos_rc.py: kodos.qrc
pyrcc4 -o $@ $<
kodos/kodos_rc.py: kodos.qrc
pyrcc4 -py3 -o $@ $<
8 changes: 3 additions & 5 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
Metadata-Version: 1.0
Name: kodos
Version: 2.4.9
Version: 2.5.2
Summary: Kodos is a visual regular expression editor
Home-page: http://kodos.sourceforge.net
Home-page: https://github.com/sergiomb2/kodos
Author: Phil Schwartz
Author-email: phil_schwartz@users.sourceforge.net
License: GPL
Description:
Kodos is a visual regular expression editor and debugger.

Description: Kodos is a visual regular expression editor and debugger.
Platform: UNKNOWN
60 changes: 60 additions & 0 deletions bin/kodos
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# kodos.py: -*- Python -*- DESCRIPTIVE TEXT.

import sys
import os
import logging
import optparse

try:
from PyQt4 import QtGui
from PyQt4 import QtCore
except:
sys.exit("""Could not locate the PyQt module. Please make sure that
you have installed PyQt for the version of Python that you are running.""")

from kodos.main import Kodos
from kodos.util import findFile

parser = optparse.OptionParser()
parser.add_option('-f', '--filename', dest='filename',
help='Load filename on startup', metavar='FILE')
parser.add_option('-d', '--debug', dest='debug', action='store_true',
help='Set log level to debug')
parser.add_option('-k', dest='kodos_dir', type='string',
default=os.path.join(sys.prefix, "kodos"),
help='Set path containing Kodos images & help subdirs',
metavar='DIR')
parser.add_option('-l', '--locale', dest='locale', type='string',
default='en',
help='2-letter locale', metavar='LEVEL')
options, args = parser.parse_args()

if options.debug:
logging.basicConfig(level=logging.DEBUG)
else:
logging.basicConfig(level=logging.WARNING)
log = logging.getLogger('kodos')

os.environ['KODOS_DIR'] = options.kodos_dir

qApp = QtGui.QApplication(sys.argv)
qApp.setOrganizationName("kodos")
qApp.setApplicationName("kodos")
qApp.setOrganizationDomain("kodos.sourceforge.net")

if options.locale != 'en':
localefile = "kodos_%s.qm" % (options.locale or QtCore.QTextCodec.locale())
localepath = findFile(os.path.join("translations", localefile))
log.debug('locale changed to: %s, file: %s, path: %s' % (locale,
localefile,
localepath))

translator = QtCore.QTranslator(qApp)
translator.load(localepath)
qApp.installTranslator(translator)

kodos = Kodos(qApp, options.filename)
kodos.show()
sys.exit(qApp.exec_())
4 changes: 0 additions & 4 deletions help/prefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,8 @@ <h2><font color=green>Kodos - Help</font></h2>
</td>
<td width=80%>
<h3>Preferences</h3>
Set your <b>Web Browser</b> path. You can use the <b>...</b> button to use a file dialog to help locate your browser. The web browser is necessary to access external links within the Python Regex documentation.<p>

The <b>Editor Font</b> allows you to select a desirable font for use within the Kodos editor<p>

The <b>Email Server</b> is required for sending bug reports to the author. You can submit a bug report under the main <b>Help</b> menu<p>

You can control the number of <b>Recent Files</b> that are displayed at the bottom of the <b>File</b> menu. The default value is 5. To display more or less recent files, set this value accordingly. The recent file list is maintained independtly of this value such that applying a lower value and then a higher value will not purge entries. That is, if you have 10 files and then set this value to 3 and later set this value to 10, the 10 files will be immediately available for selection .<p>


Expand Down
2 changes: 1 addition & 1 deletion kodos.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Name=Kodos
GenericName=Visual RegEx Editor
GenericName=The Python Regular Expression Debugger
Comment=Kodos is a Visual regular expression editor
Exec=kodos
Icon=kodos_icon.png
Expand Down
48 changes: 23 additions & 25 deletions kodos.pro
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
SOURCES = kodos
modules/about.py
modules/debug.py
modules/help.py
modules/__init__.py
modules/parseRegexLib.py
modules/prefs.py
modules/recent_files.py
modules/reference.py
modules/regexLibrary.py
modules/reportBug.py
modules/status_bar.py
modules/tooltip.py
modules/urlDialog.py
modules/util.py
modules/version.py
kodos/about.py
kodos/debug.py
kodos/help.py
kodos/__init__.py
kodos/parseRegexLib.py
kodos/prefs.py
kodos/recent_files.py
kodos/reference.py
kodos/regexLibrary.py
kodos/reportBug.py
kodos/status_bar.py
kodos/tooltip.py
kodos/urlDialog.py
kodos/util.py
kodos/version.py

TRANSLATIONS = translations/kodos_en.ts \
translations/kodos_de.ts \
translations/kodos_pl.ts

FORMS = modules/aboutBA.ui \
modules/helpBA.ui \
modules/kodosBA.ui \
modules/newUserDialogBA.ui \
modules/prefsBA.ui \
modules/referenceBA.ui \
modules/regexLibraryBA.ui \
modules/reportBugBA.ui \
modules/urlDialogBA.ui
FORMS = kodos/aboutBA.ui \
kodos/helpBA.ui \
kodos/kodosBA.ui \
kodos/newUserDialogBA.ui \
kodos/prefsBA.ui \
kodos/referenceBA.ui \
kodos/regexLibraryBA.ui \
kodos/urlDialogBA.ui
2 changes: 1 addition & 1 deletion modules/Makefile → kodos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ clean:
$(RM) -vf *.pyc

%.py: %.ui
pyuic4 --from-imports -o $*.py $<
pyuic4 --from-imports -w -o $*.py $<
11 changes: 11 additions & 0 deletions kodos/about.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# about.py: -*- Python -*- DESCRIPTIVE TEXT.

from . import aboutBA
from . import version

class About(aboutBA.AboutBA):
def __init__(self):
aboutBA.AboutBA.__init__(self)
self.versionLabel.setText(version.VERSION)

File renamed without changes.
22 changes: 1 addition & 21 deletions modules/flags.py → kodos/flags.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: 0 -*-
# vi: set fileencoding=utf-8 filetype=python expandtab tabstop=4 shiftwidth=4 softtabstop=4 cindent:
# :mode=python:indentSize=4:tabSize=4:noTabs=true:

#-----------------------------------------------------------------------------#
# Built-in modules

# coding=utf-8
from __future__ import print_function, absolute_import, unicode_literals

import re

#-----------------------------------------------------------------------------#

class reFlag(object):
def __init__(self, flag_name, short_flag, checkbox):
if not flag_name.startswith('re.'):
Expand All @@ -21,15 +13,11 @@ def __init__(self, flag_name, short_flag, checkbox):
self.shortFlag = short_flag
self.checkBox = checkbox
self.preEmbedState = None
return


def clear(self):
self.preEmbedState = None
self.checkBox.setEnabled(True)
self.checkBox.setChecked(False)
return


def embed(self):
"""Set the state of the checkbox to show that it
Expand All @@ -38,16 +26,12 @@ def embed(self):
self.preEmbedState = self.checkBox.isChecked()
self.checkBox.setChecked(True)
self.checkBox.setDisabled(True)
return


def deembed(self):
if self.preEmbedState != None:
self.checkBox.setEnabled(True)
self.checkBox.setChecked(self.preEmbedState)
self.preEmbedState = None
return


class reFlagList(list):
def allFlagsORed(self):
Expand All @@ -57,10 +41,6 @@ def allFlagsORed(self):
ret |= f.reFlag
return ret


def clearAll(self):
for f in self:
f.clear()
return

#-----------------------------------------------------------------------------#
50 changes: 16 additions & 34 deletions modules/help.py → kodos/help.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,32 +1,20 @@
# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; truncate-lines: 0 -*-
# vi: set fileencoding=utf-8 filetype=python expandtab tabstop=4 shiftwidth=4 softtabstop=4 cindent:
# :mode=python:indentSize=4:tabSize=4:noTabs=true:

#-----------------------------------------------------------------------------#
# Built-in modules
# -*- coding: utf-8 -*-
# help.py: -*- Python -*- DESCRIPTIVE TEXT.

import os

#-----------------------------------------------------------------------------#
# Installed modules

from PyQt4 import QtGui, QtCore

#-----------------------------------------------------------------------------#
# Kodos modules
from PyQt4 import QtGui
from PyQt4 import QtCore

from . import util
from .helpBA import Ui_HelpBA

#-----------------------------------------------------------------------------#
from . import helpBA

class textbrowser(QtGui.QTextBrowser):
# reimplemented textbrowser that filters out external sources
# future: launch web browser
def __init__(self, parent=None, name=None):
self.parent = parent
QtGui.QTextBrowser.__init__(self)
return


def setSource(self, src):
Expand All @@ -36,57 +24,51 @@ def setSource(self, src):
return

QtGui.QTextBrowser.setSource(self, QtCore.QUrl(src))
return


class Help(QtGui.QMainWindow, Ui_HelpBA):
def __init__(self, filename, parent=None, f=QtCore.Qt.WindowFlags()):
QtGui.QMainWindow.__init__(self, parent, f)
self.setupUi(self)


class Help(helpBA.HelpBA):
def __init__(self, parent, filename):
helpBA.HelpBA.__init__(self, parent)

self.setGeometry(100, 50, 800, 600)

self.textBrowser = textbrowser(self)
absPath = self.getHelpFile(filename)

self.setCentralWidget(self.textBrowser)
self.textBrowser.setSource(absPath)

self.fwdAvailable = 0
self.show()
return


def exitSlot(self):
self.close()
return


def backSlot(self):
self.textBrowser.backward()
return


def forwardSlot(self):
self.textBrowser.forward()
return


def homeSlot(self):
self.textBrowser.home()
return



def setForwardAvailable(self, bool):
self.fwdAvailable = bool
return


def forwardHandler(self):
if self.fwdAvailable:
self.textBrowser.forward()
return


def getHelpFile(self, filename):
f = util.findFile(os.path.join("help", filename))
return f

#-----------------------------------------------------------------------------#


File renamed without changes.
Loading