Originally published at: Meet the Baidu Search macro for ONLYOFFICE | ONLYOFFICE Blog
In the dynamic world of open-source innovation, May 2023 marked a significant milestone. We ventured into the Open Source Promotion Plan program. We’re excited to share our experience in the open-source community, where we had the privilege of collaborating with Eeshaan Sawant, a participant in the OSSP program. In this article, we’ll delve into the details of a remarkable macro developed by Eeshaan, highlighting its robust functionality and strong points.
About the project
At the helm of the Open Source Promotion Plan is the Open Source Software Supply Chain Promotion Plan, operated by the Institute of Software at the Chinese Academy of Sciences. This initiative’s core objective is to involve students on a global scale in the improvement and sustenance of open-source software. The program fosters partnerships with open-source communities, whether local or international, concentrating its efforts on tasks that enhance critical open-source software projects.
One of our projects focuses on creating a macro for integrating Baidu search results into ONLYOFFICE Spreadsheets. The aim of this project is to provide ONLYOFFICE users with a convenient tool for inserting Baidu search results into their spreadsheets. The final version of the macro consists of three parts:
- A Proxy server for handling API requests.
- The Basic version.
- The Advanced version.
This macro harnesses the full potential of the SERP API, a service that provides access to invaluable search engine data and results. It offers 100 free monthly requests, with subscription options available for those with greater data needs.
Features and functionality
Basic Macro: The Basic Macro is tailored for users who are new to macro scripting and want a straightforward way to integrate search results into their spreadsheets. Its primary features include:
- Seamless Integration: The Basic Macro allows you to effortlessly import search results directly into your spreadsheet with a single query.
- Efficiency: This version is designed for efficiency, making it a great choice for users who want to quickly incorporate search data into their documents without the need for complex configurations.
- User-Friendly Setup: Setting up the Basic Macro is user-friendly. Getting the macro up and running is a straightforward process, requiring just a few actions.
Advanced Macro: The Advanced Macro is for experienced users who require more control and precision. It offers additional parameters and advanced capabilities, including:
- Parameter Customization: The Advanced Macro provides the flexibility to customize parameters such as rn and pn. The rn parameter lets you specify the number of results. The pn parameter allows you to target specific pages, allowing you to fine-tune your search results.
- No Cache Option: The no_cache parameter empowers you to choose whether to use cached data for repetitive queries. This feature enhances your ability to keep your data fresh and relevant, especially when dealing with real-time or rapidly changing data.
- Layout Guidance: The Advanced Macro incorporates a layout designed by the fmtMacro to guide you through configuring and customizing your query parameters.
- Multiple Queries: You can execute multiple queries simultaneously, enabling more complex and dynamic tasks.
The Baidu Macro is a versatile tool designed to boost efficiency in managing single and multiple search queries. Regardless of your experience level, its user-friendly design and adaptability make it a beneficial addition to your toolkit.
For comprehensive information and a detailed step-by-step guide on setting up and utilizing both versions, we invite you to explore the macro repository. It contains all the essential files and comprehensive documentation to assist you.
Besides we invite you to read Eshaant’s new blog post, in which he shares his journey and experiences in developing this macro.
Engaging in the 2023 projects of the ONLYOFFICE Open Source Promotion Plan, we discover a blend of determination and inspiration. Every project is thoughtfully crafted to improve how users interact with ONLYOFFICE. Being part of this program and interacting with passionate contributors inspires us to persist on the open-source community path, striving to enhance technology for the better.
As we move ahead, our community flourishes on the spirit of collaboration. We are resolutely committed to refining technology and making it widely accessible. We wholeheartedly invite everyone to become part of the open-source community that inspires each one of us. Thank you for reading, and stay tuned for updates on our journey!