Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
<?php
|
2018-03-23 16:39:58 +01:00
|
|
|
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$index = '';
|
2018-04-01 13:33:36 +02:00
|
|
|
$files = glob('docs/docs/docs/*md');
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
foreach ($files as $file) {
|
|
|
|
$base = basename($file, '.md');
|
|
|
|
if ($base === 'CREATING_A_CLIENT') {
|
|
|
|
$orderedfiles[0] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'LOGIN') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[1] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'FEATURES') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[2] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'REQUIREMENTS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[3] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'INSTALLATION') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[4] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'UPDATES') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[5] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'SETTINGS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[6] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'SELF') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[7] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'EXCEPTIONS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[8] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'FLOOD_WAIT') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[9] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'LOGGING') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[10] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'USING_METHODS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[11] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'FILES') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[12] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'CHAT_INFO') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[13] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'DIALOGS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[14] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'INLINE_BUTTONS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[15] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'CALLS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[16] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'SECRET_CHATS') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[17] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'LUA') {
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$orderedfiles[18] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'PROXY') {
|
2018-03-20 15:47:34 +01:00
|
|
|
$orderedfiles[19] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'CONTRIB') {
|
2018-03-20 15:47:34 +01:00
|
|
|
$orderedfiles[20] = $file;
|
2018-03-23 16:39:58 +01:00
|
|
|
} elseif ($base === 'TEMPLATES') {
|
2018-03-20 22:18:19 +01:00
|
|
|
$orderedfiles[21] = $file;
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
}
|
2018-03-20 15:47:34 +01:00
|
|
|
ksort($orderedfiles);
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
}
|
|
|
|
ksort($orderedfiles);
|
2018-03-20 15:51:22 +01:00
|
|
|
foreach ($orderedfiles as $key => $filename) {
|
2018-03-20 15:47:34 +01:00
|
|
|
$lines = explode("\n", file_get_contents($filename));
|
2018-03-23 16:39:58 +01:00
|
|
|
while (end($lines) === '' || strpos(end($lines), 'Next')) {
|
|
|
|
unset($lines[count($lines) - 1]);
|
2018-03-20 15:51:22 +01:00
|
|
|
}
|
2018-04-11 14:18:03 +02:00
|
|
|
if ($lines[0] === '---') {
|
|
|
|
array_shift($lines);
|
|
|
|
while ($lines[0] !== '---') {
|
|
|
|
array_shift($lines);
|
|
|
|
}
|
|
|
|
array_shift($lines);
|
|
|
|
}
|
|
|
|
preg_match('|^# (.*)|', $lines[0], $matches);
|
|
|
|
$title = $matches[1];
|
|
|
|
$description = $lines[2];
|
|
|
|
|
|
|
|
array_unshift($lines, '---', 'title: '.$title, 'description: '.$description, 'image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png', '---');
|
|
|
|
|
2018-03-23 16:39:58 +01:00
|
|
|
if (isset($orderedfiles[$key + 1])) {
|
|
|
|
$nextfile = 'https://docs.madelineproto.xyz/docs/'.basename($orderedfiles[$key + 1], '.md').'.html';
|
|
|
|
$prevfile = $key === 0 ? 'https://docs.madelineproto.xyz' : 'https://docs.madelineproto.xyz/docs/'.basename($orderedfiles[$key - 1], '.md').'.html';
|
2018-04-01 13:55:16 +02:00
|
|
|
$lines[count($lines)] = "\n<a href=\"$nextfile\">Next section</a>";
|
2018-03-20 20:43:11 +01:00
|
|
|
} else {
|
2018-04-01 13:55:16 +02:00
|
|
|
$lines[count($lines)] = "\n<a href=\"https://docs.madelineproto.xyz/#very-complex-and-complete-examples\">Next section</a>";
|
2018-03-20 15:51:22 +01:00
|
|
|
}
|
|
|
|
file_put_contents($filename, implode("\n", $lines));
|
2018-03-20 15:47:34 +01:00
|
|
|
|
2018-04-11 14:18:03 +02:00
|
|
|
$file = file_get_contents($filename);
|
|
|
|
|
|
|
|
preg_match_all('|( *)\* \[(.*)\]\((.*)\)|', $file, $matches);
|
2018-03-23 16:39:58 +01:00
|
|
|
$file = 'https://docs.madelineproto.xyz/docs/'.basename($filename, '.md').'.html';
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$index .= "* [$title]($file)\n";
|
|
|
|
if (basename($filename) !== 'FEATURES.md') {
|
|
|
|
foreach ($matches[1] as $key => $match) {
|
|
|
|
$spaces = " $match";
|
|
|
|
$name = $matches[2][$key];
|
2018-04-11 14:18:03 +02:00
|
|
|
$url = $matches[3][$key][0] === '#' ? $file.$matches[3][$key] : $matches[3][$key];
|
Documentation rework (#349)
* Documentation rework
* Apply fixes from StyleCI
* Documentation fixes
* Login as bot through web/cli API, allow using invite links in joinChannel, full invite links in importChatInvite and checkChatInvite, non-invite links in importChatInvite
* Apply fixes from StyleCI
* Logging fixes
* Build docs
* Add methods to modify start template, bugfix to logging and keyboard conversion
* Add TL documentator
* Document MTProto methods
* Documenting methods...
* 7% documented
* Bugfixes
* Update docs
* Update docs
* Simplify file management
* Implement automatic object conversion for media, and more awesome stuff
* Implement automatic object conversion for media, and more awesome stuff
* Implement event update handler and file upload/download callback
* Auto-detect mime type, duration, width and height of media
* Update docs
* Document new file functions
* Fix links
* Fix links
* Update bot.php to use event loop
* Implement webhook update handler and forking in main loop
* Build docs
* Better docs
* Fixes to secret chats
* Almost finished updating docs
* Bugfixes, implemented infinite loop for loop() method, almost finished docs
* Finish writing docs
* Add automatic documentation builder script
* Finished writing docs
2018-03-20 12:48:05 +01:00
|
|
|
$index .= "$spaces* [$name]($url)\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-04-11 14:18:03 +02:00
|
|
|
|
2018-04-11 14:18:45 +02:00
|
|
|
$readme = explode('## ', file_get_contents('README.md'));
|
2018-04-11 14:18:03 +02:00
|
|
|
foreach ($readme as &$section) {
|
|
|
|
if (explode("\n", $section)[0] === 'Documentation') {
|
|
|
|
$section = "Documentation\n\n".$index."\n";
|
|
|
|
}
|
|
|
|
}
|
2018-04-11 14:18:45 +02:00
|
|
|
$readme = implode('## ', $readme);
|
2018-04-11 14:18:03 +02:00
|
|
|
|
|
|
|
file_put_contents('README.md', $readme);
|
2018-04-11 14:18:45 +02:00
|
|
|
file_put_contents('docs/docs/index.md', '---
|
2018-04-11 14:18:03 +02:00
|
|
|
title: MadelineProto documentation
|
|
|
|
description: PHP client/server for the telegram MTProto protocol (a better tg-cli)
|
|
|
|
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
|
|
|
|
---
|
2018-04-11 14:18:45 +02:00
|
|
|
'.$readme);
|