Source code of filesite.io.
https://filesite.io
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
209 lines
7.4 KiB
209 lines
7.4 KiB
3 years ago
|
|
||
2 weeks ago
|
# FileSite.io - A standard for managing URLs, articles, images, and videos based on files and directories
|
||
3 years ago
|
|
||
2 weeks ago
|
**Summary:**
|
||
3 years ago
|
|
||
2 weeks ago
|
Based on existing file formats, we have defined a **standard** for managing several commonly used data types by users, aiming to help users more easily build their own creations into websites while retaining their existing content management habits. App, while also making it easier to publish your creations to various platforms.
|
||
3 years ago
|
|
||
2 weeks ago
|
This standard currently supports four types of data: URLs, articles, images, and videos, and will expand to other data types if necessary.
|
||
3 years ago
|
|
||
3 years ago
|
|
||
2 weeks ago
|
## Introduction
|
||
3 years ago
|
|
||
2 weeks ago
|
We believe that everyone is a creator. He/she can be a writer, photographer, or videographer. Maybe he/she will also collect and classify his/her favorite websites.
|
||
3 years ago
|
|
||
2 weeks ago
|
Because of the existing platform and environment, most people's creations can only lie quietly on the computer's hard drive, but one day, with the promotion of many practitioners, personal creative content will be built into a website , The threshold for apps will become lower and lower. At that time, everyone can easily and quickly create their own websites and apps, and can publish their works to major platforms using the one-click upload function.
|
||
3 years ago
|
|
||
2 weeks ago
|
We also firmly believe that **the ownership of everyone's work always belongs to the author**, no matter which platform he/she has published the work on, he/she can delete all his/her works on a certain platform at any time as long as he/she wishes. Data, it is so simple to quickly upload works from a computer to another platform, which will change the relationship between the platform and the creator. It is no longer the creator who depends on the platform, but the platform depends on the creator.
|
||
2 years ago
|
|
||
2 weeks ago
|
Because of this, we have proposed a new standard that does not use any new technology. It is completely based on existing operating systems, file systems and file types, as well as the existing usage habits of most people. It is also an introduction to the future. Come early!
|
||
2 years ago
|
|
||
|
|
||
2 weeks ago
|
## Version
|
||
2 years ago
|
|
||
2 weeks ago
|
Name: filesite_2023
|
||
3 years ago
|
|
||
2 weeks ago
|
Version number: 20230130
|
||
3 years ago
|
|
||
2 weeks ago
|
Modification time: 2023-01-30
|
||
3 years ago
|
|
||
2 years ago
|
|
||
2 weeks ago
|
## Directories and files
|
||
2 years ago
|
|
||
2 weeks ago
|
The directories and files mentioned in this standard refer to files and directories in common operating systems such as Windows, Linux, and MacOS.
|
||
3 years ago
|
|
||
2 weeks ago
|
If there are differences in the naming conventions of files and directories in different operating systems on the market, this standard adopts the parts supported by them.
|
||
3 years ago
|
|
||
|
|
||
2 weeks ago
|
## Data type
|
||
3 years ago
|
|
||
2 weeks ago
|
The current version supports the following types of data:
|
||
3 years ago
|
|
||
2 weeks ago
|
| Type | Format |
|
||
3 years ago
|
| ---- | ---- |
|
||
2 weeks ago
|
| URL | .url shortcut |
|
||
|
| Article | .md markdown file |
|
||
2 weeks ago
|
| Pictures | .jpg, .png, .gif, .ico, .webp, .svg |
|
||
|
| Video | .mp4, .mov, .m3u8, .ts |
|
||
|
| Audio | .mp3 |
|
||
3 years ago
|
|
||
3 years ago
|
|
||
2 weeks ago
|
## Data description
|
||
3 years ago
|
|
||
2 weeks ago
|
If you need to extend the description of the above types of data, please use a plain text file in .txt format to save it. We call this type of .txt file a "**description file**".
|
||
3 years ago
|
|
||
2 weeks ago
|
The description file naming rules are as follows:
|
||
2 years ago
|
```
|
||
2 weeks ago
|
Directory description file: {English lowercase attribute name}.txt
|
||
|
File description file: {described file name_}{English lowercase attribute name}.txt
|
||
2 years ago
|
```
|
||
3 years ago
|
|
||
2 weeks ago
|
Several commonly used attribute description files are as follows:
|
||
3 years ago
|
|
||
2 weeks ago
|
| File name | Description | Property name |
|
||
2 years ago
|
| ---- | ---- | ---- |
|
||
2 weeks ago
|
| title.txt | title | title |
|
||
|
| description.txt | Description information | description |
|
||
|
| keywords.txt | keyword information | keywords |
|
||
|
| snapshot.txt | snapshot picture | snapshot |
|
||
3 years ago
|
|
||
3 years ago
|
|
||
2 weeks ago
|
## Directory and file structure
|
||
3 years ago
|
|
||
2 weeks ago
|
The directory can contain subdirectories and files, and the directory hierarchy supports up to 5 levels**.
|
||
3 years ago
|
|
||
2 weeks ago
|
Use directories to **group** data, and put files of a group in the same directory.
|
||
3 years ago
|
|
||
2 weeks ago
|
Example (the letters **d** represent directories and the letters **f** represent files):
|
||
2 years ago
|
```
|
||
2 weeks ago
|
-d- novel
|
||
|
|_d_ Jin Yong’s novels
|
||
|
|_f_ Favorite Jin Yong website icon.ico
|
||
|
|_f_ Favorite Jin Yong.url
|
||
|
|_d_ Gu Long Novels
|
||
|
|_f_ Favorite cologne website icon.ico
|
||
|
|_f_ favorite cologne.url
|
||
|
-d- pictures
|
||
|
|_d_ Image Search
|
||
|
|_f_ Google image search icon.ico
|
||
|
|_f_ Google Image Search.url
|
||
|
|_f_ description.txt
|
||
|
|_d_ Bing Image Search
|
||
|
|_f_ bingicon.ico
|
||
|
|_f_ bing.url
|
||
|
|_f_ title.txt
|
||
2 years ago
|
```
|
||
3 years ago
|
|
||
|
|
||
|
|
||
2 weeks ago
|
## API data structure
|
||
3 years ago
|
|
||
2 weeks ago
|
### Directory
|
||
3 years ago
|
|
||
|
```
|
||
2 years ago
|
[
|
||
2 weeks ago
|
'id' => 'A unique number generated based on the complete path',
|
||
|
'pid' => 'parent directory id', //if there is a parent directory
|
||
|
'directory' => 'Eternal Dragon Sword',
|
||
|
'realpath' => '/www/webroot/content/天杀龙记/',
|
||
|
'path' => '/list/?id={id}',
|
||
|
'snapshot' => '/content/The cover image of Yitian Slaying the Dragon.jpg',
|
||
|
'files' => [...], //file list
|
||
|
'directories' => [...] //Directory list
|
||
2 years ago
|
]
|
||
3 years ago
|
```
|
||
|
|
||
2 weeks ago
|
### File
|
||
3 years ago
|
|
||
2 weeks ago
|
Articles, pictures, and video files other than URLs.
|
||
2 years ago
|
|
||
|
```
|
||
2 years ago
|
[
|
||
2 weeks ago
|
'id' => 'A unique number generated based on the complete path',
|
||
|
'pid' => 'parent directory id', //if there is a parent directory
|
||
|
'filename' => 'Chapter 1',
|
||
|
'realpath' => '/www/webroot/content/天杀龙记/Chapter 1.md',
|
||
|
'path' => '/view/?id={id}',
|
||
|
'extname' => 'md',
|
||
|
'extension' => 'MD',
|
||
|
'fstat' => [...], //Same as PHP method fstat: https://www.php.net/manual/en/function.fstat.php
|
||
|
'content' => 'Article content...',
|
||
|
'description' => 'Article introduction...',
|
||
|
'keywords' => 'Article keywords...',
|
||
|
'snapshot' => '/content/Eternal Dragon Sword/Chapter 1 Cover Picture.jpg',
|
||
2 years ago
|
]
|
||
3 years ago
|
```
|
||
|
|
||
2 weeks ago
|
Special fields:
|
||
|
* extension is case sensitive
|
||
2 weeks ago
|
* extname is lower case of extension
|
||
2 weeks ago
|
|
||
|
|
||
2 weeks ago
|
.txt, .md and .url 3 file descriptions:
|
||
|
* .txt files are description files for all other files and will not appear in the file list;
|
||
|
* .md will read the file content and store it in the attribute content;
|
||
|
* .url reads the file content and stores it in the attribute shortcut;
|
||
3 years ago
|
|
||
2 years ago
|
|
||
2 weeks ago
|
### URL-Shortcut
|
||
2 years ago
|
|
||
2 weeks ago
|
The .url file is a universal web page shortcut. Its data structure has one more attribute than the above file data structure: **shortcut**.
|
||
2 years ago
|
|
||
3 years ago
|
```
|
||
2 years ago
|
[
|
||
2 weeks ago
|
'id' => 'A unique number generated based on the complete path',
|
||
|
'pid' => 'parent directory id', //if there is a parent directory
|
||
|
'filename' => 'filesite.io',
|
||
|
'realpath' => '/www/webroot/content/URL Navigation/filesite.io.url',
|
||
|
'path' => '/link/?id={id}',
|
||
|
'extname' => 'url',
|
||
|
'extension' => 'url',
|
||
|
'fstat' => [...], //Same as PHP method fstat: https://www.php.net/manual/en/function.fstat.php
|
||
|
'shortcut' => [
|
||
|
'name' => 'filesite.io',
|
||
|
'url' => 'https://filesite.io',
|
||
|
],
|
||
2 years ago
|
]
|
||
3 years ago
|
```
|
||
|
|
||
2 weeks ago
|
Example of .url file content:
|
||
2 years ago
|
```
|
||
2 years ago
|
[InternetShortcut]
|
||
|
URL=https://microsoft.com/
|
||
2 years ago
|
```
|
||
|
|
||
|
|
||
2 weeks ago
|
## PHP implementation
|
||
2 years ago
|
|
||
2 weeks ago
|
We made an open source program called Machete using PHP based on this standard. You can find it on github:
|
||
2 years ago
|
```
|
||
|
https://github.com/filesite-io/machete/
|
||
|
```
|
||
3 years ago
|
|
||
2 weeks ago
|
For detailed introduction, see:
|
||
3 years ago
|
|
||
2 weeks ago
|
[Machete - database-free, file- and directory-based Markdown document, website navigation, book, picture, video website PHP open source system](./Machete_Doc.md)
|
||
3 years ago
|
|
||
3 years ago
|
|
||
2 weeks ago
|
## Contact us
|
||
3 years ago
|
|
||
2 weeks ago
|
If you find Filesite.io helpful and would like to use it in a project, we'd love you to share your story with us:
|
||
2 years ago
|
|
||
2 weeks ago
|
* Send email to us:
|
||
|
```
|
||
|
[email protected]
|
||
|
```
|
||
|
|
||
|
* Join QQ group:
|
||
2 years ago
|
|
||
2 weeks ago
|
<a href="https://jq.qq.com/?_wv=1027&k=WoH3Pv7d" target="_blank">QQ group of Filesite/Machete: 44123711</a>
|
||
2 years ago
|
|
||
2 weeks ago
|
* Scan the QR code to add WeChat friends:
|
||
1 year ago
|
|
||
2 weeks ago
|
<img src="./wx_jialuoma.jpeg" alt="Scan the WeChat QR code to add friends" width="240" />
|
||
1 year ago
|
|
||
|
|
||
2 weeks ago
|
## 简体中文版
|
||
1 year ago
|
|
||
2 weeks ago
|
[FileSite.io,一个基于文件和目录管理网址、文章、图片、视频的标准](./zh-cn/README.md)
|