GSoC 2009 Search and Replace by meet
Jump to navigation Jump to search
Search and Replace
Meetanshu Gupta : firstname.lastname@example.org
- 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.
- Scribus is the leading the Open Source Desktop Publishing software. However, commercial programs seem to be getting ahead in features like 'Search and Replace'. Being widely used, this feature has to be improved. Having a long programming experience in C and desire to write something from scratch is a 'Developer's Dream'. I want to fulfill mine 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 for any other organizations.
- After discussing my plans with the Scribus developers, the following goals are to be met by the time of completion of the project:
- Rewriting the source code to make it more modular, like separate GUI from the search logic.
- Support for Regular Expressions in the search using Qregex.
- Search and replace for multiple documents
- Better user interface separating Basic Search and Advanced Search.
- 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 would search in a particular text region. The second will offer the user to search the whole document or parts of it. It will first look up the whole Scribus document to find individual parts and then invoke the first 'Search and Replace' on all or only selected items.
- The new 'Search and Replace' dialog will have two modes. One to do basic 'Search and Replace' just using text based matching. The second will be the full fledged dialog that we have of today. The second one can be invoked from the first after clicking an 'Advanced Search' button or can be directly invoked.
- It will support Regular Expressions. That means we can find all words starting 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 easily later on. As any feature would need a corresponding addition in the UI part and a separate code backend, changes in one can be done independently of the other.
- If any time is left, I would also like to implement the following ideas:
- To make the 'Search and Replace' dialog more informative, proper windows would be prompted like 'Match not Found' in the center, unlike the current 'Search Complete'.
- 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 in text frames to send the characters as soon as they are being typed rather than only after pressing the 'Return' key.
- To have 'Search and Replace' automatically take input from some portion highlighted by user when it is invoked (From the bugtracker).
- To have a '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.
- To shift the 'Search and replace' Dialog aside when user is having a look at the searched documents.
- 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.
- A new "Search and Replace" UI with all the features mentioned under the "Essential" portion of “Implementation”.
- Documentation of the work done.
- Some or all features from the “Optional" portion of “Implementation”
- 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.