General Introduction
OneLine is an open source hot event timeline generation tool hosted on GitHub and developed by user chengtx809. It quickly generates a timeline of events through user-entered keywords, displaying the event time, title, description and related people.AI analysis function provides an in-depth interpretation of the background, process and impact of the event. The project is built with Next.js and React, supports Docker deployment, and is suitable for users interested in news, history or hot events.
Function List
- Keyword Generation: Generate a timeline of related events based on keywords entered by the user.
- Event details: displays the time, title, description and people involved in the event.
- Time Filtering: Supports filtering events by time range, making it easy to focus on a specific period of time.
- AI Analytics: provides an in-depth analysis of the context, course and impact of an event.
- Source tagging: labeling the source of information about an event to ensure that the content is credible.
- Front-end configuration: support for users to set up AI API endpoints, models and keys.
- Password Protection: Optionally set an access password to prevent misuse of the API configuration.
Using Help
OneLine is a web-based tool with source code and deployment methods available through a GitHub repository. Below is a detailed usage and deployment guide to help users get started quickly.
Visit the Demo site
OneLine provides an online demo site for users to experience the features:
- Open your browser and visit
https://oneline.chengtx.me/
The - Enter keywords (e.g., "outbreak" or "technological breakthrough") in the page input box.
- Click the Generate button to view the generated timeline with the time, title and description of the event.
- Use the time filter function to select a specific year or month to narrow down the events.
- Click on the AI Analyze button to get an interpretation of the context, process, and impact of the event.
- Check the source of the incident to confirm the credibility of the information.
Local Deployment OneLine
If you want to run OneLine locally or on a server, you can get the source code and deploy it via the GitHub repository. Here are the detailed steps:
1. Access to source code
- interviews
https://github.com/chengtx809/OneLine
The - Click on the green
Code
button, selectDownload ZIP
Download the source code, or copy the repository address:git clone https://github.com/chengtx809/OneLine.git
- Unzip the file or go to the cloned folder and prepare to configure the environment.
2. Configuration environment
OneLine requires external AI API (e.g. Google Gemini or OpenAI) support. Configuration is divided into front-end configuration and environment variable configuration.
Front-end configuration:
- After launching OneLine, open the webpage and click the "API Settings" button on the top right corner.
- Enter the following information:
- API endpointsAs
https://api.example.com/v1/chat/completions
The - Model nameAs
gemini-2.0-pro-exp-search
The - API key: Get it from your API provider.
- API endpointsAs
- If an access password is set, enter the correct password to modify the configuration.
- Save the settings and test the functionality.
Environment variable configuration (recommended for deployment):
- In the project root directory, find the
.env.example
file, copy it and rename it.env.local
The - compiler
.env.local
, fill in the following:NEXT_PUBLIC_API_ENDPOINT=https://api.example.com/v1/chat/completions NEXT_PUBLIC_API_MODEL=gemini-2.0-pro-exp-search NEXT_PUBLIC_API_KEY=your_api_key_here NEXT_PUBLIC_ALLOW_USER_CONFIG=true NEXT_PUBLIC_ACCESS_PASSWORD=your_access_password_here
- Configuration Notes:
NEXT_PUBLIC_API_ENDPOINT
: The address of the AI API.NEXT_PUBLIC_API_MODEL
: Name of the AI model used.NEXT_PUBLIC_API_KEY
: Your API key.NEXT_PUBLIC_ALLOW_USER_CONFIG
: set tofalse
Configuration changes can be disabled on the front end.NEXT_PUBLIC_ACCESS_PASSWORD
: Optional password to protect API settings.
- Save files to ensure that sensitive information is not disclosed.
3. Deployment with Docker
OneLine supports Docker deployment, thanks to contributor justincnn for the image. Procedure:
- Ensure that Docker is installed (refer to
https://docs.docker.com/get-docker/
). - Run the following command to pull the image:
docker pull justincnn/oneline
- Run the container, mapping the port (default 3000):
docker run -p 3000:3000 justincnn/oneline
- Open your browser and visit
http://localhost:3000
If you are a member of the OneLine team, go to the OneLine page. - If a persistent configuration is required, set the
.env.local
file is mounted to the container:docker run -p 3000:3000 -v /path/to/.env.local:/app/.env.local justincnn/oneline
4. Manual deployment (non-Docker)
- Make sure Node.js is installed (v16 or above recommended).
- Go to the project directory and install the dependencies:
npm install
- Start the development server:
npm run dev
- interviews
http://localhost:3000
The API can be configured and used.
Using the main functions
Here's how to operate OneLine's core functions:
Generate Timeline
- Enter a keyword such as "artificial intelligence development" on the home page.
- Click on the "Generate" button, wait a few seconds and the timeline will be displayed.
- The timeline is sorted chronologically and shows the event title, date, description and people involved.
- Hover over the event to see the details.
Time Screening
- Find the filter bar at the top of the timeline and select the year (e.g. 2020-2025) or month.
- Click the "Apply" button and the timeline is updated with the events in the filtered range.
- If you need to reset, click "Clear Filter".
AI Analytics
- Select an event in the timeline and click on the "AI Analyze" button.
- The system calls the configured AI APIs to generate context, process, and impact analysis of the event.
- The results of the analysis are displayed below the event and contain textual descriptions that may address causes, effects, and trends.
Inspection of sources
- There is a source marker next to each event, click on it to see the original link or source.
- If the source is not credible, submit an Issue on GitHub to suggest improvements.
Participation in community contributions
OneLine is an open source project and user contributions are welcome:
- To access the GitHub repository, click
Issues
View issues or submit a new one. - Fork the repository, change the code, and submit a Pull Request, for example, to optimize the timeline UI or add support for a new language.
- Run tests before committing:
npm run test
- Describe the changes in the Pull Request and wait for review.
Frequently Asked Questions
- API Configuration Failure: Verify that the API endpoint, model, and key are correct, or check the network connection.
- Timeline not displayed: Ensure that keywords are specific (e.g., "2023 science and technology event") and avoid being overly broad.
- Docker startup errors: Check if Docker is running and if the port is occupied.
- AI analyzes content inaccurately: Replace the AI model with a more powerful one, or feed back issues at GitHub.
With these steps, users can easily deploy and use OneLine to quickly generate hot event timelines and get AI analytics.
application scenario
- Press Release Collation
Journalists use OneLine to enter keywords and generate a timeline of events, quickly organizing the news and assisting in story writing. - historical research
Students or researchers enter historical events and get timelines and AI analysis to understand the context and impact of the event. - Hot Tracking
The public inputs current hot topics, views the development of events, filters key time points, and grasps the latest developments. - teaching and learning
Teachers use OneLine to generate a timeline of events to use as classroom material to help students understand complex events.
QA
- What AI APIs does OneLine support?
Support for Google Gemini, OpenAI, etc., depending on user-configured endpoints and models. - Programming experience required?
No, using the Demo site requires only keyword entry; deployment requires basic command-line knowledge. - Where does the timeline data come from?
Data is generated by AI from publicly available information based on keywords, with the source labeled next to the event. - Can it be used offline?
Networking is required to invoke AI APIs, some functions can be offline after local deployment, but AI analysis relies on the network. - How do I secure my API keys?
Use environment variable configuration to avoid exposing keys on the front-end and set access passwords for added protection.