GSoC 2009 Search and Replace by meet: Difference between revisions

From Scribus Wiki
Jump to navigation Jump to search
No edit summary
m (Protected "GSoC 2009 Search and Replace by meet": Archive ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(32 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Archive}}[[Category:GSOC]] [[Category:GSOC 2009]]
==Search and Replace==


== '''Search and Replace''' ==
==='''Rationale'''===


:Text is a substantial part of many Scribus documents. 'Search and Replace' is one of the most fundamental and widely used text manipulation operations. The current implementation lacks many features while having a non-modular UI.
:Reimplementing it with new features will increase both the usability and popularity of Scribus.


Meetanshu Gupta : meetanshu.gupta@gmail.com
===Motivation===
 
:Scribus is the leading Open Source Desktop Publishing software. However, commercial programs appear to have better implementation of such features as 'Search and Replace'. Being widely used, this feature has to be improved. I have a lot of programming experience in C. A desire to write a feature for major software like Scribus from scratch is my 'Developer's Dream'. I want to fulfill it and also help to improve Scribus. Interacting with the Scribus team has been an absolute pleasure. Plus, the 'Scribus Culture' has impressed me so much that I am no longer trying to apply to any other GSoC organizations.
 
===Overview===
 
:After discussing my plans with the Scribus developers, the following goals are to be met by the time of completion of the project:
#Rewrite the source code to make it more modular starting with separation of GUI from the search logic.
#Implement support for regular expressions in the search using Qregex.
#Implement simultaneous search and replace in multiple documents
#Improve user interface by separating Basic Search and Advanced Search.
 
==='''Implementation'''===


----
===='''Essential'''====
'''Rationale'''
Text comprises a substantial part of most of the Scribus Documents. 'Search and Replace' is one the most fundamental and widely
used text manipulation program. The current implementation lacks many features while having a non modular coding implementation.
Reimplementing it in with new features will increase both the usage and popularity of 'Scribus'.


----
:Following features have to be implemented by end of GSoC 2009:-
#The new 'Search and Replace' will have two 'Search and Replace' dialogs. The first one would search in a particular text region. The second will offer the user to search the complete document or selected parts of it. It will first categorize the entire Scribus document to enumerate its individual parts and then invoke the first 'Search and Replace' on all or only selected parts.
#The new 'Search and Replace' dialog will have two modes. One will perform basic 'Search and Replace' using text based matching. The second mode will be the full fledged dialog similar to what we have today. The second one can be invoked from the first by clicking on the 'Advanced Search' button or can be invoked directly.
#New Search and Replace will support Regular Expressions. That means we can for instance find all words beginning with or containing a particular string or character at a particular location.
#The code will be divided into two components - the GUI and the actual code logic. This would allow 'Search and Replace' to be extended much more easily later on. As a feature might require an addition to the UI part and a separate code backend, changes in one can be done independently of the other.


'''Motivation'''  
===='''Optional'''====
Scribus leads the Open Source 'Desktop Publishing' softwares with one but many features. However the commercial softwares seem to
be getting ahead in features like 'Search and Replace'. Being vastly used this feature has to be improved. Having a long
programming experience in C and desire to write something from basic to as far, as he can, is a 'Developer's Dream'. I want to
fulfill mine.


----
:If any time is left, I would also like to implement the following ideas:
#To make the 'Search and Replace' dialog more informative, proper message boxes would be provided such as 'Match not Found' unlike the current austere 'Search Complete' message.
#Depending on the 'textbox' support by Qt, I could add an incremental search capability. This feature would need a mechanism in text frames to send the characters as soon as they are being typed rather than only after the 'Return' key is pressed.
#To have 'Search and Replace' automatically take input from the text highlighted by user when it is invoked (From the bugtracker).
#To have a 'Warp Around' feature. If a user enables it then when the end of the document is reached, search starts from the beginning again. This would be needed only for the search component.
#To shift the 'Search and replace' dialog aside when a user needs to view the  documents being searched.


'''Overview'''
===='''Scribus Users Feedback'''====
After discussing with the scribus developers, these goals are to be met -
1)Rewriting the source code to make it more modular like separate GUI from the search logic.
2)Support for Regular Expressions in the search using Qregex.
3)Search and replace for multiple documents
4)Better User Interface separating Basic Search and Advanced Search.


----
Please dont forget the 'style' searches :


'''Implementation'''
:* searching occurences of 'needle' with bold characters
'''
:* searching occurences of text with font soandso
Essential'''
:* searching occurences of 'needle' with font size = 10
1.The new 'Search and Replace' will have two 'Search and Replace'.First, would search in a particular  text region. Second, will prompt user to search whole document or parts of it, that will appear as a checkbox list.It will first look the whole ScribusDoc to find individual parts and then invoke the first 'Search and Replace' on all of them or the checked items.
:* searching occurences of 'needle' with Title1 style
2.The new 'Search and Replace' will have to modes. One, to do basic 'Search and Replace' just using text based matching. Second the full fledged as we have of today. The second one can be invoked from the first after clicking an 'Advanced Search' Button or can be directly invoked.
:* searching occurences of 'needle' with not-bold characters
3.It will support Regular Expressions that means we can find all words starting containing a particular string or character at a particular location.
:* searching occurences of 'needle' with characters (either bold or not-bold) AND italic
4.The code will be divided in two components, the GUI and the actual code logic. This would allow 'Search and Replace' to be extended easily later on. As any feature would need a corresponding addition in the UI part and a separate code backend. Change in one can be done independently of the other.
:* etc... with all possible mix, including negative criteria and unknown values (3 states buttons style-search-specs)


'''Optional'''
:* idem with replacing :
If time is left, I would also like to implement the following ideas :-
:* replace style with bold and not italic
5.To make the 'Search and Replace' dialog more informative, proper windows would be prompted like 'Match not Found' in the center unlike 'Search Complete'.
:* replace style with bold but dont modify italic or not-italic (3 states buttons style-replace-spects)
6.Depending on the 'textbox' support by Qt, we can have a real-time search, that is searching and highlighting as user is typing. This would need a mechanism from textbox to send the characters as soon as they are being typed in textbox rather than only after 'Return' key is hit.
7.To have 'Search and replace' automatically take input from some portion highlighted by user when it is invoked(From the buglist).
8.To have 'Warp Around' feature. That is if user wants, he can enable it so that when end of document is reached, search starts from the beginning again. This would be just for search.
9.To shift the 'Search and replace' Dialog to side when user is having a look at the searched documents.


----
----


'''TimeLine :'''  
==='''Timeline'''===


May 23     – June 10   :   Basic 'Search and Replace' without Regular Expressions
:*May 23   – June 10: Basic 'Search and Replace' without Regular Expressions
June 10  – June 23   :   Basic 'Search and Replace' with Regular Expressions
:*June 10  – June 23: Basic 'Search and Replace' with Regular Expressions
June 23  - July 6   :   Advanced 'Search and Replace'
:*June 23  - July 6: Advanced 'Search and Replace'
July 6    – July 21   :   global 'Search and replace'
:*July 6    – July 21: Global 'Search and Replace'
July 21  - August 10 :   Exploiting bugs and patching them,Additional Ideas Implementation,If we are for some reasons not on schedule
:*July 21  - August 10: Exploiting bugs and patching them; implementation of additional ideas if time permits.
August 10 - August 17 : Documenting the source code, Writing about ideas that can be implemented
:*August 10 - August 17: Documenting the source code; writing about other ideas that can be implemented.


----
----
                             
 
'''Deliverables :'''
==='''Deliverables'''===
   
   
A new 'Search and Replace Dialog', rather two ;) with all the features mentioned under the 'Essential' portion of  “Implementation”.
#A new "Search and Replace" UI with all the features mentioned under the "Essential" portion of  “Implementation”.
Documentation of the work done.  
#Project documentation.  
Some/all features from the “Optional portion” of “Implementation”
#Some or all features from the “Optional" portion of “Implementation”
 


----
----


'''BIO:'''
==='''BIO'''===
I am a final year Undergraduate student in Computer Engineering from Malaviya National Institute of Technology, Jaipur, India. I  
Meetanshu Gupta : meetanshu.gupta@gmail.com
have been programming in C since Class 6th and C++ since Class 11th . I have worked on Qt2 to create an UI for a C++ project  
:I am a final year Undergraduate student in Computer Engineering at the Malaviya National Institute of Technology, Jaipur, India. I have been programming in C since Class 6 and C++ since Class 11. I have worked on Qt2 to create a UI for the C++ project "Department Management Software." I have done many projects in C, C++ for academics, competitions and at college level. My interests include programming (C/C++/Java/C#), algorithms, network programming. Last summer I had a two-months internship at Microsoft IDC, Hyderabad, India and got some hands-on experience on real world projects. Since then I have taken interest in reading and understanding Open Source codebases (Scribus, Vim, OpenOffice.org), learning debugging techniques and amicably working in teams.
'Department Management Software'.I have done many projects in C, C++ for academics, competitions and at college level. My  
--------
interests include Coding (C/C++/Java/C#) , Algorithms , Network Programming. Past summer I did two moths intern at Microsoft  
IDC,Hyderabad India and got some hands on experience on real world projects. Since then I have taken interest in reading and  
understanding the codebase (Scribus, Vim, Open office), learning debugging techniques and amicably working in teams.

Latest revision as of 17:59, 5 January 2011

Archive icon.png
This article is ARCHIVED. It is a part of the Scribus Community's history and is kept here for reference and as a representation of the contributed efforts. It is protected from editing, but its source can be copied.

Search and Replace

Rationale

Text is a substantial part of many Scribus documents. 'Search and Replace' is one of the most fundamental and widely used text manipulation operations. The current implementation lacks many features while having a non-modular UI.
Reimplementing it with new features will increase both the usability and popularity of Scribus.

Motivation

Scribus is the leading Open Source Desktop Publishing software. However, commercial programs appear to have better implementation of such features as 'Search and Replace'. Being widely used, this feature has to be improved. I have a lot of programming experience in C. A desire to write a feature for major software like Scribus from scratch is my 'Developer's Dream'. I want to fulfill it and also help to improve Scribus. Interacting with the Scribus team has been an absolute pleasure. Plus, the 'Scribus Culture' has impressed me so much that I am no longer trying to apply to any other GSoC organizations.

Overview

After discussing my plans with the Scribus developers, the following goals are to be met by the time of completion of the project:
  1. Rewrite the source code to make it more modular starting with separation of GUI from the search logic.
  2. Implement support for regular expressions in the search using Qregex.
  3. Implement simultaneous search and replace in multiple documents
  4. Improve user interface by separating Basic Search and Advanced Search.

Implementation

Essential

Following features have to be implemented by end of GSoC 2009:-
  1. The new 'Search and Replace' will have two 'Search and Replace' dialogs. The first one would search in a particular text region. The second will offer the user to search the complete document or selected parts of it. It will first categorize the entire Scribus document to enumerate its individual parts and then invoke the first 'Search and Replace' on all or only selected parts.
  2. The new 'Search and Replace' dialog will have two modes. One will perform basic 'Search and Replace' using text based matching. The second mode will be the full fledged dialog similar to what we have today. The second one can be invoked from the first by clicking on the 'Advanced Search' button or can be invoked directly.
  3. New Search and Replace will support Regular Expressions. That means we can for instance find all words beginning with or containing a particular string or character at a particular location.
  4. The code will be divided into two components - the GUI and the actual code logic. This would allow 'Search and Replace' to be extended much more easily later on. As a feature might require an addition to the UI part and a separate code backend, changes in one can be done independently of the other.

Optional

If any time is left, I would also like to implement the following ideas:
  1. To make the 'Search and Replace' dialog more informative, proper message boxes would be provided such as 'Match not Found' unlike the current austere 'Search Complete' message.
  2. Depending on the 'textbox' support by Qt, I could add an incremental search capability. This feature would need a mechanism in text frames to send the characters as soon as they are being typed rather than only after the 'Return' key is pressed.
  3. To have 'Search and Replace' automatically take input from the text highlighted by user when it is invoked (From the bugtracker).
  4. To have a 'Warp Around' feature. If a user enables it then when the end of the document is reached, search starts from the beginning again. This would be needed only for the search component.
  5. To shift the 'Search and replace' dialog aside when a user needs to view the documents being searched.

Scribus Users Feedback

Please dont forget the 'style' searches :

  • searching occurences of 'needle' with bold characters
  • searching occurences of text with font soandso
  • searching occurences of 'needle' with font size = 10
  • searching occurences of 'needle' with Title1 style
  • searching occurences of 'needle' with not-bold characters
  • searching occurences of 'needle' with characters (either bold or not-bold) AND italic
  • etc... with all possible mix, including negative criteria and unknown values (3 states buttons style-search-specs)
  • idem with replacing :
  • replace style with bold and not italic
  • replace style with bold but dont modify italic or not-italic (3 states buttons style-replace-spects)

Timeline

  • May 23 – June 10: Basic 'Search and Replace' without Regular Expressions
  • June 10 – June 23: Basic 'Search and Replace' with Regular Expressions
  • June 23 - July 6: Advanced 'Search and Replace'
  • July 6 – July 21: Global 'Search and Replace'
  • July 21 - August 10: Exploiting bugs and patching them; implementation of additional ideas if time permits.
  • August 10 - August 17: Documenting the source code; writing about other ideas that can be implemented.

Deliverables

  1. A new "Search and Replace" UI with all the features mentioned under the "Essential" portion of “Implementation”.
  2. Project documentation.
  3. Some or all features from the “Optional" portion of “Implementation”

BIO

Meetanshu Gupta : meetanshu.gupta@gmail.com

I am a final year Undergraduate student in Computer Engineering at the Malaviya National Institute of Technology, Jaipur, India. I have been programming in C since Class 6 and C++ since Class 11. I have worked on Qt2 to create a UI for the C++ project "Department Management Software." I have done many projects in C, C++ for academics, competitions and at college level. My interests include programming (C/C++/Java/C#), algorithms, network programming. Last summer I had a two-months internship at Microsoft IDC, Hyderabad, India and got some hands-on experience on real world projects. Since then I have taken interest in reading and understanding Open Source codebases (Scribus, Vim, OpenOffice.org), learning debugging techniques and amicably working in teams.