Most of the current navigation page open source projects are not very customizable, and the information that individuals want to pay attention to is too scattered. Therefore, I decided to write a navigation page that can be highly customized by users and integrate the information and functions they need.
Updates are resumed! I have been busy with work in the past two years and have not had much energy. I will take time to repair it recently.
The front-end uses Vue.js, the back-end uses Python, and MariaDB+Redis provides data storage. The front-end framework uses Element UI, the back-end framework uses Flask, and the back-end ORM uses Peewee.
? If you have any BUG/requirements/suggestions, please attach reproduction steps/ideas and submit Issues!
Welcome star!
? I have been using it personally for several years at the airport. It is fast and cheap. I highly recommend it. It is really easy to use! Click this link!
ByteDance social recruitment internal promotion can just click this link to submit. Campus recruitment internal promotion code: AWN958P, welcome to forward and spread!
The dev branch is a branch under development and may have problems running. It is recommended to use the master branch for deployment testing.
Docker is already working on it~
First you need Python3, Pip, MySQL (MariaDB was used during testing) and Redis environment
The key applied for SeverChan is used to push reminders to WeChat; the key used for Zefeng Weather is used to obtain weather information; the email and password are sent by default. Please refer to the password acquisition method of QQ mailbox
After you have the environment, use python3 to run start.py in the root directory and follow the prompts.
Table of contents | content |
---|---|
/backend | backend code |
/backend/run.py | Backend entry file |
/frontend | front-end code |
/dist | The product of front-end compilation |
/upload | Store files uploaded by users |
/wallpapers | Store scraped Bing wallpapers |
You can click here to use vscode to temporarily check the code
Entrance: Home page
Function: Jump to the search URL after entering the content. When entering the page, the focus is automatically placed in the search box. Entering text can bring up prompts (you need to configure the callback function of the corresponding engine in the data table search_engines. If you add or delete engines, it is also in the database. add data)
Entrance: Hover username in the upper left corner after logging in-Console
Function: Provides the front-end component entrance registered in the console table to facilitate future permission control or sorting operations. If you need to add a front-end module, in addition to writing the front-end business, you also need to add a record in the console table.
Entrance: After logging in, hover the user name in the upper left corner - console - script running platform.
Function: Unified driver for background programs. Front-end forms are all generated by configuration, and there is no need to touch the front-end code. You can submit the script to the back-end running script by filling in the form generated by the configuration, and display the running results. It also has the ability to run scripts regularly, play back previously run tasks, and record running time. , record operation logs, customize operation record forms and other humanized functions
Notice:
Module:
Edit script:
Initial options:
Component options:
print()
directly in the script to print the text that needs to be output. In addition, through a certain data format, the options of the selector component can be initialized. See the example below: import json
d = {
'code' : 200 , # 状态码,非必填,无实际作用
'data' : {
'msg' : 'hello n world qwe n qewqweewqwe' , # 展示的文本,非必须,会被解析为html,使用"n"换行
'value' : '123' , # 非必须,当传递value时,会将组件内的值替换成传回的值
'options' : [ # 非必须,当传递options时,会将选择器组件内的选项替换成传回的选项
{
'label' : '234' , # 标签,用于选择器组件展示的值
'value' : '234' # 值,用于选择器组件选择时实际代表和传递的值
},
]
}
}
print ( json . dumps ( d ))
Entrance: Hover username in the upper left corner after logging in-Console-Account and Permissions
Function: An interface-level permission control system written using the "user-role-permission" model. The interface can control permissions using a decorator. By default, when a user requests an interface, the requesting IP must be consistent with the IP used when logging in. This is a relatively strict policy and can be turned off in "/backend/app/privilege/privilege_control.py:24"
Module:
User settings: add users, disable users, delete users, modify user roles, modify user passwords
Role corresponding permission settings: add roles, disable roles, delete roles, modify role names, modify role corresponding permissions
Permission settings: add permissions, disable permissions, delete permissions, modify permissions
Entrance: After logging in, hover the user name in the upper left corner-Console-Modify the homepage component
Function: Drag and drop to modify the way the homepage is displayed. The parent of a component is defined as "component set". When there is and is only one component set, the page does not display the component set title, but only displays the components it contains. When there are two or more component sets, the page displays Component sets and the components they contain
Button: Use left and right drag to edit the order of the component set, use the round plus button on the right side of the component set to add a component set, use the edit button inside each component set to modify the name of the component set, use each component Use the delete button inside the set to delete the component set; use the up and down dragging method to edit the order of the components in the component set, use the square plus button in each component set to add components, and use the delete button on the right side of the component to delete the component. . Component details do not support modification. You can manually change the library (widget) to modify it.
Entrance: Hover username in the upper left corner after logging in - network disk/picture bed
Network disk:
A simple network disk function that supports sharing through download links. There is no limit on file upload size and no limit on download speed. However, when uploading large files, you need to wait for a while until the loading is completed. The file is stored in the upload folder of the root directory, and a subfolder named Date is created.
Button: The upper part of the interface is the upload file button. You can click and select the file or upload the file by dragging the file to the browser; the buttons in the file list below are: 1. Download button - click to download the file; 2. Share button (not shared) appears) - after clicking, a sharing link will be generated. After sharing it with others, others can paste it into the browser to trigger the download of the file. The sharing link is encrypted and compressed, and the actual download The download link will be compressed into a short link for easy use, and the link has an authentication token to ensure basic security; 3. Copy share link button (appears after sharing) - click to copy the share link to the clipboard; 4. Cancel Share button (appears after sharing) - invalidate the sharing link and cancel sharing; 5. Delete button - logically delete the file; 6. Modify file name button, you can modify the file name
Picture bed:
If you do not log in, the weather information of the IP location will be displayed (limited by third-party API, and when the IP location is overseas, the support is not good). You can customize it after logging in, and the display range is IP + custom location information. In addition, when requesting data, in order to ensure speed, the cache will be used first. The cached data is valid for 3 hours (modified in backendappweatherweather_function.py:16). If there is no effective cache, the external API will be requested to Get data and store it in cache
Button: Add - add a new city after logging in; Sort - you can drag to sort or delete customized cities; Push - there are three kinds of abnormal weather options for push, namely rain and snow weather, sudden rise/fall in temperature, and air Quality, and the location to be pushed and the location to be displayed are independent and can be set separately.
You can customize it after logging in. The bookmarks displayed when you are not logged in are modified in the database (bookmarks.user_id==0)
Button: Add - add bookmarks after logging in; Settings - drag the icons to sort, delete or modify bookmarks after logging in
Find apps in the Apple App Store and monitor their prices, and alert users when they are less than a set threshold.
Record notes and push the note content to WeChat/email regularly. Since we don’t want to make the function too complicated, the submitted push cannot be revoked, but it can be set multiple times. That is, the set push can be added at will but cannot be subtracted. In addition, notes can be rolled back to previous versions through "time machine", which is suitable for accidental deletion and other situations.
Buttons: When the mouse hovers the ellipsis, three buttons can pop up: Edit and Delete - edit or delete the selected note, and save all notes as a new version after submission; Reminder - click to pop up the edit reminder dialog box, which can be accessed through WeChat/ Remind the content of the note by email, with a minimum granularity of five minutes. The circular buttons below are the new button and the time machine button respectively. The functions will not be described again.
It is implemented using translators, using Alibaba's service. When text is entered in the input area on the left, after a period of time, it will be translated according to the language selected above.
The system uses a "script running platform" to drive scripts to crawl one Bing wallpaper every day, and the widget scrolls to display the wallpapers within 7 days. Click on the picture to download the original picture.
Monitor gold prices and can set thresholds to send alerts when the price exceeds the threshold. You need to configure scheduled tasks in the "Script Running Platform". When crawling data, the crawler will skip the time when domestic gold is not open.
Crawl stock data from Shanghai and Shenzhen stock markets, Hong Kong stocks, and US stocks, and set a reminder function when the threshold is exceeded.
Crawl fund data and set a reminder function when the threshold is exceeded.
It aggregates information from more than 20 websites and collects it every hour through scheduled tasks. It can be refreshed manually by clicking on the title. Some screenshots of the content are as follows.
Note: As of November 2020, Baidu, Weibo, Omelette, and Sogou clearly prohibit individual users from crawling any information. Please strictly delete relevant codes when running the project.
Since website rules may change, please check the data sources used in this project in sequence when running the project. When the robots protocol prohibits crawling by individual users, delete the relevant code!
Comply with the robots protocol, comply with crawler ethics, and build a better Internet environment.
?The development of this project relies on a large number of excellent open source projects and website services:
The code has been optimized using methods such as caching data and limiting frequency to avoid crawling data from causing greater pressure on the website.
The data obtained is for learning reference only. If there is any infringement, please contact us immediately to delete it.
?Email: [email protected]
?If this project inspires or helps you, you may wish to support the developer
MPL-2.0